DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Post New Requests Here => Topic started by: taybay on June 22, 2007, 02:19 AM

Title: IDEA: Shortcut to color scheme change for use with battery run
Post by: taybay on June 22, 2007, 02:19 AM
I am a proud owner of a shiny new laptop, complete with Vista Premium.  However, I am finding that Aero is a battery drain compared to the other schemes.  I found batteryrun and thought it may be useful to be able to have my color scheme switch to Vista basic when I disconnect the AC power and then switch back to Aero when I reconnect it.  Unfortunately I can't seem to find any way to make the switch between schemes without going into appearance settings and changing it manually.  If you could find some way to make a file or two that can switch between two color schemes so that I can use them with batteryrun, I will love you forever!  Thank you =)
Title: Re: IDEA: Shortcut to color scheme change for use with battery run
Post by: taybay on July 01, 2007, 04:48 PM
Nevermind! I learned how to use Autohotkey.  Yay  ;D
Title: Re: IDEA: Shortcut to color scheme change for use with battery run
Post by: steeladept on July 02, 2007, 05:40 AM
If it works, perhaps you would be willing to share for the rest who have not figured it out yet?  Or like me who have not switched yet, but will be forced to in the future.  Just a thought...
Title: Re: IDEA: Shortcut to color scheme change for use with battery run
Post by: taybay on July 05, 2007, 01:59 PM
Alright.  It's really quick and dirty but it works.  I don't have a host so I'll just post the code.

Make an autohotkey script that looks like this for when the power is plugged in:
Run c:\windows\system32\control.exe color
WinWaitActive, Appearance Settings
Send {up}{enter}

Make another script like this for when the power is disconnected:
Run c:\windows\system32\control.exe color
WinWaitActive, Appearance Settings
Send {down}{enter}

Like I said, it's quick and dirty.  I'm a noob with autohotkey right now.  The appearance window pops up and it takes a few seconds to switch between themes, but it works.  Also, any color scheme saved to aero is lost when switching to basic and back.  I haven't tried it yet, but I'm sure that the color scheme fix can be worked into the script.