DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?  (Read 59,772 times)

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
After seeing the coders here, I know its not hard to code a Toggle utility with a Customized Global Hotkey which changes the power schemes.

When executed if HIGH PERFORMANCE is active then should change to Powersave and vice-versa

Help Here
How to Geek

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #1 on: September 08, 2009, 02:24 PM »
Try this:  PowerSchemeToggler

1) Unpack archive to a folder of your choice.

2) Run PowerSchemeToggler.exe and you'll be presented with a small interface
  that will allow you to choose two profiles to toggle between.  Click the
  "Save and exit" button when done.
 
3) Run PowerSchemeToggler.exe with the -toggle parameter to toggle between
  your chosen schemes.

main.png
« Last Edit: September 08, 2009, 02:26 PM by skwire »

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #2 on: September 09, 2009, 11:57 AM »
Sorry Late Feedback due to no net connectivity, it doesn't show the names of Power Schemes but only GUID

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #3 on: September 09, 2009, 12:05 PM »
I would assume you're running something other than XP?  If so, please post the output of the following command and the OS you're running:

powercfg /list

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #4 on: September 09, 2009, 01:12 PM »
Redownload and try it now.  Man, I really need to set up Vista and Win7 VMs.

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #5 on: September 09, 2009, 02:04 PM »
Still Showing the same, Im on Windows 7 RTM

Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance) *
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a  (Power saver)

Edit: It seems it does nothing, I saved the GUID of Power Saver and High Perforamnce and created a shortcut in the same folder with -toggle params and executed afterwards but nothing changing.

I think Im making mistake somewhere.
« Last Edit: September 09, 2009, 02:09 PM by paarkhi »

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #6 on: September 09, 2009, 05:48 PM »
I installed a Vista VM and I believe I have it working properly under Vista (and, I would assume, Win7).  Please redownload and let me know.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #7 on: September 10, 2009, 01:52 AM »
skwire, if you come out with a Pro version, please add a feature to switch from exigency to altruism.

 :beerchug:

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #8 on: September 10, 2009, 02:34 AM »
I'm actually thinking of adding a TrayTip option that will give the user some feedback that a switch, indeed, did take place.

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #9 on: September 10, 2009, 05:35 AM »
The only change I could see is now it shows Names of Power Schemes instead of GUID but it doesn't work.
created a shortcut in the same folder with -toggle but not working

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #10 on: September 10, 2009, 05:46 AM »
Does your shortcut look like this?

2009-09-10_004425.png

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #11 on: September 10, 2009, 07:12 AM »
Yes here's an attached image

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #12 on: September 10, 2009, 07:24 AM »
I'm not sure what could be wrong.  I tested this in Vista and it's also been tested under Win7.

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #13 on: September 10, 2009, 07:48 AM »
Only can assure you that it works on XPSP2 VM, Tried personally :(

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #14 on: September 10, 2009, 07:55 AM »
After you run the app and select the schemes, does it create the config.ini in the same folder?  If so, are the contents of it correct?

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #15 on: September 10, 2009, 08:11 AM »
The Error was on my system and had to reset the power config options.
Thank you it has started working.

PowerCFG Reset file if you want (just change the .txt to .reg)

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #16 on: September 10, 2009, 08:14 AM »
Fantastic.  I was thinking of adding an option that would create a TrayTip on toggle just so you know it switched.  Would you like something like that?

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #17 on: September 10, 2009, 11:51 AM »
Ofcourse,  :D If it doesn't take much of your time then Yes, after all who doesn't like an additional feature

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #18 on: September 11, 2009, 07:58 AM »
v1.0.3 - 2009-09-11
   + Added "Create shortcut" button.
   + Added tray tip on toggle option.


main.png
« Last Edit: November 09, 2009, 09:39 AM by skwire »

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #19 on: September 11, 2009, 11:36 AM »
Shortcut created succesfully but No luck with the tray Tip

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #20 on: September 11, 2009, 12:31 PM »
Hmmm...works fine under XP.  Please re-download and try once more.  The version of the executable should be 1.0.3.2 this time.

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #21 on: September 11, 2009, 01:59 PM »
Yes it is (Version) Downloaded from SKWIRE EMPIRE because I couldn't find the Link here in this forum, but not showing.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #22 on: September 11, 2009, 07:25 PM »
One more re-download, please.  v1.0.3.6.  I added another tweak that I hope makes it work for you.  Also, you may have to disable/enable the balloon tips for your system as demonstrated here:  http://www.vistax64.com/tutorials/145523-notification-area-balloon-tips-enable-disable.html

I was able to make the balloon tips work under my main XP system as well as a Vista VM.  Apologies for the trouble and thanks for your patience.

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #23 on: September 12, 2009, 05:59 AM »
Surely Going to Give a Try and please don't apologize, it is me who should do, because Im harassing you with all my requests and will give you the feedback soon

Edit: Working Perfectly OK, Thank you for that
« Last Edit: September 12, 2009, 06:29 AM by paarkhi »

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: Toggle Switch with a Global Hotkey to change Power schemes?
« Reply #24 on: September 13, 2009, 03:11 AM »
Edit: Working Perfectly OK, Thank you for that

Great to hear.  Thanks for testing.  Website|Download

v1.0.4 - 2009-09-12
   + Added a tweak to make the balloon tip work more reliably under Vista
     and Win7.
« Last Edit: November 09, 2009, 09:39 AM by skwire »

Original address: https://www.donationcoder.com/forum/index.php?topic=19847.0