falco85 Posted December 15, 2008 Share Posted December 15, 2008 Hi guys, I am trying to automate the check/uncheck of check boxes in a program, trying to use ControlCommand. However, it doesn't work when trying to uncheck something. A turnaround to this problem would be to send tabs and space but the problem is that I don't know the initial state of the box and I want to make sure that it will check/uncheck when I tell the script to do so. Therefore this is critical for my script. Any help on that issue is greatly appreciated Thank you Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 16, 2008 Share Posted December 16, 2008 Hi guys,I am trying to automate the check/uncheck of check boxes in a program, trying to use ControlCommand. However, it doesn't work when trying to uncheck something. A turnaround to this problem would be to send tabs and space but the problem is that I don't know the initial state of the box and I want to make sure that it will check/uncheck when I tell the script to do so. Therefore this is critical for my script. Any help on that issue is greatly appreciated Thank youRun the AutoIt Window Info Tool (AU3Info.exe) to identify the control, then post the control information and ControlCommand() code you tried on it. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
komalo Posted December 16, 2008 Share Posted December 16, 2008 also ,you can try ControlSend with Space on this control since ControlCommand don't work on it [font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font] Link to comment Share on other sites More sharing options...
Ealric Posted December 16, 2008 Share Posted December 16, 2008 (edited) I don't use ControlCommand personally but reading the documentation it appears you can still do something similar... _check("NameOfYourControlID") Func _check($controlID) If BitAND(ControlCommand("Title","",$controlID,"IsChecked",""),1) = 1 Then ;box state is checked so uncheck ControlCommand("Title","",$controlID,"UnCheck","") Else ;box is unchecked so check it ControlCommand("Title","",$controlID,"Check","") EndIf EndFunc Edited December 16, 2008 by Ealric My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] 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