Jump to content

Recommended Posts

Posted

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

Posted

Try using AdlibEnable and in the function put something like

if 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

Posted (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 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.

 

Posted

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

<{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

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
  • Recently Browsing   0 members

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