Jump to content
Sign in to follow this  
Steve2020

Newbee needs help wiht ControlCommand

Recommended Posts

Steve2020

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" )

Share this post


Link to post
Share on other sites
funkey

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.

Share this post


Link to post
Share on other sites
Steve2020

Thanks for the response. Made the change and the control does not change as expected. Any ideas on how to troubleshoot this? Many thanks,

Steve

Share this post


Link to post
Share on other sites
funkey

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.

Share this post


Link to post
Share on other sites
Steve2020

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")

Share this post


Link to post
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
Sign in to follow this  

×