Sign in to follow this  
Followers 0
Guest johnc

Waiting For Multiple Windows

3 posts in this topic

Is there a way to stop script processing until one of two screens become active. Looking at the Winwaitactive command it only accepts 1 screen, how can I define 2 or more? My logic would be to wait for screen1 or screen2 and execute different paths of logic if one or the other should come up. I hope I'm making myself clear.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

you could just retrieve the active window title and test that..

something like:

loop:
WinGetActiveTitle, ActWin
IfEqual, ActWin, window title 1, Goto, Win1Found
IfEqual, ActWin, window title 2, Goto, Win2Found
Sleep, 500
Goto, Loop
;
Win1Found:
; do here what you want to do for window 1
goto, loop
;
Win2Found:
; do here what you want to do for window 2
goto, loop
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
:whistle: Thanks a lot guys both worked flawlessly....I new I could come here to get an answer.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0