Posts: 7
Threads: 4
Joined: Mar 2008
How would I make my macro return to a certain line(the top) or close all windows and restart macro if a window was not active/workoffline page and then continue on if it comes up...
i know it' would be something like...
ifa act continue on
ifa- then goto line....
any help?
thanks!
Ashton
Posts: 576
Threads: 97
Joined: Aug 2007
Something like this?
;top
if(IsWindowVisible(win("window name")))
,goto top
Posts: 473
Threads: 33
Joined: Aug 2007
If you're wanting if statement to work with active window, use ifa.
Macro ( Macro92 )
;top
ifa "Notepad" ;;If Notepad is active
,out "Notepad is active."
else
,goto top
For more help you should refer back to the QM Reference and search for "ifa".
Taking on Quick Macros one day at a time
Posts: 7
Threads: 4
Joined: Mar 2008
Thanks! but how would i get it to goto a certain line in the script rather than just to the top?
Posts: 1,338
Threads: 61
Joined: Jul 2006
top is a label in the example to make it go to a specific line right about the line create a label then use a goto statement and use label u created
;top <-----this is a label
ifa "Notepad" ;;If Notepad is active
,out "Notepad is active."
else
,goto next ;;<----this is how u make it skip to the label
;some code..
;more code..
;next <-------this is also label
;this is how code should look in qm
;top
ifa "Notepad" ;;If Notepad is active
,out "Notepad is active."
else
,goto next
;some code..
;more code..
;next
out "Notepad is not active"
;to paste into qm copy here and use paste escaped(it can be found either in the edit menu under other formats or by right clicking the code area in qm)