Sign in to follow this  
Followers 0
st4vr0s

Windows without titles

8 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

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]")

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

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