Wolfshare Posted July 10, 2013 Share Posted July 10, 2013 (edited) Hello everyone, now i have done my script, but it works, but not everytime because of the software which is in my picture: So, sometimes i am getting this error, and i dont know how to make loop, that could check if this error exist, or not, because there isnt any title or anything, maybe with the class, but there isnt any title.. now i am using two scripts: First runing this one: #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]") sleep(3000) run("C:\Documents and Settings\Administrator\Desktop\SCRIPT.exe") sleep(55000) if NOT WinExists("Mixxx - The Virtual DJ - Mozilla Firefox") Then WinActivate("StrongVPN Client - 1.2.2+35c10f") sleep(1000) MouseClick("left", 403, 342, 1, 0) ; Accept WinActivate("StrongVPN Client - 1.2.2+35c10f") sleep(1000) MouseClick("left", 403, 342, 1, 0) ; Accept WinActivate("StrongVPN Client - 1.2.2+35c10f") sleep(1000) MouseClick("left", 403, 342, 1, 0) ; Accept WinActivate("StrongVPN Client - 1.2.2+35c10f") ControlClick("StrongVPN Client - 1.2.2+35c10f", "", "[CLASS:WindowsForms10.BUTTON.app.0.33c0d9d]") sleep(9000) WinActivate("Firefox") ProcessClose("FileIce.exe") run("C:\Documents and Settings\Administrator\Desktop\SCRIPT.exe") endif Which are runing VPN software, then it runs my main and primary script, but i wish to make it correctly run vpn first without any error then just run my primary scrip.. Above is what i tried to do, but i am keep getting this error still... Edited July 10, 2013 by Wolfshare Link to comment Share on other sites More sharing options...
TheSaint Posted July 10, 2013 Share Posted July 10, 2013 Have you tried AutoIt's Window Info Tool on that error dialog? I haven't tried myself, but you may also be able to just provide the text, without a Window Title. If WinExists("", "An error in the VPN connection has occurred.") Then You may also be able to use Last active window? Wolfshare 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
water Posted July 10, 2013 Share Posted July 10, 2013 BTW: Could you please give your thread a meaningful title? Everyone on this forum has a problem and is seeking for help - except those providing help A meaningful title helps users decide if it is worth to open the thread and read the posts. So it is a big time saver! TheSaint 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Wolfshare Posted July 10, 2013 Author Share Posted July 10, 2013 Have you tried AutoIt's Window Info Tool on that error dialog? I haven't tried myself, but you may also be able to just provide the text, without a Window Title. If WinExists("", "An error in the VPN connection has occurred.") Then You may also be able to use Last active window I have never tried check if winexist without title will try this, thanks Link to comment Share on other sites More sharing options...
water Posted July 10, 2013 Share Posted July 10, 2013 Sorry, but the title didn't get better My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki 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