Jump to content

manipulate window tabs with control


Recommended Posts

Group,

Just curious about the correct way to switch tabs using the 'Control' functionality. Specifically within the Power Options window of the Windows XP control panel (i.e. Powercfg.cpl). I have the following script that changes certain settings for a specific type of computer, such as a kiosk based device.

Opt ("WinWaitDelay", 10)
Opt ("WinTitleMatchMode", 4)
Opt ("WinDetectHiddenText", 1)
Opt ("MouseCoordMode", 0)
Run('rundll32.exe shell32.dll,Control_RunDLL Powercfg.cpl', @SystemDir, @SW_HIDE)
WinWait("Power Options Properties", "Select the power sch")
ControlHide("Power Options Properties", "Power Schemes", 1007)
ControlCommand("Power Options Properties", "", "ComboBox1", "SetCurrentSelection", 3)
ControlCommand("Power Options Properties", "", "ComboBox2", "SetCurrentSelection", 15)
ControlCommand("Power Options Properties", "", "ComboBox3", "SetCurrentSelection", 6)
ControlClick('Power Options Properties', '', 'Button5')
Exit

However I also want to turn off the Hibernation option on the Hibernate tab. What is the correct way to make the Hibernate tab the active tab (or to change to any other tab) in order to change settings? I looked at ControlSend in the help file but was curious if there is not a more direct way to change focus to that tab then performing a series of ControlSend ("{TAB 9}").

Thanks in advance,

ZK

Link to comment
Share on other sites

Group,

    Just curious about the correct way to switch tabs using the 'Control' functionality. Specifically within the Power Options window of the Windows XP control panel (i.e. Powercfg.cpl). I have the following script that changes certain settings for a specific type of computer, such as a kiosk based device.

Opt ("WinWaitDelay", 10)
Opt ("WinTitleMatchMode", 4)
Opt ("WinDetectHiddenText", 1)
Opt ("MouseCoordMode", 0)
Run('rundll32.exe shell32.dll,Control_RunDLL Powercfg.cpl', @SystemDir, @SW_HIDE)
WinWait("Power Options Properties", "Select the power sch")
ControlHide("Power Options Properties", "Power Schemes", 1007)
ControlCommand("Power Options Properties", "", "ComboBox1", "SetCurrentSelection", 3)
ControlCommand("Power Options Properties", "", "ComboBox2", "SetCurrentSelection", 15)
ControlCommand("Power Options Properties", "", "ComboBox3", "SetCurrentSelection", 6)
ControlClick('Power Options Properties', '', 'Button5')
Exit

    However I also want to turn off the Hibernation option on the Hibernate tab. What is the correct way to make the Hibernate tab the active tab (or to change to any other tab) in order to change settings? I looked at ControlSend in the help file but was curious if there is not a more direct way to change focus to that tab then performing a series of ControlSend ("{TAB 9}").

Thanks in advance,

ZK

<{POST_SNAPBACK}>

Try using Winspector to get more useful data ( it returns very detailed data)
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
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...