Jump to content

Controlclick


Recommended Posts

Hi all,

I have a script that sometimes goes wrong for several reason and so it makes an error window like this

AutoIt Error

Line 1247 (File"C:\...\inclue..

Error: the requested action with tihis object has failed.

OK

I tried to attach the image but I didn't manage it

now I want to do a script that click on "OK" in that window,

this is my code,

if WinExists("AutoIt Error","OK") Then

ControlClick("Autoit Error","OK","[CLASS:Button; INSTANCE:1]","left",1)

EndIf

I tried several times to change ID and I can not make it work,

is there anyone who can tell me where i'm wrong please?

Edited by scooper
Link to comment
Share on other sites

Hi all,

I have a script that sometimes goes wrong for several reason and so it makes an error window like this

AutoIt Error

Line 1247 (File"C:\...\inclue..

Error: the requested action with tihis object has failed.

OK

I tried to attach the image but I didn't manage it

now I want to do a script that click on "OK" in that window,

this is my code,

if WinExists("AutoIt Error","OK") Then

ControlClick("Autoit Error","OK","[CLASS:Button; INSTANCE:1]","left",1)

EndIf

I tried several times to change ID and I can not make it work,

is there anyone who can tell me where i'm wrong please?

Try this:

if WinExists("AutoIt Error", "") = 1 Then

ControlClick("Autoit Error", "", "[CLASS:Button; INSTANCE:1]")

A lot of the time, it can't the 'text' part of the box. Less is more >_<

Link to comment
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
 Share

  • Recently Browsing   0 members

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