MirageJ Posted August 15, 2013 Share Posted August 15, 2013 Hi Guys, First off, the script I'm working on now is my first time using AutoIT, so any additional pointers are appreciated. I'm currently writing a script to go into Network Connections, open the properties for the network card, change the link speed to auto negotiate and then untick all of the protocols apart from IPv4. I've managed to sort out the auto negotiate part, and I am able to toggle the check boxes for the different protocols, but what I can't get working is getting the current check state. Whenever I use GUICtrlListView_GetItemChecked, it always returns true if the index I supply exists, and then false if the index doesn't exist, when I believe that it's only supposed to return true if the index supplied is checked. For example, it's my understanding that the following should return false, if the second protocol in the list (being as the indexes start at 0) is not checked, how ever, it returns true. $testChecked = _GUICtrlListView_GetItemChecked($hList, 1) Is this due to the fact that GUICtrlListView_GetItemChecked is supposed to be used with GUI's created within AutoIT, meaning it can't accurately read that status of Windows generated check boxes? I am currently testing this in WinXP. Any help/alternatives would be much appreciated. Thanks. Link to comment Share on other sites More sharing options...
JohnOne Posted August 15, 2013 Share Posted August 15, 2013 I'd try ControlCommand("something", "", "something", "IsChecked") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
MirageJ Posted August 15, 2013 Author Share Posted August 15, 2013 I'd try ControlCommand("something", "", "something", "IsChecked") Thanks for the reply, but still no luck. I tried ControlCommand ( "Local Area Connection Properties", "", SysListView321, "IsChecked" , 0) (also tried "0") At the end of the command is the only place where it seemed that I could declare which index I wanted, but it always returns false no matter what state the checkbox is in. Thanks. 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