Jump to content

Newbee needs help wiht ControlCommand


Recommended Posts

Great product! I am attempting to open the display properties control (windows xp)and make a change to the windows and button combobox. As my script executes the control opens up but that is all. The script runs with no change to the control. I am assuming that the last line will find the selection under the appropriate combo box and make that change. Any insight would be greatly appreciated.

Steve

run("control.exe desk.cpl,,2")

WinWait("[CLASS:#32770")

ControlCommand("Display Properties", "", "ComboBox2", "SetCurrentSelection", "Windows XP Style" )

Link to comment
Share on other sites

WinWait is wrong

Run("control.exe desk.cpl,,2")
WinWait("Display Properties")
ControlCommand("Display Properties", "", "ComboBox2", "SetCurrentSelection", "Windows XP Style" )

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

For me combobox1 is for windows and buttons.

Run("control.exe desk.cpl,,2")
WinWait("Display Properties")

;ComboBox1 - Windows and buttons (Style)
;ComboBox2 - Color scheme
;ComboBox3 - Font size

ControlCommand("Display Properties", "", "ComboBox1", "SetCurrentSelection", 1) ; select second item
;~ ControlCommand("Display Properties", "", "ComboBox1", "SelectString", "Windows XP Style")

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

Thanks. That did it. I appreciate your help!!

Steve

For me combobox1 is for windows and buttons.

Run("control.exe desk.cpl,,2")
WinWait("Display Properties")

;ComboBox1 - Windows and buttons (Style)
;ComboBox2 - Color scheme
;ComboBox3 - Font size

ControlCommand("Display Properties", "", "ComboBox1", "SetCurrentSelection", 1) ; select second item
;~ ControlCommand("Display Properties", "", "ComboBox1", "SelectString", "Windows XP Style")

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...