Toggle Function


  1. Posts : 1,364
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #1

    Toggle Function


    Hi -

    I use two powerplans and have created a shortcut/icon for each. Is it possible to create a single icon that will toggle between the two plans?

    I also have an open dvd door icon and a close dvd door icon that I would like to reduce to a single button/ion/shortcut operation. I am guessing the solution for one is the same/similar as the other?

    Currently, I have a shortcut/icon for 1. & 2. of the following that I would like to to have just one shortcut/icon or 'key' that toggles between the two :

    1. C:\Windows\System32\powercfg.exe -setactive 32ab947d-4ee3-48bd-8914-1233eac022d9

    2. C:\Windows\System32\powercfg.exe -setactive 381b4222-f694-41f0-9685-ff5bb260df2e

    ... also, the same desired for 'open' & 'close' of the dvd door/tray :

    1. "C:\Program Files\nircmd-x64\nircmd.exe" cdrom open E:

    2. "C:\Program Files\nircmd-x64\nircmd.exe" cdrom close E:

    thnx,
    -Marcos
      My Computer


  2. Posts : 1,814
    XP / Win7 x64 Pro
       #2

    In order to have one shortcut do that, it would have to call a batch or vbs file that includes some logic to query what the current state is and then set it to the other state.
      My Computer


  3. Posts : 1,364
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #3

    FliGi7 said:
    In order to have one shortcut do that, it would have to call a batch or vbs file that includes some logic to query what the current state is and then set it to the other state.
    and what would that look like?
      My Computer


  4. Posts : 1,814
    XP / Win7 x64 Pro
       #4

    It could look like a lot of things, depending how you code it.

    VBScript Options for Powering Computers | eHow.com
      My Computer


  5. Posts : 1,364
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #5

    solved! you may now close this topic.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:48.
Find Us