Quinton Posted August 11, 2009 Share Posted August 11, 2009 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 Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 11, 2009 Share Posted August 11, 2009 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) Link to comment Share on other sites More sharing options...
Quinton Posted August 11, 2009 Author Share Posted August 11, 2009 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 Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 11, 2009 Share Posted August 11, 2009 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) Link to comment Share on other sites More sharing options...
Quinton Posted August 17, 2009 Author Share Posted August 17, 2009 Thanks for the tip Jarvis. I just got back from a few days of vacation so I'm a bit late on the reply >_< Q 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