Sign in to follow this  
Followers 0
Read

winxp - Power Options

10 posts in this topic

Run("RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cpl")

WinWait("Power Options Properties")

WinActivate("Power Options Properties")

Send("^{TAB 1}")

Send("{TAB 2}")

Send("{-}")

ControlClick("Power Options Properties", "OK", "Button4")

I can't select "do nothing" in Advance and OK

Whats is the problem?

Share this post


Link to post
Share on other sites



I can't select "do nothing" in Advance and OK

Whats is the problem?

hmm, you don't select it ;)

ControlCommand("Power Options Properties", "", "ComboBox2", "SelectString", "Do nothing")

Share this post


Link to post
Share on other sites

Run("RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cpl")

WinWait("Power Options Properties")

WinActivate("Power Options Properties")

Send("^{TAB 1}")

Send("{TAB 2}")

Send("{-}")

ControlClick("Power Options Properties", "OK", "Button4")

I can't select "do nothing" in Advance and OK

Whats is the problem?

Try This:

Run("RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cpl")
WinWait("Power Options Properties")
WinActivate("Power Options Properties")
Send("^{TAB 1}")
Send("{TAB 2}")
Send("{-}")
Send ("{Up 3}")
Send ("{Tab 2}{ENTER}")

Not really sure why it wouldn't click the ok button but this works.


Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites

All works well!!!

Thanks

Share this post


Link to post
Share on other sites

Hmm

Now i try disable "system Restore"

Control Panel -> System -> System Restore

checkbox Turn off System Restore on all drivers and OK

Run("control.exe sysdm.cpl,,4")
Send("^{TAB 1}")
Send("^{SPACE}")
Send("^{EnTER}")

As it should be but something is wrong.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Hmm

Now i try disable "system Restore"

Control Panel -> System -> System Restore

checkbox Turn off System Restore on all drivers and OK

Run("control.exe sysdm.cpl,,4")
Send("^{TAB 1}")
Send("^{SPACE}")
Send("^{EnTER}")

As it should be but something is wrong.

It's really hard to help me??? what is wrong this code? Edited by Read

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Run("control.exe sysdm.cpl,,4")
WinWaitActive("[CLASS:#32770]")  ;german WinXP32, use AutoIt Window Info Tool for more informations
sleep(2000)  ;only to show that it works
Send("^{SPACE}")
sleep(2000)  ;only to show that it works
Send("^{EnTER}")
sleep(2000)  ;only to show that it works
exit

/EDIT/ ....c&p error....

Edited by AndyG

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Run("control.exe sysdm.cpl,,4")
WinWaitActive("[CLASS:#32770]")  ;german WinXP32, use AutoIt Window Info Tool for more informations
sleep(2000)  ;only to show that it works
Send("^{SPACE}")
sleep(2000)  ;only to show that it works
Send("^{EnTER}")
sleep(2000)  ;only to show that it works
exit

/EDIT/ ....c&p error....

How or where you take it?: [CLASS:#32770]")

It's work - Thanks

Edited by Read

Share this post


Link to post
Share on other sites

How or where you take it?: [CLASS:#32770]")

i mentioned the tool at the comment: "AutoIt Window Info", you can find it pressing the Windows START-Button, Programms, AutoIt v3, AutoIt Window Info 

or in the AutoIt-Folder...

Share this post


Link to post
Share on other sites

i mentioned the tool at the comment: "AutoIt Window Info", you can find it pressing the Windows START-Button, Programms, AutoIt v3, AutoIt Window Info 

or in the AutoIt-Folder...

n1

I Disable Error Reporting and work ;)

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  
Followers 0