wisem2540 Posted May 21, 2013 Share Posted May 21, 2013 (edited) So simple, yet I cannot get it to work Do Sleep (500) ; wait until either account exists error or Userlist meaning account created successfully or window to close Until WinActive ("Message") or WinActive ("SWAT", "http://synapsedc/swat/userList.asp") or WinClose ("SWAT") If WinActive ("Message") Then ; if account exists WinWaitClose ("Message"); Wait until user dismisses it _IEQuit ($oIE); Quit IE EndIf; loop continues If WinActive ("SWAT", "http://synapsedc/swat/userList.asp") Then MsgBox (0, "test". "Yes"); if this window appears, account created successfully If WinClose ("swat") Then Exit The first one works fine. It sees the "message" window and does what its supposed to do. The other 2, which are looking for IE windows, like the one below, do not seem to work. >>>> Window <<<< Title: SWAT - Windows Internet Explorer provided by *** Class: IEFrame Position: 470, 207 Size: 800, 570 Style: 0x16CF0000 ExStyle: 0x00000100 Handle: 0x00C1085E >>>> Control <<<< Class: Internet Explorer_Server Instance: 1 ClassnameNN: Internet Explorer_Server1 Name: Advanced (Class): [CLASS:Internet Explorer_Server; INSTANCE:1] ID: Text: Position: 0, 139 Size: 792, 374 ControlClick Coords: 314, 64 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x00CA0BAC >>>> Mouse <<<< Position: 314, 203 Cursor ID: 0 Color: 0x336699 >>>> StatusBar <<<< 1: http://synapsedc/swat/reports.asp 2: 3: 4: 5: 6: 7: 8: 9: 10: >>>> ToolsBar <<<< >>>> Visible Text <<<< Navigation Barhttp://synapsedc/swat/userList.asp Address Combo Control Page Control Live Search Search Combo Control Search Control Command Bar Favorites Command Bar LinksBand Favorites Bar Add to Favorites Bar ITBarHost Menu Bar SWAT - Windows Internet Explorer provided by ***http://synapsedc/swat/reports.asp Zoom Level Your current security settings put your computer at risk. Click here to change your security settings... >>>> Hidden Text <<<< Live Search Edited May 21, 2013 by wisem2540 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 21, 2013 Moderators Share Posted May 21, 2013 Hi, wisem2540. Have you tried setting the WinTitleMatchMode differently, to see if that could be the issue? For IE windows I often set it to 2 so it will match any substring in the title, rather than trying to match from the beginning. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
wisem2540 Posted May 21, 2013 Author Share Posted May 21, 2013 It it helps at all, I put just these two lines in a script WinWaitActive ("SWAT", "http://synapsedc/swat/userList.asp") MsgBox (0, "test", "Yes"); if this window appears, account created successfully, exit IE and continue loop Then if I manually browse to the URL, I get the msgbox. So I know its seeing the window. Could there be something else? Link to comment Share on other sites More sharing options...
wisem2540 Posted May 21, 2013 Author Share Posted May 21, 2013 For some reason, I think its working now. I dont know why... But I did take out Winclose... ill experiment with that some more... Link to comment Share on other sites More sharing options...
wisem2540 Posted May 21, 2013 Author Share Posted May 21, 2013 Everything works fine, until I add winclose back in. It doesnt seem to like that. Any advice? Link to comment Share on other sites More sharing options...
wisem2540 Posted May 21, 2013 Author Share Posted May 21, 2013 Here is the latest code I have tried. If not winexist is not working either Do Sleep (500) ; wait until either account exists error or Userlist meaning account created successfully or window to close Until winActive ("Message") or WinActive ("SWAT", "http://synapsedc/swat/userList.asp") or Not WinExists ("SWAT") If WinActive ("Message") Then ; if account exists WinWaitClose ("Message"); Wait until user dismisses it _IEQuit ($oIE); Quit IE ContinueLoop EndIf; loop continues If WinActive ("SWAT", "http://synapsedc/swat/userList.asp") Then _IEQuit ($oIE); if this window appears, account created successfully, exit IE ContinueLoop ;continue loop EndIf If Not WinExists ("swat") Then Exit Link to comment Share on other sites More sharing options...
wisem2540 Posted May 21, 2013 Author Share Posted May 21, 2013 Do Sleep (500) ; wait until either account exists error or Userlist meaning account created successfully or window to close Until WinActive ("SWAT", "http://synapsedc/swat/userList.asp") or WinActive ("Message") or WinExists ("SWAT") = 0 If WinActive ("Message") Then ; if account exists WinWaitClose ("Message"); Wait until user dismisses it _IEQuit ($oIE); Quit IE ContinueLoop EndIf; loop continues If WinActive ("SWAT", "http://synapsedc/swat/userList.asp") Then _IEQuit ($oIE); if this window appears, account created successfully, exit IE ContinueLoop ;continue loop EndIf ;If WinActive ("Untitled") Then MsgBox (0, "yes", "yes") If Not WinExists ("swat") Then Exit this seems to work 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