snorkel Posted December 2, 2014 Share Posted December 2, 2014 I'm sorry if this has been covered elsewhere. I've been searching for two days, and haven't had any luck. I have a simple AutoIT script to automate configuring the network settings of a wireless printer. The printer's configuration program uses SysTreeView32. My script navigates through the tree, selects the items I wish to configure, and places the configuration. My script works perfectly fine on some systems, and fails on others. The interesting bit is below: $window = WinWait("Device Properties") $tree = ControlGetHandle($window, "", "[CLASS:SysTreeView32; INSTANCE:1]") $searchText = "Basic (Wireless)" $ItemFound = _GUICtrlTreeView_FindItem($tree, $searchText, True) On some systems the _GUICtrlTreeView_FindItem function finds the item. On others it returns 0. I am able to get the handle for the window and for the tree.. I just can't find the items. I also tried using the ControlTreeView functions and got the same results. Works fine on some systems, not on others. Additionally, functions such as ControlCommand and ControlSetText do not work on these systems. Any tips or advice would be greatly appreciated. Link to comment Share on other sites More sharing options...
Solution snorkel Posted December 2, 2014 Author Solution Share Posted December 2, 2014 I just needed to ask for help, apparently. Problem was permissions related. Placing #RequireAdmin at top of script got everything working. 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