Code: Select all
OnEvent>WINDOW_NEWACTIVE,0,0,NewWin
let>j=0
label>restart
let>dummy=
let>j=j+1
wait>0.2
if>j>50
mdl>time out
exit>0
endif
goto>restart
label>end_macro
mdl>%NewWin_title% ended
exit>0
Srt>NewWin
GetActiveWindow>NewWin_title,xpos,ypos
Let>pattern=Internet Explorer
regex>pattern,%NewWin_title%,1,matches,num,0
if>Num=1
gosub>Autolog
endif
END>NewWin
SRT>Autolog
mdl>Autolog
wait>1
ifwindowopen>%NewWin_title%
closewindow>%NewWin_title%
endif
skiplabel>end_macro
End>Autolog
If I run the above script and then open or switch to an Internet Explorer window, the NewWin subroutine and Autolog subroutines get executed as expected. However the last command in the Autolog SRT, SkipLabel>, does not pass control to label>end_macro as it should ???
If I move the 3 lines of code starting with label>end_macro to the bottom of the script, after the End>Autolog command, then the SkipLabel> command is excuted properly ?!

My setup: Windows 7 Pro x64, Macro Scheduler 12.0.3