Code: Select all
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
//Three versions of OnEvent. Only first version works fine.
// This Onevent Handler based on CUSTOM works fine.
Let>DoIt=False
OnEvent>CUSTOM,DefaultTrigger,DoIT,CheckWarning
SRT>DefaultTrigger
END>DefaultTrigger
SRT>CheckWarning
ifWindowOpen>Macro Scheduler Message
GetTime>OEtijd
WriteLn>%script_dir%\log\onevent.txt,Res,%OEtijd% Checkwarning version 1
SetFocus>{"Macro Scheduler Message"}
UIClick>{"Macro Scheduler Message"},{"OK"}
Wait>0.1
EndIf
END>CheckWarning
/*
// This one does not work either with param 0, 1 or 2
OnEvent>WINDOW_OPEN,Macro Scheduler Message,1,CheckWarning
SRT>CheckWarning
GetWindowList>winlist
UpperCase>winlist,winlist
Separate>winlist,MACRO SCHEDULER MESSAGE,RecCheck
If>RecCheck_count>1
GetTime>OEtijd
WriteLn>%script_dir%\log\onevent.txt,Res,%OEtijd% Checkwarning version 2
SetFocus>{"Macro Scheduler Message"}
UIClick>{"Macro Scheduler Message"},{"OK"}
Wait>0.1
endif
END>CheckWarning
// This one does not work either.
OnEvent>WINDOW_NEWACTIVE,0,0,CheckWarning
SRT>CheckWarning
ifWindowOpen>Macro Scheduler Message
GetTime>OEtijd
WriteLn>%script_dir%\log\onevent.txt,Res,%OEtijd% Checkwarning version 3
SetFocus>{"Macro Scheduler Message"}
UIClick>{"Macro Scheduler Message"},{"OK"}
Wait>0.1
EndIf
END>CheckWarning
*/
GetTime>OEtijd
WriteLn>%script_dir%\log\onevent.txt,Res,%OEtijd% Start
Let>DoIt=TRUE
MessageModal>test message