Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

AutoHotkey for Vista ( About controlling the volume )


  • Please log in to reply
13 replies to this topic
AutoHotkey_Fan
  • Guests
  • Last active:
  • Joined: --
On Windows Vista, SoundSet and SoundGet do not work to control the volume of the device. I am really waiting for this and more in the next releases as promised and so do many others people. I have just downloaded AutoHotkey and it is really a fantastic work for me for the first time of use. Finally, I found the best hotkey software for my PC. Thanks a lot for your software.

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Out of curiosity, does it work to control the volume if autohotkey.exe is set to run in compatibility mode for WinXP SP2 ?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Great question. If it does work, I'll add it to the documentation.

jsmain
  • Members
  • 126 posts
  • Last active: Oct 23 2017 06:24 PM
  • Joined: 11 Jul 2005
I recently installed Vista and have installed AHK too.

I ran Rajat's Volume OSD for the test, with the mixer panel open.

If I run the script, it inserts a new application of which I can only control it's slider. If I compile, it is the same, but if I change the exe to XPSP2 compatability, it adjusts the speaker and all applications, just as if you grabbed the control with the mouse.

I'm glad you suggested this, as I had a couple other applications I was having trouble doing the same with. Girder, and Max10, for use with my mouse remote from X10.
Jeff Main

jsmain
  • Members
  • 126 posts
  • Last active: Oct 23 2017 06:24 PM
  • Joined: 11 Jul 2005
Ran an additional test tonight for corrupt...

Set the ahk exe properties to run as XPSP2 compat, and now I can run the script as I could the compiled script's EXE.
Jeff Main

AutoHotkey_Fan
  • Guests
  • Last active:
  • Joined: --
Wow, I have tried all, but I can't solve the problem at all. Maybe, we should wait for the help documents ( even a change ) from the site admin, Lord Chris. I think this will not be a small change because there is a big difference between Windows XP and Windows Vista ( I am just talking about the volume controller here ). It will take a little long for that change, but I am going to wait for that. Thanks a lot for your kindness to bring AutoHotkey to all of us. Thank you ...

jsmain
  • Members
  • 126 posts
  • Last active: Oct 23 2017 06:24 PM
  • Joined: 11 Jul 2005
Yes! The sound engine in Vista was completely re-wrote from the ground up.

As I understand it, the engineers behind it didn't follow the guidelines put in front of them, and were let go and replaced by new engineers that could think differently.

Previously, the sound engine was manipulated at the kernal level, now it is manipulated at the user level. Each app's volume can be adjusted independently of all others, whereas previously, you had the master and a single wave control for all apps, unless they programmed a seperate volume control within their own app. The Vista mixer is a new way of thinking for sure, and will take some getting used to.
Jeff Main

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Thanks for the info. I've revised the SoundSet page to read:

On Windows Vista, SoundSet and SoundGet affect only the script itself (this may be resolved in a future version). There are at least two ways to work around this:

1) In the properties dialog for the file "AutoHotkey.exe" (or a compiled script), change the compatibility setting to "Windows XP".

2) Have the script send volume-control keystrokes to change the master volume for the entire system. For example:

Send {Volume_Up}  ; Raise the master volume by 1 interval (typically 5%).
Send {Volume_Down 3}  ; Lower the master volume by 3 intervals.
Send {Volume_Mute}  ; Mute/unmute the master volume.

Revisions/improvements are welcome.

  • Guests
  • Last active:
  • Joined: --
Did any workarounds surface? It seems that with Windows 7, even the "Win XP compatibility" trick doesn't work anymore.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
Oh? I'm able to control the volume just fine with SoundSet on Windows 7 with XP compatibility set for AutoHotkey.exe. However, Vista Audio Control Functions generally work better and with less side-effects.

HoffiMuc
  • Members
  • 10 posts
  • Last active: Apr 10 2014 09:34 AM
  • Joined: 16 Aug 2008
I solved it with a dirty workaround:
; set Master Sound to 8 (from 50 which is max on my Lenovo T510)
Send {Volume_Down 50} ; go down to 0 (no matter what volume was before)
Send {Volume_Up 8} ; increase to 8

;set Master Sound to 40 (from 50 which is max on my Lenovo T510)
Send {Volume_Up 50} ; increase to 50 (no matter what volume was before)
Send {Volume_Down 10} ; go down to 40


rattonwing
  • Guests
  • Last active:
  • Joined: --
Can soundget(or set) work properly for windows vista+ in the next version?
:)

fragman
  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
You can use the VA.ahk library which can be found on the forums for anything newer than XP.

Thrillski
  • Members
  • 195 posts
  • Last active: Mar 17 2016 03:47 PM
  • Joined: 18 Jul 2007
I like your little quick and dirty trick, although I suspect it is better to take the sound down to zero (0) before raising the volume.

If you max the volume and then shrink it, if the person is playing a file, it could be hazardous to someone's ear.