strate Posted January 11, 2006 Share Posted January 11, 2006 I have a program that I want to work only when a user has a window from a list of windows active. It is a program that will log the keypunches and screen images of the pc in use. I don't want it to log activity from other windows though, make sense? I'd like it to pause execution of the loop until one of the windows is active. I know this is easy I'm just being stupid. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
John Posted January 12, 2006 Share Posted January 12, 2006 I have a program that I want to work only when a user has a window from a list of windows active. It is a program that will log the keypunches and screen images of the pc in use. I don't want it to log activity from other windows though, make sense? I'd like it to pause execution of the loop until one of the windows is active. I know this is easy I'm just being stupid. While 1 If winactive($prog) then spyit() sleep(100) wend Link to comment Share on other sites More sharing options...
strate Posted January 12, 2006 Author Share Posted January 12, 2006 Opt("WinTitleMatchMode", 2) #include <Array.au3> Dim $TESTARRAY[3] $TESTARRAY[1] = 'Calculator' $TESTARRAY[2] = 'Microsoft Excel' While 1 $Pos=_ArraySearch($TESTARRAY,WinGetTitle('','')) If $Pos = '' Then ToolTip($Pos&' Paused 1') While 2 $Pos = _ArraySearch($TESTARRAY,WinGetTitle('','')) ToolTip(WinGetTitle('','')&' Paused 2') If $Pos <> '' Then ExitLoop EndIf Sleep(10) WEnd EndIf ToolTip(WinGetTitle('','')&' Not Paused') Sleep(10) WEnd This is it almost I need to do a little work on the title matching, help would be great. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now