Jump to content

Waiting For Multiple Windows


Guest johnc
 Share

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.

Link to comment
Share on other sites

  • Developers

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.
  :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...