Zhen Posted June 30, 2009 Share Posted June 30, 2009 Hello I am new to AutoIT. I am trying to write a script to set up WPA wireless profile for Windows XP. But I am not able to select the Trusted Root Certification Authorities in the "Protected EAP Properties"(please check the attached screen shot) using following script: ControlListView ("Protected EAP Properties", "", "SysListView321", "Select", 3) Every time I run my script, nothing is selected in the Trusted Root Certification Authorities. I also tried:ControlListView ("Protected EAP Properties", "", "SysListView321", "SelectAll"), still nothing selected. Any ideas? Thanks! Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 30, 2009 Share Posted June 30, 2009 Hello I am new to AutoIT. I am trying to write a script to set up WPA wireless profile for Windows XP. But I am not able to select the Trusted Root Certification Authorities in the "Protected EAP Properties"(please check the attached screen shot) using following script:ControlListView ("Protected EAP Properties", "", "SysListView321", "Select", 3)Every time I run my script, nothing is selected in the Trusted Root Certification Authorities. I also tried:ControlListView ("Protected EAP Properties", "", "SysListView321", "SelectAll"), still nothing selected.Any ideas?Thanks!I don't know if it's the case with your particular dialog, but I have found some security related windows that seem to block simulated inputs. Some of the IE Security Tab dialogs, for instance. You may have to get the X/Y coord of the item within the control and ControlClick() with that. 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...
Zhen Posted July 2, 2009 Author Share Posted July 2, 2009 I don't know if it's the case with your particular dialog, but I have found some security related windows that seem to block simulated inputs. Some of the IE Security Tab dialogs, for instance. You may have to get the X/Y coord of the item within the control and ControlClick() with that. Thank you for the reply. The problem is I have to scroll down the list and select it. I don't think that can be done by ControlClick(), right?Zhen Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 2, 2009 Share Posted July 2, 2009 Thank you for the reply. The problem is I have to scroll down the list and select it. I don't think that can be done by ControlClick(), right?ZhenThe controls I had problems with responded normally to reading their state, text, etc. and just wouldn't take simulated input/selection (or crashed IE on simulated input/selection). You should be able to read the text of the current selection, and just use ControlSend($hWnd, "", "", "{DOWN}") until the right one is selected. Then ControlSend() and "{ENTER}" (to the GUI with no ControlID, not to the control). 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...
herewasplato Posted August 15, 2009 Share Posted August 15, 2009 The controls I had problems with responded normally to reading their state, text, etc. and just wouldn't take simulated input/selection (or crashed IE on simulated input/selection). You should be able to read the text of the current selection, and just use ControlSend($hWnd, "", "", "{DOWN}") until the right one is selected. Then ControlSend() and "{ENTER}" (to the GUI with no ControlID, not to the control).I've used this method on "stubborn" controls before too.I scripted this same NIC control yesterday and I found this post...#505847...that managed to control this control via some GUI UDFs. So I thought that I would tie these two threads together with this post and also ask if there is a way to script this NIC control without the GUI UDFs. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 18, 2009 Share Posted August 18, 2009 (edited) I've used this method on "stubborn" controls before too.I scripted this same NIC control yesterday and I found this post...#505847...that managed to control this control via some GUI UDFs. So I thought that I would tie these two threads together with this post and also ask if there is a way to script this NIC control without the GUI UDFs.Google is your friend: Enable / Disable 802.1x with some scriptIt's some VBScript-looking code, but it's only hacking the registry and should be easier in AutoIt than VBScript. The real problem is that it may be different across manufacturers, Windows versions, Service Packs, etc. >_< Edited August 18, 2009 by PsaltyDS 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...
herewasplato Posted August 19, 2009 Share Posted August 19, 2009 Thanks - I've seen stuff like that. I don't mind scripting the GUI. I was just wondering why these: _GUICtrlListView_EnsureVisible _GUICtrlListView_SetItemFocused Had to be used - instead of just the control commands? They must be magic :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 19, 2009 Share Posted August 19, 2009 Thanks - I've seen stuff like that. I don't mind scripting the GUI. I was just wondering why these:_GUICtrlListView_EnsureVisible_GUICtrlListView_SetItemFocusedHad to be used - instead of just the control commands? They must be magic :-)_GUICtrlListView_EnsureVisible() scrolls the list so that the target item is visible on the GUI. You can't target the item by X/Y coordinates, for example, if it's not visible in the GUI._GUICtrlListView_SetItemFocused() gives it focus. Note that "focused", "selected", and "clicked" are all different things in some controls. Just because it's focused doesn't necessarily make it selected. >_< 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...
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