Simple numbers to text (seconds example) Thread last updated on 2007-07-31 06:57:34

Posted by member 212670 on 2007-07-30 17:56:53

; xlabel 3.4.9 was used

; Create vars 1 to 60 that represent their text

1 one
2 two
3 three
4 four
5 five
6 six
7 seven
8 eight
9 nine
10 ten
11 eleven
12 twelve
13 thirteen
14 fourteen
15 fifteen
16 sixteen
17 seventeen
18 eighteen
19 nineteen
20 twenty
21 "twenty one"
22 "twenty two"
23 "twenty three"
24 "twenty four"
25 "twenty five"
26 "twenty six"
27 "twenty seven"
28 "twenty eight"
29 "twenty nine"
30 thirty
31 "thirty one"
32 "thirty two"
33 "thirty three"
34 "thirty four"
35 "thirty five"
36 "thirty six"
37 "thirty seven"
38 "thirty eight"
39 "thirty nine"
40 fourty
41 "fourty one"
42 "fourty two"
43 "fourty three"
44 "fourty four"
45 "fourty five"
46 "fourty six"
47 "fourty seven"
48 "fourty eight"
49 "fourty nine"
50 fifty
51 "fifty one"
52 "fifty two"
53 "fifty three"
54 "fifty four"
55 "fifty five"
56 "fifty six"
57 "fifty seven"
58 "fifty eight"
59 "fifty nine"
60 sixty

; Hidden dummy label that fires when the number changes (seconds in the example)
; The number value of seconds is parsed to its var value, which is the text

*Label dummy
dummyX -1
dummyY -1
dummyWidth 1
dummyHeight 1
dummyText "[time('s')]"
dummyOnTextChange !ParseEvars !LabelSetText textnums "%#%[time('s')]%%#"

; Label to display the text

*Label textnums
textnumsX 50
textnumsY 50
textnumsAutoWidthMode left
textnumsHeight 30
textnumsBorders 5
textnumsSolidColors FFFFFF 000000
textnumsSolidBevelSize 2
textnumsAlwaysOnTop true

edit - Removed script module. It was totally unnecessary. Not sure what I was thinking. :D