Jump to content
Sign in to follow this  
MSchindi

Script-Example for (Advanced) Power Management

Recommended Posts

MSchindi

; ----------------------------------------------------------------------------

;

; AutoIt Version: 3.1.0

; Author: Schindi;

;

; Script Function:

; ACPI AutoIt script.

;Only tested with ACER-Notebook TravelMate 650 (German W2k+XP)

;and a Desktop-PC wthout Advanced Options (German WinXP)

; ----------------------------------------------------------------------------

; Script Start - Add your code below here

AutoItSetOption("WinTitleMatchMode", 2) ;1=start, 2=substring, 3=exact

AutoItSetOption("TrayIconHide", 1) ;0=show, 1=hide

Run ( "RUNDLL32.EXE shell32.dll,Control_RunDLL powercfg.cpl" )

WinWait ( "Eigenschaften von Energieoptionen", "Energieschema", 10 )

if Not WinExists( "Eigenschaften von Energieoptionen" , "Batteriebetrieb") then

$erg=MsgBox(4096, "ACPI", "Kann die gewünschten ACPI-Einstellungen nicht automatisch ändern!")

exit

EndIf

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox2", "{HOME}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox2", "{DOWN 6}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox3", "{HOME}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox3", "{DOWN 3}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox4", "{END}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox5", "{END}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox6", "{END}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox7", "{END}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox8", "{END}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox9", "{END}" )

ControlSend("Eigenschaften von Energieoptionen", "Ü&ber", "Button7", " " )

Sleep (1000)

ControlSend("Eigenschaften von Energieoptionen", "", "SysTabControl321", "{RIGHT 3}" )

WinWait ( "Eigenschaften von Energieoptionen", "Beim Schließen des &Laptops", 10 )

if Not WinExists( "Eigenschaften von Energieoptionen" , "Beim Schließen des &Laptops") then

$erg=MsgBox(4096, "ACPI", "Kann die gewünschten erweiterten ACPI-Einstellungen nicht automatisch ändern!")

exit

EndIf

ControlCommand ( "Eigenschaften von Energieoptionen", "", "Button2", "UnCheck", "" )

ControlCommand ( "Eigenschaften von Energieoptionen", "", "Button3", "Check", "" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox1", "{HOME}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox2", "{HOME}" )

ControlSend("Eigenschaften von Energieoptionen", "", "ComboBox3", "{HOME}" )

ControlSend("Eigenschaften von Energieoptionen", "Ü&ber", "Button8", " " )

Sleep (1000)

ControlSend("Eigenschaften von Energieoptionen", "Ü&ber", "Button8", "{ESC}" )

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.