Jump to content

Sending A Button


Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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()

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

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

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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

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

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...