Sign in to follow this  
Followers 0
Wolfshare

Solve problem without problem title

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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?

1 person likes this

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

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

Share this post


Link to post
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!

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Sorry, but the title didn't get better ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0