sondo2121 Posted November 9, 2006 Share Posted November 9, 2006 (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 November 9, 2006 by sondo2121 Link to comment Share on other sites More sharing options...
herewasplato Posted November 9, 2006 Share Posted November 9, 2006 ...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] Link to comment Share on other sites More sharing options...
Blue_Drache Posted November 9, 2006 Share Posted November 9, 2006 I am trying to make an automated install program and when I use the autoIt info tool and get:Control ID: 10ClassNameNN: Button4How do I check that button, and then click 'Next' Which is:Control ID: 3ClassNameNN: Button1ThanksEDIT: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 nulSame 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 More sharing options...
sondo2121 Posted November 9, 2006 Author Share Posted November 9, 2006 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" ) Link to comment Share on other sites More sharing options...
Developers Jos Posted November 9, 2006 Developers Share Posted November 9, 2006 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 More sharing options...
sondo2121 Posted November 9, 2006 Author Share Posted November 9, 2006 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 More sharing options...
sondo2121 Posted November 9, 2006 Author Share Posted November 9, 2006 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 More sharing options...
Developers Jos Posted November 9, 2006 Developers Share Posted November 9, 2006 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" ) EndFuncMaybe 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 More sharing options...
rbhkamal Posted November 9, 2006 Share Posted November 9, 2006 (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 November 9, 2006 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 More sharing options...
sondo2121 Posted November 9, 2006 Author Share Posted November 9, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now