Here's a downsized version of
Happy Button. It grins at random intervals. Me_again's blinking eyes could be substituted for the Asterisk and Caret that was used.
Code: Select all
Dialog>Dialog1
Caption=Happy Button
Width=200
Height=100
Top=CENTER
Left=CENTER
Close=0
Button=* *%CRLF%[__________],50,1,80,40,3
EndDialog>Dialog1
show>dialog1
Let>kcount=0
Random>150,kwait
Label>start
Add>kcount,1
Wait>0.01
Random>10,kdwell
Let>kdwell=%kdwell%/10
If>kdwell<0.3
add>kdwell,1
EndIf
GetDialogAction>dialog1,r1
If>r1=3,Quit
Let>dialog1.msbutton1=* *%CRLF%[________]
If>%kcount%>%kwait%
Let>dialog1.msbutton1=^ ^%CRLF%(_________)
RDA>dialog1
Wait>%Kdwell%
Let>kcount=0
Random>350,kwait
EndIf
Goto>start
Label>Quit
Here's the same thing with just a label
Code: Select all
Dialog>Dialog1
Caption=Happy Button
Width=200
Height=100
Top=CENTER
Left=CENTER
Close=0
Label= * *%CRLF% [_________],50,1,80,40,3
EndDialog>Dialog1
show>dialog1
Let>kcount=0
Random>150,kwait
Label>start
Add>kcount,1
Wait>0.01
Random>10,kdwell
Let>kdwell=%kdwell%/10
If>kdwell<0.3
add>kdwell,1
EndIf
GetDialogAction>dialog1,r1
If>r1=3,Quit
Let>dialog1.mslabel1= * *%CRLF% [_________]
If>%kcount%>%kwait%
Let>dialog1.mslabel1= ^ ^%CRLF%(___________)
RDA>dialog1
Wait>%Kdwell%
Let>kcount=0
Random>350,kwait
EndIf
Goto>start
Label>Quit
Here's the countdown. I think the SetDialogObjectFont> function requires version 10. I don't remember how or even if it was possible to set label font in a dialog prior to v10.
Thanks to a
post by kpassaur back in 2007 I found how to set dialog fonts starting in version 9.
Code: Select all
Dialog>Dialog1
Caption=Happy Button
Font=Terminal,8
Width=200
Height=100
Top=CENTER
Left=CENTER
Close=0
Label=########%crlf%## %crlf%## %crlf%####### %crlf% ## %crlf%## ## %crlf% ######,50,1,80,40,3
EndDialog>Dialog1
//SetDialogObjectFont>Dialog1,mslabel1,terminal,8,1,0
show>dialog1
Wait>1
//4
Let>dialog1.mslabel1=## %crlf%## ## %crlf%## ## %crlf%## ## %crlf%######### %crlf% ## %crlf% ##
RDA>dialog1
Wait>1
//3
Let>dialog1.mslabel1= ####### %crlf%## ## %crlf% ## %crlf% ####### %crlf% ## %crlf%## ## %crlf% #######
RDA>dialog1
Wait>1
//2
Let>dialog1.mslabel1= ####### %crlf%## ## %crlf% ## %crlf% ####### %crlf%## %crlf%## %crlf%#########
RDA>dialog1
Wait>1
//1
Let>dialog1.mslabel1= ## %crlf% #### %crlf% ## %crlf% ## %crlf% ## %crlf% ## %crlf% ######
RDA>dialog1
Wait>1
//0
Let>dialog1.mslabel1= ####### %crlf%## ## %crlf%## ## %crlf%## ## %crlf%## ## %crlf%## ## %crlf% #######
RDA>dialog1
Wait>1