Sign in to follow this  
Followers 0
Ritz

Confirm dialogs?

3 posts in this topic

Hi, I have a window that I want to do the following sequence:

MouseClick("left", $X, $Y)
    Sleep(2000)
    $ctrlText = ControlGetText('Do you want to do this?','', 65535)
    MsgBox (0, "Ctrl text", $ctrlText)

However, it's not getting the appropiate text of the control. It's a simple confirm dialog (i.e. OK/Cancel buttons) that the parent window spawns when I click ($x,$y), and I tried using WinExists but that doesn't find it either.

How can I get my script to press the OK/Cancel buttons, and find the text that was in the window?

Share this post


Link to post
Share on other sites



if i recall...

try

Send("{TAB}")

Send("{ENTER}")

should close it... but not "read" the text

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

if i recall...

try

Send("{TAB}")

Send("{ENTER}")

should close it... but not "read" the text

8)

Well it's not always going to pop up like that though, and there is another dialog of the same name that occassionally follows. So the situation is like this:

1. You click (x,y).

2. 50% of the time, a dialog with title "Dialog" pops up.

3. You click OK.

4. Regardless of if 2 occurred or not, another diaglog pops up--also with title "Dialog", but different with text

5. You click OK.

6. Done.

Share this post


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
Sign in to follow this  
Followers 0