Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 25 2002 at 18:28 | IP Logged
|
|
|
Are there any fool-proof ways of using sendkeys to adjust system volume? Sending to window text "Volume Control" only works when it has been recently selected.
Thanks,
Tony
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 26 2002 at 10:08 | IP Logged
|
|
|
Tony,
I quickly did a search of the web to see if I could determine a good way to do it but came up blank. Doesn't mean it can't be done though. However, I came across a VB volume control program on Microsoft's site and made some quick changes and re-compiled it. You can call it from PowerHome and it accepts a single command line parameter from 0 to 65535 which is the level that you want to set the volume. Tested it and it works great. You can download it from the additional downloads page or by clicking this link: http://www.myx10.com/otherdown/volume.exe
Let me know if this works for you.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 26 2002 at 20:38 | IP Logged
|
|
|
Dave,
You da man! Here's my code...
Global Variable: SYS VOL
Macros:
VOL DOWN:
10 if( {SYS VOL} >= 10, 1, 999)
20 {SYS VOL} - 10
30 "e:\volume.exe " PLUS int( {SYS VOL} / 100 * 65535)
VOL UP:
10 if( {SYS VOL} <= 90, 1, 999)
20 {SYS VOL} PLUS 10
30 "e:\volume.exe " PLUS int( {SYS VOL} / 100 * 65535)
I'm not sure why, but, you'll need to replace PLUS above with the plus sign.
I'm sure this can be done in one line, but, I'm keeping simple.
I'll be working on adding fine adjustments next!
Thanks,
Tony
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 27 2002 at 09:24 | IP Logged
|
|
|
Tony,
It looks good. I'll be looking into adding some formula functions to accomplish the same thing so you won't have to shell out.
BTW, what was the problem with the + sign? Was it just getting the messageboard to show it properly?
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 27 2002 at 13:12 | IP Logged
|
|
|
Dave,
I also think that would be a good addition to PH.
Yes, the message board would just not show it for some reason (must need to wrap it in codes).
Thanks,
Tony
|
Back to Top |
|
|