AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Preset Master Volume Fader

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Muzzi



Joined: 15 Jun 2008
Posts: 65
Location: east coast of Australia

PostPosted: Thu Jun 26, 2008 7:26 am    Post subject: Preset Master Volume Fader Reply with quote

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
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 935
Location: The Interwebs

PostPosted: Thu Jun 26, 2008 7:28 am    Post subject: Reply with quote

http://www.autohotkey.com/forum/viewtopic.php?t=23792&

Question
Back to top
View user's profile Send private message AIM Address
Muzzi



Joined: 15 Jun 2008
Posts: 65
Location: east coast of Australia

PostPosted: Thu Jun 26, 2008 7:37 am    Post subject: Reply with quote

Krogdor, I have already gone down that path.. that's what the search page is for... thanks. Confused

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
View user's profile Send private message
garry



Joined: 19 Apr 2005
Posts: 1035
Location: switzerland

PostPosted: Thu Jun 26, 2008 7:44 am    Post subject: Reply with quote

works in XP
Code:
soundset,0,master,mute         ;SPEAKER=MASTER ON
SoundSet,95,master             ;SPEAKER=MASTER volume set to 95 procent
Back to top
View user's profile Send private message
Muzzi



Joined: 15 Jun 2008
Posts: 65
Location: east coast of Australia

PostPosted: Thu Jun 26, 2008 8:11 am    Post subject: Reply with quote

Thanks Garry, Nice One! I shall give it a go and get back if I run into problems.

Ciao
_________________
̊˳ɱטᶚᶚї˳̊
Back to top
View user's profile Send private message
Muzzi



Joined: 15 Jun 2008
Posts: 65
Location: east coast of Australia

PostPosted: Thu Jun 26, 2008 8:21 am    Post subject: Reply with quote

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
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 935
Location: The Interwebs

PostPosted: Thu Jun 26, 2008 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Muzzi



Joined: 15 Jun 2008
Posts: 65
Location: east coast of Australia

PostPosted: Thu Jun 26, 2008 11:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group