Jump to content

Recommended Posts

Posted

Hi there, This is my first ever AutoIT script, and my programming ability is pretty basic. I've searched around, but couldn't find the right thread.

I am trying to update an application on multiple computers by using AutoIT to log into the application which will trigger an automatic download of the update.

Currently the script is logging into the application but then the application is terminated for an unknown reason leaving the session logged in. (The update seems to have install correctly though)

Because of this hung session, the next login will have a prompt asking if you would like to disconnect the previous session or not.

What I'm trying to do is build an if statement into my script that can detect this prompt/"pop up" and just press OK to end the previous session.

Something like this is all i need.

IF the active window is = "SYSPRO Logon"

Then

send ("{TAB}")

send ("{enter}")

Else continue on with the script.

If someone can give me a hand with the correct syntax or point me to a similar thread (that I couldn't seem to find) I'd really appreciate it.

Thanks

Q

Posted

I would recommend you look up AdLibEnable() in the help file. It should provide exactly what you're looking for.

Jarvis

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Posted

just figured it out on my own...(Thanks for the quick reply Jarvis!)

IF 0 == WinExists ("SYSPRO Login") then

sleep(1000)

send ("{TAB}")

Send ("{enter}")

EndIf

Posted

Thanks for supplying the code back to us so others can see how you solved your issue. You can optionally surround your code in [autoit ] [ /autoit] tags (minus the spaces), and it will make nice little code boxes with colored syntax.

As to your if statement, I would recommend you remove "0 ==", and it should still work just fine.

Thanks,

Jarvis

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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
×
×
  • Create New...