Anaxibius Posted May 5, 2006 Share Posted May 5, 2006 (edited) I am having some trouble that I can't seem to find a solution to. I have a script where I need to pass some mouse movements, but the window I need it done on never gets past the WinWaitActive portion of the script below. Run($Source & "\VIMSpc\VIMS\setup.exe /s") WinWait("VIMS Import") MsgBox(0,"Debug","Window Exists") If Not WinActive("VIMS Import") Then WinActivate("VIMS Import") MsgBox(0,"Debug","Window Exists") $Wait = WinWaitActive("VIMS Import",10) If $Wait > 0 Then BlockInput(1) MouseMove(131,45) MouseDown("left") MouseUp("left") BlockInput(0) Sleep(1000) EndIf EndIf _FileWriteLog($Source & "\Installation Logs\VIMSpc.log", @ComputerName) Exit I even threw in a line as follows below the WinWait command to see if it was flipping out after the Window was created: $test = WinExists("VIMS Import") MsgBox(0,"Debug",$Test) Both MsgBox lines show up, but it just hangs on the WinWaitActive line and does nothing. The timeout doesn't even appear to be working. Am I missing something obvious? Edited May 5, 2006 by Anaxibius Link to comment Share on other sites More sharing options...
MHz Posted May 5, 2006 Share Posted May 5, 2006 (edited) The text parameter is missing on the WinWaitActive Run($Source & "\VIMSpc\VIMS\setup.exe /s") WinWait("VIMS Import") MsgBox(0,"Debug","Window Exists") If Not WinActive("VIMS Import") Then WinActivate("VIMS Import") MsgBox(0,"Debug","Window Exists") $Wait = WinWaitActive("VIMS Import", "", 10) If $Wait > 0 Then BlockInput(1) MouseMove(131,45) MouseDown("left") MouseUp("left") BlockInput(0) Sleep(1000) EndIf _FileWriteLog($Source & "\Installation Logs\VIMSpc.log", @ComputerName) Exit Edit: Removed an extra Endif in the code as well. Edited May 5, 2006 by MHz Link to comment Share on other sites More sharing options...
Anaxibius Posted May 5, 2006 Author Share Posted May 5, 2006 Isn't the text component optional? According to the Help file it is, but I will give it a shot. Link to comment Share on other sites More sharing options...
MHz Posted May 5, 2006 Share Posted May 5, 2006 You have to specify the text parameter if you use the timeout parameter that comes after it. Link to comment Share on other sites More sharing options...
Anaxibius Posted May 5, 2006 Author Share Posted May 5, 2006 (edited) That did it. Thanks a lot. Edited May 5, 2006 by Anaxibius 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