buddy Posted August 11, 2010 Share Posted August 11, 2010 Howdy, We are trying to write a script to setup a battery life and power saver application for our PCs. While using Windows Info, it was found that some check boxes are set as buttons. We tried to verify the status of the check boxes using the IsChecked option under the ControlTreeView command but it didn't work. Some of the check boxes will enable/disable treeviews with sub-branches. We would like to identify the status of those as well but haven't figured out the way to enable/disable them individually. Windows Info showed us a unique name for all of them. I appreciate any help you can provide us. Rick Link to comment Share on other sites More sharing options...
Bert Posted August 11, 2010 Share Posted August 11, 2010 You can use controlclick to interact with the control, no matter if it is a button or a checkbox. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
buddy Posted August 11, 2010 Author Share Posted August 11, 2010 Thanks MPH!Our main issue is related to the fact that we would like to know the status of the check boxes (Checked or Unchecked). We tried using the ControlTreeView's options but none of them worked. Do you have any other suggestion? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 11, 2010 Share Posted August 11, 2010 Maybe this function, ControlCommand, could be of use. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
buddy Posted August 13, 2010 Author Share Posted August 13, 2010 (edited) Thanks for your reply, Bruce! I have been trying to find a way to see if the check box is been selected. However, using the command you just recommended me didn't work either. Just to double check that I wasn't missing anything, I set a message box that should tell me the status of the check box. When I ran my script, it always came as '0' (unchecked) which is not the case since the check box was checked. Here is the code I used for the message box $err = ControlCommand("Devices tree","","[NAME:checkbox_ReInitDevices]","IsChecked","") ; -------------------------------------------------- ; Test sequence ; MsgBox(0,"Script Step", "Status of Check box " & $err) ; ; -------------------------------------------------- Am I missing something? Do you have any other suggestion? Thanks in advance! Edited August 13, 2010 by buddy 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