Jump to content

GUI Controls not working on some systems


snorkel
 Share

Go to solution Solved by snorkel,

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...