Wolfshare Posted July 13, 2013 Share Posted July 13, 2013 (edited) Hey, i would like to make my bot sucessfully work, now i have done it with sleep option: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <FF.au3> Opt("WinTitleMatchMode", 2) sleep(15000) WinActivate("StrongVPN Client - 1.2.2+35c10f") Send("{ENTER}") sleep(50000) WinActivate("StrongVPN Client - 1.2.2+35c10f") ControlClick("StrongVPN Client - 1.2.2+35c10f", "", "[CLASS:WindowsForms10.BUTTON.app.0.33c0d9d]") sleep(3000) run("C:\Documents and Settings\Administrator\Desktop\SCRIPT.exe") after it clicks enter, then it sleeps 50 seconds because afteter i run this script internet sometimes not working sucessfully, so after 50 seconds it activating StrongVPN and clicks on connect, but sometimes i am keep getting this error: because of internet connection, i dont know how to make this part work sucessfully...This error appear after ControlClick("StrongVPN Client - 1.2.2+35c10f", "", "[CLASS:WindowsForms10.BUTTON.app.0.33c0d9d]") But not every time! And other thing is after it clicks connect sometimes its stucks on Connecting, to solve it it have just click disconnect and click connect again using same control click command.. So those two things which i dont know how to make untill my program will work propertly! Edited July 15, 2013 by Wolfshare Link to comment Share on other sites More sharing options...
water Posted July 13, 2013 Share Posted July 13, 2013 Wolfshare, is this the same problem as you already posted here? " title="View Topic">Solve problem without problem title" My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Wolfshare Posted July 13, 2013 Author Share Posted July 13, 2013 One thing is the same, and other is not. Link to comment Share on other sites More sharing options...
0xdefea7 Posted July 14, 2013 Share Posted July 14, 2013 Thank you for posting your IP for us all to see You might want to edit your pics in the future. Some less than savory folks might try to do something to you for being so careless. Check if the window exists before calling that function. Use WinExists function to do that. Link to comment Share on other sites More sharing options...
Wolfshare Posted July 15, 2013 Author Share Posted July 15, 2013 Okay i have tried this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <FF.au3> Opt("WinTitleMatchMode", 2) sleep(15000) WinActivate("StrongVPN Client - 1.2.2+35c10f") Send("{ENTER}") sleep(30000) WinActivate("StrongVPN Client - 1.2.2+35c10f") ControlClick("StrongVPN Client - 1.2.2+35c10f", "", "[CLASS:WindowsForms10.BUTTON.app.0.33c0d9d]") if NOT WinActivate("","An error in the VPN connection has occured.") Then sleep(3000) run("C:\Documents and Settings\Administrator\Desktop\SCRIPT.exe") ElseIf WinActivate("StrongVPN Client - 1.2.2+35c10f") Then Send("{ENTER}") endIf It just once check if this error exist, and solve them if it is, but only once, it could appear few times.. and i dont know how to make run SCRIPT.exe after VPN status is connected... 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