Guest Wellboy Posted September 16, 2005 Posted September 16, 2005 Hi, Somebody please help!!! I have no clue how to code, but I like the idea of Autoit. I want to create a script which ticks or unticks a checkbox. I know the Control ID thanks to the info tool, but I don't know the command to click OK or apply the change after the control activation. Does this make sense? If anyone can help I'd really appreciate it! Wellboy!
Developers Jos Posted September 16, 2005 Developers Posted September 16, 2005 Hi,Somebody please help!!! I have no clue how to code, but I like the idea of Autoit.I want to create a script which ticks or unticks a checkbox. I know the Control ID thanks to the info tool, but I don't know the command to click OK or apply the change after the control activation. Does this make sense? If anyone can help I'd really appreciate it!Wellboy! To select a Checkbox use:ControlSend("window","text","controlid","{NUMPADADD}") or ControlCommand("window","text","controlid","Check", "")To deselect:ControlSend("window","text",,"controlid","{NUMPADSUB}")orControlCommand("window","text","controlid","UnCheck", "")To click the OK button check for its Controlname and do a ControlClick() 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.
Guest Wellboy Posted September 16, 2005 Posted September 16, 2005 To select a Checkbox use:ControlSend("window","text","controlid","{NUMPADADD}") or ControlCommand("window","text","controlid","Check", "")To deselect:ControlSend("window","text",,"controlid","{NUMPADSUB}")orControlCommand("window","text","controlid","UnCheck", "")To click the OK button check for its Controlname and do a ControlClick()Thanks for your help.I can't find the Controlname for the OK button. All I can see is:Control ID: 1ClassNameNN: Button12Is it one of these you are referring to?
Developers Jos Posted September 16, 2005 Developers Posted September 16, 2005 Thanks for your help.I can't find the Controlname for the OK button. All I can see is:Control ID: 1ClassNameNN: Button12Is it one of these you are referring to? Yes, "Button12" should work then... 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.
Guest Wellboy Posted September 16, 2005 Posted September 16, 2005 Yes, "Button12" should work then...Sorry, It still doesn't work. Can you see any problem with my script?It is attached if you would take a look. Thanks.Set_Internet_Proxy.au3
Developers Jos Posted September 16, 2005 Developers Posted September 16, 2005 Sorry, It still doesn't work. Can you see any problem with my script?It is attached if you would take a look. Thanks.Set_Internet_Proxy.au3 This doesn't look right: ControlSend ( "Local Area Network (LAN) Settings", "text", 1570,"{NUMPADADD}") ControlClick ( "Local Area Network (LAN) Settings", "OK", 1 )The second parameter should be either "" or some text on the page. ControlSend ( "Local Area Network (LAN) Settings", "", ???? ,"{NUMPADADD}") ControlClick ( "Local Area Network (LAN) Settings", "", "button12" )Replace the ????? controlid name of the checkbox.. 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.
Guest Wellboy Posted September 18, 2005 Posted September 18, 2005 This doesn't look right: ControlSend ( "Local Area Network (LAN) Settings", "text", 1570,"{NUMPADADD}") ControlClick ( "Local Area Network (LAN) Settings", "OK", 1 )The second parameter should be either "" or some text on the page. ControlSend ( "Local Area Network (LAN) Settings", "", ???? ,"{NUMPADADD}") ControlClick ( "Local Area Network (LAN) Settings", "", "button12" )Replace the ????? controlid name of the checkbox..It still doesn't work! I am missing something really simple I'm sure.If you have any other ideas, I would be very pleased!
LxP Posted September 18, 2005 Posted September 18, 2005 Could you please post an updated version of where you're at? You may wish to look at the ControlCommand() function, which is specifically designed to (among other things) tick and untick tickboxes. All it will need is the correct window and the correct control ID (or class name and number -- whatever uniquely identifies the control within the window).
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