Jump to content

Recommended Posts

Posted

Hi Guys,

I'm still getting my head around Autoit.

Not doing too bad so far but have run into a problem.

I am trying to click a button in a window that doesn't have a title.

Here is a screenie of what I'm trying to do.

post-34124-1212762132_thumb.jpg

I'll apoligise in advance if I'm being a n00b :)

Thanks

Posted (edited)

Try this:

I'm leaving the title blank but then declare the text insted.

ControlClick("","Drivers has been updated Succesfully.","Button1","left",1)

Regards

EDIT: You could also just use the class like this:

ControlClick("[CLASS:#32770]","","Button1","left",1)
Edited by newbiescripter
Posted (edited)

Try this:

I'm leaving the title blank but then declare the text insted.

ControlClick("","Drivers has been updated Succesfully.","Button1","left",1)

Regards

The controlclick command worked beautifully, however I need to put a winwait, winactivate, winwaitactive in there somehow to make it wait while installing drivers.

Thanks

Edited by st4vr0s
Posted

The controlclick command worked beautifully, however I need to put a winwait, winactivate, winwaitactive in there somehow, while it is installing drivers??

Thanks

Use the class of the window then like this:

WinWaitActive("[CLASS:#32770]")
Posted

Yeah I thought that should do the trick but it doesn't work. Is it possible to add visible text to the line so that it can wait then controlclick?

Posted

Tried a few options including,

Run ("C:\WinTVCD 4_4\HcwDriverInstall.exe")

WinWait ("","[CLASS:#32770]","Drivers have been updated Successfully")

WinWaitActive ("","[CLASS:#32770]","Drivers have been updated Successfully")

WinActivate ("","Drivers have been updated Successfully")

ControlClick ("","Drivers have been updated Successfully","Button1","left",1)

Still no joy.

Only way so far which is a little crude is ..

Run ("C:\WinTVCD 4_4\HcwDriverInstall.exe")

Sleep(30000)

ControlClick ("","Drivers have been updated Successfully","Button1","left",1)

Any suggestions?

Thanks

Posted

Try this:

;Using the text of the control

Do
Sleep(200)
Until ControlCommand("","Drivers has been updated Succesfully.","Button1","IsVisible","")

ControlClick("","Drivers has been updated Succesfully.","Button1","left",1)

; using the class of the window

Do
Sleep(200)
Until ControlCommand("[CLASS:#32770]","","Button1","IsVisible","")

ControlClick("[CLASS:#32770]","","Button1","left",1)

I would use the last one I think..

Regards

Posted

newbiescripter,

Second one worked a treat, will add it to the deployment box to see if it works in a task sequence.

Many thanks for the assistance!

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
×
×
  • Create New...