Jump to content
Sign in to follow this  
Guest johnc

Waiting For Multiple Windows

Recommended Posts

Guest johnc

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

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest johnc
: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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...