Jump to content

Is it possible to click on a radio?


Zerocool
 Share

Recommended Posts

Opt("WinTitleMatchMode",4)

$handle=WinGetHandle("classname=MsiDialogCloseClass","")
If @error Then
    MsgBox(0+16,"ERROR","Could not find correct window.")
    Exit
EndIf

ControlCommand($handle,"I &accept the terms in the license agreement",4110,"Check","")

I bet there is noway to ''Check'' this radio, except "MouseClick()" but it needs to be hided.

If there isnt a way, then im gonna laugh till i piss in my pants.

Edited by Zerocool
Link to comment
Share on other sites

Opt("WinTitleMatchMode",4)

$handle=WinGetHandle("classname=MsiDialogCloseClass","")
If @error Then
    MsgBox(0+16,"ERROR","Could not find correct window.")
    Exit
EndIf

ControlCommand($handle,"I &accept the terms in the license agreement",4110,"Check","")

I bet there is noway to ''Check'' this radio, except "MouseClick()" but it needs to be hided.

If there isnt a way, then im gonna laugh till i piss in my pants.

ControlClick ( "classname=MsiDialogCloseClass", "", 4110 , "left" )

That work?

or

ControlCommand ( "classname=MsiDialogCloseClass", "", 4110, "Check" , "" )

Link to comment
Share on other sites

  • Moderators

Nothing works, of this

If ControlCommand($handle,"&Remove",624,"IsChecked","") = 0 Then
    ControlCommand($handle,"&Remove",624,"Check","")
EndIf

Doesnt work aswell.

hahahahahaha i never seen this really, a script language that cant click on a radio button 8)

Obviously, you haven't seen the help file either.

Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment![

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.

Link to comment
Share on other sites

did you try the AutoIt window info tool to get a id on the control? Usually, but not always, you should be able to Id the control. From the helpfile:

One of the best new features with AutoIt v3 is the ability to work directly with certain types of Window Controls. Almost everything you see on a window is a control of some kind: buttons, listboxes, edit fields, static text are all controls. In fact Notepad is just one big "Edit" control! Because AutoIt works directly with a control they provide a more reliable way to automate than just sending keystrokes.

Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment!

Using the AutoIt Window Info Tool you can move your mouse around the window you are interested in and you will be given information of the control that is currently under your mouse. Information on controls is given in a number of ways, these are:

Control ID

ClassNameNN

Text

Control Handle (HWND) (Not available in AutoIt Window Info Tool - see below)

Whenever you see a Control...() command expecting a ControlID parameter (most of them) you can use any one of these methods. The method you choose will vary by personal preference and the information you are able to retrieve from the AutoIt Window Info Tool. In general, the best method to use is the Control ID, with the other methods being used when a Control ID is not available or is not unique (usually with static text each piece of text actually has the same Control ID so you will need to use one of the other methods to work with those controls).

Link to comment
Share on other sites

its a setup.MSI

if you know what MSI is, then you would know that it IS A STANDARD MICROSOFT CONTROL

If you can get focus on the radio then just use Send("{space}")

PS.

It is possible to write custom pages for an MSI installer package so it may NOT be a standard MS control.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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