Jump to content
Sign in to follow this  
crislet01

Button selection

Recommended Posts

crislet01

Another simple question from a simple person.

I have a menu gui with "reboot now" and "no reboot". I would like to select "No reboot" then select the "Finish" button. I can get the "Finish to work but not to select the button I desire. Could you please assist.

WinWait("InstallShield Wizard")

WinWaitActive("InstallShield Wizard")

ControlCommand("InstallShield Wizard", "", "503", "check", "")

;ControlClick("InstallShield Wizard","","503")

Niether Controlclick nor ControllCommand work for control ID503 (Button2)

Many thanks in advance

Share this post


Link to post
Share on other sites
FireLord

Another simple question from a simple person.

I have a menu gui with "reboot now" and "no reboot". I would like to select "No reboot" then select the "Finish" button. I can get the "Finish to work but not to select the button I desire. Could you please assist.

WinWait("InstallShield Wizard")

WinWaitActive("InstallShield Wizard")

ControlCommand("InstallShield Wizard", "", "503", "check", "")

;ControlClick("InstallShield Wizard","","503")

Niether Controlclick nor ControllCommand work for control ID503 (Button2)

Many thanks in advance

No code?


[center]See the Helpfile[/center]
While Alive()
	 DrinkWine();
}
[center][/center]

Share this post


Link to post
Share on other sites
Jos

try: ControlClick("InstallShield Wizard","",503)

:P

No code?

Don't be Smart-ass ... Edited by Jos

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

Share this post


Link to post
Share on other sites
crislet01

Thanks Jos but I tried :-

WinWait("InstallShield Wizard")

WinWaitActive("InstallShield Wizard")

ControlClick("InstallShield Wizard","",503)

But it still will not select the "no reboot". The reboot is still selected.

Regards

Share this post


Link to post
Share on other sites
Jos

Thanks Jos but I tried :-

WinWait("InstallShield Wizard")

WinWaitActive("InstallShield Wizard")

ControlClick("InstallShield Wizard","",503)

But it still will not select the "no reboot". The reboot is still selected.

Regards

can you copy paste the info that is shown by au3info for that button in here so we can see the info for that button ?

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

Share this post


Link to post
Share on other sites
SmOke_N

Thanks Jos but I tried :-

WinWait("InstallShield Wizard")

WinWaitActive("InstallShield Wizard")

ControlClick("InstallShield Wizard","",503)

But it still will not select the "no reboot". The reboot is still selected.

Regards

Hi, welcome to the forum...

Are you sure you have the right controlID?

Try using the rigth instance of the classnameNN, in this case it would look something like "Button2" or "Button1".

If that doesn't work, try using ControlSend() + {TAB} to tab to the button.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
crislet01

Here is the info requested. many thanks again for your time.

>>>> Window <<<<

Title: InstallShield Wizard

Class: #32770

Position: 511, 10

Size: 504, 381

Style: 0x94C000C4

ExStyle: 0x00010101

>>>> Control <<<<

Class: Button

Instance: 2

ClassnameNN: Button2

ID: 503

Text: No, I will restart my computer later.

Position: 176, 171

Size: 297, 20

ControlClick Coords: 69, 8

Style: 0x50000009

ExStyle: 0x00000004

>>>> Mouse <<<<

Position: 759, 213

Cursor ID: 2

Color: 0x424542

>>>> StatusBar <<<<

>>>> Visible Text <<<<

Yes, I want to restart my computer now.

No, I will restart my computer later.

< &Back

Finish

Cancel

InstallShield Wizard has finished performing maintenance operations on AGFA IMPAX 5.2 SP3.

Remove any disks from their drives, and then click Finish to complete setup.

Share this post


Link to post
Share on other sites
crislet01

Chaps,

Managed to figure it out with a lot of googling...........

WinWaitActive("InstallShield Wizard")

If Not WinActive("InstallShield Wizard","") Then WinActivate("InstallShield Wizard","No, I will restart my computer later.")

WinWaitActive("InstallShield Wizard","No, I will restart my computer later.")

ControlClick("InstallShield Wizard","No, I will restart my computer later.","[CLASSNN:Button2]")

Regards

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  

×