Jump to content

Solve problem without problem title


Recommended Posts

Hello everyone, now i have done my script, but it works, but not everytime because of the software which is in my picture:

ix1l.png

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 by Wolfshare
Link to comment
Share on other sites

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?

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)

userbar.png

Link to comment
Share on other sites

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!

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

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 :o will try this, thanks

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...