04-17-2019, 05:44 AM
ok last one i'm off to sleep
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Static 0x54000000 0x0 108 52 12 13 ""
;4 Button 0x54032000 0x0 88 72 48 14 "run"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc
function# hDlg message wParam lParam
str s
int- t=5
sel message
,case WM_INITDIALOG
,SetTimer hDlg 1 1000 0
,case WM_TIMER
,sel wParam
,,case 1
,,if t>1
,,,t-1
,,else
,,,KillTimer hDlg 1
,,,SendMessage hDlg WM_COMMAND 4 0
,,s=t; s.setwintext(id(3 hDlg))
,case WM_SETCURSOR
,if(lParam>>16=WM_LBUTTONDOWN) KillTimer hDlg 1 ;;remove this if don't need to stop timer on click
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 4 ;;run
,mes "autorun ok"
ret 1