v1rtu0s1ty Posted July 20, 2005 Posted July 20, 2005 Hi guys, I was able to use autoit to login to a stand alone app. However, I'm putting this kind of scenario. I would like to get notified in case this issue happens: 1. autoit executes the thick app and populates the username/password and hits Ok button 2. Thick app responds with a msgbox containing an error such as MSSQL server unavailable or ODBC error and so on. How will I be able to capture the message in that message box? If there were no errors, there will be no msgboxes and autoit will happily send ALT F + X Please let me know guys! Thanks, Neil
GaryFrost Posted July 21, 2005 Posted July 21, 2005 Try using AdlibEnable and in the function put something like if winexists("title","text") then Winactivate("title","text") Send("{Enter}") endif SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
v1rtu0s1ty Posted July 21, 2005 Author Posted July 21, 2005 Try using AdlibEnable and in the function put something likeif winexists("title","text") then Winactivate("title","text") Send("{Enter}")endif<{POST_SNAPBACK}>Hi gafrost,I don't think you understood my question. I'm sorry if I wasn't clear. I actually don't want to activate a window.What I want is to capture the error text/string/message contained in the msgbox that popped up. Then either have that string written to a file somewhere on the harddrive.Is this possible?Thanks,Neil
GaryFrost Posted July 21, 2005 Posted July 21, 2005 (edited) more than likely yes, if you know what the window title is and the control that has the text for example: if WinExists("title") $text = controlgettext("title","","Static1") ; do what you want with text endif Edited July 21, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
v1rtu0s1ty Posted July 21, 2005 Author Posted July 21, 2005 more than likely yes, if you know what the window title is and the control that has the textfor example:if WinExists("title") $text = controlgettext("title","","Static1") ; do what you want with textendif<{POST_SNAPBACK}>in your example then, the name of the control is Static1?Now, I need to hope that I will be able to get the name of the control on the window I want to work with.I'll keep you posted.Thanks,Neil
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