Sign in to follow this  
Followers 0
sondo2121

Sending A Button

10 posts in this topic

#1 ·  Posted (edited)

I am trying to make an automated install program and when I use the autoIt info tool and get:

Control ID: 10

ClassNameNN: Button4

How do I check that button, and then click 'Next' Which is:

Control ID: 3

ClassNameNN: Button1

Thanks

EDIT:

I think i know how to check a box or radio button, but how to i click the 'next button'...i know how to do it with the ALT+N way, but i'd like to do it in the ControlCommand if possible.

Edited by sondo2121

Share this post


Link to post
Share on other sites



...I think i know how to check a box or radio button,...

ControlSend the "+" character.

...but how to i click the 'next button'

ControlClick

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

I am trying to make an automated install program and when I use the autoIt info tool and get:

Control ID: 10

ClassNameNN: Button4

How do I check that button, and then click 'Next' Which is:

Control ID: 3

ClassNameNN: Button1

Thanks

EDIT:

I think i know how to check a box or radio button, but how to i click the 'next button'...i know how to do it with the ALT+N way, but i'd like to do it in the ControlCommand if possible.

controlclick($window, $text, "Button1", $mouse_button, $number_of_clicks)

$text can be nul

Same idea is used to click a radio button or checkmark.

controlclick($window, $text, "Radio1", $mouse_button, $number_of_clicks)


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

This is what i'm doing, and it still isn't working

Func AdAware_Install()

Local $path = "\\***.***.42.137\programs$\PC\AdAware\Adaware SE Personal V1.06.exe"

Run($path)

ControlClick ( "Ad-Aware SE Personal", "", "Button1" )

Share this post


Link to post
Share on other sites

This is what i'm doing, and it still isn't working

Func AdAware_Install()

Local $path = "\\***.***.42.137\programs$\PC\AdAware\Adaware SE Personal V1.06.exe"

Run($path)

ControlClick ( "Ad-Aware SE Personal", "", "Button1" )

You need ro wait for the program to start and the Window to appear ... add a WinWait()

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

This is what i'm doing, and it still isn't working

Func AdAware_Install()

Local $path = "\\***.***.42.137\programs$\PC\AdAware\Adaware SE Personal V1.06.exe"

Run($path)

ControlClick ( "Ad-Aware SE Personal", "", "Button1" )

I tried winwaitactive and winwait and it still doesn't work.

I know i have the correct Button, and that it should work, should I be using ControlFocus at all?

Share this post


Link to post
Share on other sites

I had it sleep for 5 seconds and it appears to be working now? Why wouldn't WinWait work?

Code now:

Func AdAware_Install()
Local $path = "\\***.***.42.137\programs$\PC\AdAware\Adaware SE Personal V1.06.exe"
Run($path)
Sleep(5000)
WinWait( "Ad-Aware SE Personal", "")
ControlClick ( "Ad-Aware SE Personal", "", "Button1" )

EndFunc

Share this post


Link to post
Share on other sites

I had it sleep for 5 seconds and it appears to be working now? Why wouldn't WinWait work?

Code now:

Func AdAware_Install()
Local $path = "\\***.***.42.137\programs$\PC\AdAware\Adaware SE Personal V1.06.exe"
Run($path)
Sleep(5000)
WinWait( "Ad-Aware SE Personal", "")
ControlClick ( "Ad-Aware SE Personal", "", "Button1" )

EndFunc
Maybe the control doesn't get activate right away ....

You can test for that with:

ControlCommand( "Ad-Aware SE Personal", "", "Button1" ,"IsEnabled", "")

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Maybe the control doesn't get activate right away ....

You can test for that with:

ControlCommand( "Ad-Aware SE Personal", "", "Button1" ,"IsEnabled", "")oÝ÷ Ûú®¢×®¥êì¢v¥{^®'§qâ,º²ÛajܨºÚò¶¬y«­¢+Ø)]¥¹Ñ¥ÙÑ ¤)]¥¹]¥ÑÑ¥Ù ¤(

Because I had the same problem with controlClick()

just a thought.

RK

Edited by rbhkamal

"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

Share this post


Link to post
Share on other sites

Alright i figured it out, thanks for you help..

it just so happens that the 1st box that you see is the classic blue WISE install box...that has the same title as the one i was looking for therefore it was returning 0.

i have corrected my code, thanks.

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