Jump to content

Recommended Posts

Hi all, new here love the AutoIT, and looking for some guidance.

I am writing a script for an application that runs on multiple computers and I would like to interact with a pop up box that comes up.  Problem is that the window comes up with no title and the Class changes from computer to computer, so if I use the class, it would need to be customized for each computer.  I would like to initiate action based on the visible text in the window, but am not having luck.  Here is what I have, I cannot get the If Winexists to be true and therefore execute the controlclick on NAME:btnOk


If WinExists("[TITLE:]", "The Client is having a problem updating one or more status monitors.") Then
   ;$update = True
   MsgBox ($MB_OK, "update", "update")
   ControlClick("","The Client is having a problem updating one or more status monitors.*", "[NAME:btnOk]")
    MsgBox($MB_OK, "update", "update sleeping")


Here is the output from the window info tool:


>>>> Window <<<<
Class:    WindowsForms10.Window.8.app.0.5c39d4_r31_ad1
Position:    0, 0
Size:    518, 202
Style:    0x16800000
ExStyle:    0x00010101
Handle:    0x000308A4

>>>> Control <<<<
Class:    WindowsForms10.Window.8.app.0.5c39d4_r31_ad1
Instance:    1
ClassnameNN:    WindowsForms10.Window.8.app.0.5c39d4_r31_ad11
Name:    btnOk
Advanced (Class):    [NAME:btnOk]
ID:    67822
Text:    OK
Position:    219, 151
Size:    75, 23
ControlClick Coords:    46, 10
Style:    0x56010000
ExStyle:    0x00000000
Handle:    0x000108EE

>>>> Mouse <<<<
Position:    268, 164
Cursor ID:    0
Color:    0xECECEC

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
The Client is having a problem updating one or more status monitors. Please report this issue immediately to your system administrator before proceeding.

Note for the system administrator, please create an Error Report.

Once the Error Report has been created, we strongly recommend that you log out, exit the client, and log in again to ensure correct status monitor operation.

>>>> Hidden Text <<<<

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

    No registered users viewing this page.

  • Create New...