Power & Volume control buttons

Monitor off, Log Off, Standby, Hibernate, Reboot, Poweroff buttons

  1. download nircmd and put it C:\WINDOWS
    nirsoft.net/utils/nircmd.zip
    nirsoft.net/utils/nircmd.html

  2. use this xp power icons. Thanks kenalcock :smiley:
    [Windows XP Power Icons)

<?xml version="1.0"?> <button backcol="none" display="both" label_pos="right" textcol="none" type="menu"> <label>PW control</label> <icon1>#default:bugs</icon1> <button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none"> <label>Monitor off</label> <icon1>%SystemRoot%\system32\SHELL32.dll,25</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe monitor off</instruction> </function> </button> <button backcol="none" display="both" icon_size="large" textcol="none"> <label>Log off</label> <icon1>#windows_power:logoff</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe exitwin logoff</instruction> </function> </button> <button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none"> <label>Standby</label> <icon1>#windows_power:standby</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe standby</instruction> </function> </button> <button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none"> <label>Hibernate</label> <icon1>#windows_power:hibernate</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe hibernate</instruction> </function> </button> <button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none"> <label>Reboot</label> <icon1>#windows_power:restart</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe qboxcom &quot;Do you want to reboot ?&quot; &quot;question&quot; exitwin reboot</instruction> </function> </button> <button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none"> <label>Poweroff</label> <icon1>#windows_power:shutdown</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe exitwin poweroff</instruction> </function> </button> </button>

Volume control buttons
Increases or decreases the system volume. you can change the number of volume units to increase or decrease.

<?xml version="1.0"?> <button backcol="none" display="both" icon_size="large" textcol="none" type="three_button"> <label>volume</label> <icon1>%SystemRoot%\system32\SHELL32.dll,168</icon1> <button backcol="none" display="both" textcol="none"> <label>Up</label> <icon1>#newcommand</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe changesysvolume 5000</instruction> </function> </button> <button backcol="none" display="both" textcol="none"> <label>Down</label> <icon1>#newcommand</icon1> <function type="normal"> <instruction>C:\WINDOWS\nircmd.exe changesysvolume -5000</instruction> </function> </button> </button>

For what it's worth, some (not all) of these can be done without extra commands via Opus's built-in Close command.

(At the time of writing) I don't think Opus has built-in hiberate, volume control or monitor-off commands but Opus does have these:

Close SYSTEM=poweroff
Close SYSTEM=shutdown
Close SYSTEM=restart
Close SYSTEM=logoff

You can also specify a schedule so that Opus does the shutdown/reboot/logoff at a particular time, or tell Opus to wait until any existing file-copy operations complete before shutting down (e.g. for doing a long copy while you sleep).

See the Close - Raw Command part of the manual for all the details.

On a related note, there's my little ScreenSave tool for setting the monitor's power state with optional delays between different states. I'm not sure if it does anything that NirCmd doesn't do but it might be worth looking at if you're after that sort of thing. (NirCmd certainly does plenty of things which ScreenSave does not do, of course! It's a neat "swiss army knife" tool.)

(I like to have it turn on my screensaver for a few seconds, then turn off the monitor, so that the screen is locked (it won't be if you just power it off) and I can use my monitor as a "night light" to find my way to bed before it turns itself off. :slight_smile:)

For toolbars that use an external file like this (nircmd.exe in this case), is there any way to point it to a drive that doesn't keep the same drive letter for those of us that use the portable version of DOpus? I've been wondering this for awhile now and this seemed like as good a place as any to ask.

I've just added a FAQ to answer that. Here it is:

[HOW TO: Refer to programs on the same drive as portable Opus)

I've just added a FAQ to answer that. Here it is:

[HOW TO: Refer to programs on the same drive as portable Opus)[/quote]
That's awesome. This will make things so much easier for me. Thanks. :smiley:

Vista Volume Mixer Right

<?xml version="1.0"?> <button backcol="none" display="both" label_pos="right" textcol="none"> <label>Vol. Mixer</label> <tip>Vista Volume Mixer Right</tip> <icon1>#actions:player_volume</icon1> <function type="normal"> <instruction>%SystemRoot%\System32\SndVol.exe -r 49490633</instruction> </function> </button>

Vista Master Volume Right

<?xml version="1.0"?> <button backcol="none" display="both" label_pos="right" separate="yes" textcol="none"> <label>Vol. Master</label> <tip>Vista Master Volume Right</tip> <icon1>#actions:player_volume</icon1> <function type="normal"> <instruction>%SystemRoot%\System32\SndVol.exe -f 49825268</instruction> </function> </button>

Set WshShell = CreateObject ( "Wscript.shell") 
Wshshell.sendkeys Chr(&H97AD) ' Mute 
wshshell.sendkeys Chr(&H97AE) ' Reduce volume 
Wshshell.sendkeys chR(&H97AF) ' Increase volume