| View previous topic :: View next topic |
| Author |
Message |
Muzzi
Joined: 15 Jun 2008 Posts: 65 Location: east coast of Australia
|
Posted: Thu Jun 26, 2008 7:26 am Post subject: Preset Master Volume Fader |
|
|
Can someone kindly help me out? I would like to be able to set the master audio/mixer fader in Vista to about 95% so I know everytime I play some tunes that my sound card isnt peaking out.
I am aware of this code...
send {Volume_up}
which will send up the fader but it takes it to 100% everytime and was wondering if anyone knows the code so it can be preset it to a set level everytime.
Thanks in advance. _________________
̊˳ɱטᶚᶚї˳̊ |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 935 Location: The Interwebs
|
|
| Back to top |
|
 |
Muzzi
Joined: 15 Jun 2008 Posts: 65 Location: east coast of Australia
|
Posted: Thu Jun 26, 2008 7:37 am Post subject: |
|
|
Krogdor, I have already gone down that path.. that's what the search page is for... thanks.
The reason I opted to ask is becuase the scripts there is like a jungle to me and I wouldnt know where to start.
I'd appreciate if yourself or someone could run me through the basics of how to set a simple preset. _________________
̊˳ɱטᶚᶚї˳̊ |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1035 Location: switzerland
|
Posted: Thu Jun 26, 2008 7:44 am Post subject: |
|
|
works in XP
| Code: | soundset,0,master,mute ;SPEAKER=MASTER ON
SoundSet,95,master ;SPEAKER=MASTER volume set to 95 procent
|
|
|
| Back to top |
|
 |
Muzzi
Joined: 15 Jun 2008 Posts: 65 Location: east coast of Australia
|
Posted: Thu Jun 26, 2008 8:11 am Post subject: |
|
|
Thanks Garry, Nice One! I shall give it a go and get back if I run into problems.
Ciao _________________
̊˳ɱטᶚᶚї˳̊ |
|
| Back to top |
|
 |
Muzzi
Joined: 15 Jun 2008 Posts: 65 Location: east coast of Australia
|
Posted: Thu Jun 26, 2008 8:21 am Post subject: |
|
|
Garry, this only works for the AHK fader. I tried it and it doesnt work.
I will look further through the help section from what you given me and see how I go from there. Cheers. _________________
̊˳ɱטᶚᶚї˳̊ |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 935 Location: The Interwebs
|
Posted: Thu Jun 26, 2008 8:30 am Post subject: |
|
|
The AHK built in sound functions do NOT work in Vista. Hence, the link I posted.
First off, I'm assuming you know how to use the #Include directive? Or Standard Libraries, either way.
Anyway, download the VA (Vista Audio) functions in the link, as well as the COM functions needed to support them (link to that provided within the link) and include them in your script.
Next, you need to call Com_Init() before you can use any of the VA functions. Then, to set the master volume, use VA_SetMasterVolume(#). In your case, you said you wanted it to be 95%, so, your script should look like this:
| Code: |
#Include VA.ahk
Com_Init()
VA_SetMasterVolume(95) |
|
|
| Back to top |
|
 |
Muzzi
Joined: 15 Jun 2008 Posts: 65 Location: east coast of Australia
|
Posted: Thu Jun 26, 2008 11:59 pm Post subject: |
|
|
| Quote: | | The AHK built in sound functions do NOT work in Vista. Hence, the link I posted. |
I'm sorry but there had to find a better and much simpler script to preset the master fader in Vista.
| Quote: | | Anyway, download the VA (Vista Audio) functions in the link, as well as the COM functions needed to support them (link to that provided within the link) and include them in your script. |
Why bother..... sorry Krogdor no offence to you but I didnt see the point.
This is a lot, lot simpler and it works fine for my needs...
http://www.autohotkey.com/forum/viewtopic.php?t=33134
| Code: | Send {Volume_down 50} ;sends master fader to zero everytime
sleep, 100 ; 100mS failsafe delay
send {Volume_Up 49} ; sends master fader to 98% (this can be preset to whatever you like - enter 1/2 the percentage that's required )
return |
It doesnt matter on the last positition the fader is sitting as it will send the fader to 0 everytime before it sends it up to a volume of 98%. Yes I know it beats sifting through a jungle like script for no need.
Hope others can find this useful
Thanks all the same Krogdor. _________________
̊˳ɱטᶚᶚї˳̊ |
|
| Back to top |
|
 |
|