AutoHotkey Community

It is currently May 26th, 2012, 11:58 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: March 27th, 2005, 5:03 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
For a simpler solution look here.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2005, 7:48 pm 
Hi,
Is it possible to change a mixer rather than the System Volume with this script?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2005, 8:14 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
In my very simple script run sndvol32 /advanced, (instead of /tray) which brings up the GUI of the sound settings. Playing around with the mouse coordinates allows you to set whatever you want.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2005, 9:40 pm 
Well, that shows up the whole mixer-window on the screen, witch is a bit annoying. The soundcard I have doesn’t have an option for adjusting master volume, so the mixer lines needs to be adjusted directly. Since the Logitech mouse I have only have an options for adjusting the master volume with its volume buttons, I would like to create a windows hotkey and assign that hotkey to the buttons instead. I understand that a script like this could be the way to go.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2005, 12:37 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
I meant that having the whole mixer window up, you could position the mouse pointer on the mixer slider and a hotkey, like #Up drags it by a certain amount, until it hits top or bottom. After a short idle time the mixer window could be closed.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2005, 2:15 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Ringnes wrote:
the mixer lines needs to be adjusted directly
SoundSet should be able to adjust virtually any mixer setting other than balance. There's a relatively new script at the bottom of the SoundSet page that lists your mixer's available settings, even if your system has more than one mixer.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 6:42 pm 
how to make this script working in WinLIRC script, to bind button to volume up and volume down...
example from winlirc

buttonumber1:
VolUp
return

buttonumber2:
VolDn
return

------
somthing like that
Code:
HotKey, buttonumber1, VolUp
HotKey, buttonumber2, VolDn

ž


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2006, 1:08 am 
Offline

Joined: October 29th, 2006, 10:19 pm
Posts: 67
Location: Arcata, CA. USA
How can I make it have a mute control which has an indicator box much like the volume indicator that pops up.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2006, 7:06 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
just so that it doesn't seem that mrjohnnycake's msg got ignored, i'm replying him on PM, which i happened to see before this post.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2007, 1:58 am 
Offline

Joined: October 29th, 2006, 4:09 am
Posts: 39
Location: A2 MI
I've made a few additions to this script for my benefit, and perhaps that of others. One thing that made me adapt this particular script, is that it doesn't cause an alt-tab out of games when i use the volume controls, like other Volume Bar scripts do.

The changes are the following:
-If master mute is on, displays "All Muted" below the master volume bar.
-If the variable that sets the "PC Spk Mute" option is ON (In my case, MASTER, ONFF has value 'on'), displays "PC Spk. Muted". For more on this feature, see this thread.
-Reduced time of display
-Extra hints/instructs included at start of code

Apologies if I forgot any other changes I made to this script... but i'm fairly certain that's it. It's just been in my "AlwaysRunning.ahk" for a while and has received tinkering at times.

Hope this is useful to someone. I'm happy with it myself... tinkering with AHK code is fun.

Code:
; Volume On-Screen-Display (OSD) -- by Rajat
; http://www.autohotkey.com
; This script assigns hotkeys of your choice to raise and lower the
; master and/or wave volume.  Both volumes are displayed as different
; color bar graphs.

; Further features added by Gertlex (Sept. 2007)
; * Message displayed if master mute is on
; * Message displayed if pc spk mute is on
; * Also changed display time from 2000ms to 500ms
; * Additional hotkeys for laptop's built in volume control buttons
;    ...probably universal

; To change pcspk mute variable (the actual variable varies between computers)
; see the line with comment "; Laptop's speakers" in vol_ShowBars function.
; Correct variable can be found by using the SoundCardAnalysis.ahk (code is
; in AHK help... or search for it) and experimenting with the PC Spk Mute
; (which can probably be found in "Volume Control" -> Advanced

;_________________________________________________
;_______User Settings_____________________________

; Make customisation only in this area or hotkey area only!!

; The percentage by which to raise or lower the volume each time:
vol_Step = 4

; How long to display the volume level bar graphs:
vol_DisplayTime = 500

; Master Volume Bar color (see the help file to use more
; precise shades):
vol_CBM = Black

; Wave Volume Bar color
vol_CBW = Blue

; Background color
vol_CW = Silver

; Bar's screen position.  Use -1 to center the bar in that dimension:
vol_PosX = 100
vol_PosY = 950
vol_Width = 200  ; width of bar
vol_Thick = 24   ; thickness of bar

; If your keyboard has multimedia buttons for Volume, you can
; try changing the below hotkeys to use them by specifying
; Volume_Up, ^Volume_Up, Volume_Down, and ^Volume_Down:
HotKey, #Up, vol_MasterUp      ; Win+UpArrow
HotKey, #Down, vol_MasterDown
HotKey, +#Up, vol_WaveUp       ; Shift+Win+UpArrow
HotKey, +#Down, vol_WaveDown
Hotkey, SC12E, vol_MasterDown
Hotkey, SC130, vol_MasterUp


;___________________________________________
;_____Auto Execute Section__________________

; DON'T CHANGE ANYTHING HERE (unless you know what you're doing).

vol_BarOptionsMaster = 1:B ZH%vol_Thick% ZX0 ZY0 W%vol_Width% CB%vol_CBM% CW%vol_CW%
vol_BarOptionsWave   = 2:B ZH%vol_Thick% ZX0 ZY0 W%vol_Width% CB%vol_CBW% CW%vol_CW%

; If the X position has been specified, add it to the options.
; Otherwise, omit it to center the bar horizontally:
if vol_PosX >= 0
{
   vol_BarOptionsMaster = %vol_BarOptionsMaster% X%vol_PosX%
   vol_BarOptionsWave   = %vol_BarOptionsWave% X%vol_PosX%
}

; If the Y position has been specified, add it to the options.
; Otherwise, omit it to have it calculated later:
if vol_PosY >= 0
{
   vol_BarOptionsMaster = %vol_BarOptionsMaster% Y%vol_PosY%
   vol_PosY_wave = %vol_PosY%
   vol_PosY_wave += %vol_Thick%
   vol_BarOptionsWave = %vol_BarOptionsWave% Y%vol_PosY_wave%
}

#SingleInstance
SetBatchLines, 10ms
Return


;___________________________________________

vol_WaveUp:
SoundSet, +%vol_Step%, Wave
Gosub, vol_ShowBars
return

vol_WaveDown:
SoundSet, -%vol_Step%, Wave
Gosub, vol_ShowBars
return

vol_MasterUp:
SoundSet, +%vol_Step%
Gosub, vol_ShowBars
return

vol_MasterDown:
SoundSet, -%vol_Step%
Gosub, vol_ShowBars
return

vol_ShowBars:
; To prevent the "flashing" effect, only create the bar window if it
; doesn't already exist:
IfWinNotExist, vol_Wave
{
   SoundGet, master_mute,MASTER,MUTE ; System-wide mute
   SoundGet, master_onoff,MASTER,ONOFF ; Laptop's speakers

   if master_mute = On
   {
      Progress, %vol_BarOptionsWave%, , All Muted, vol_Wave
   }
   else
   {
      if master_onoff = On ; laptop speakers ARE muted
      {
         Progress, %vol_BarOptionsWave%, , PC Spk. Muted, vol_Wave
      }
      else
      {
         Progress, %vol_BarOptionsWave%, , , vol_Wave
      }
   }

}
IfWinNotExist, vol_Master
{
   ; Calculate position here in case screen resolution changes while
   ; the script is running:
   if vol_PosY < 0
   {
      ; Create the Wave bar just above the Master bar:
      WinGetPos, , vol_Wave_Posy, , , vol_Wave
      vol_Wave_Posy -= %vol_Thick%
      Progress, %vol_BarOptionsMaster% Y%vol_Wave_Posy%, , , vol_Master
   }
   else
      Progress, %vol_BarOptionsMaster%, , , vol_Master
}
; Get both volumes in case the user or an external program changed them:
SoundGet, vol_Master, Master
SoundGet, vol_Wave, Wave
Progress, 1:%vol_Master%
Progress, 2:%vol_Wave%
SetTimer, vol_BarOff, %vol_DisplayTime%
return

vol_BarOff:
SetTimer, vol_BarOff, off
Progress, 1:Off
Progress, 2:Off
return
;*******************************


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2007, 4:39 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
Gertlex wrote:
tinkering with AHK code is fun.

that's the whole idea!
thanks for the additions, really nice.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2008, 8:13 am 
Offline

Joined: July 1st, 2008, 1:28 pm
Posts: 13
Hi Rajat,

great script. Thanks:-)

It works great, when I start it directly. But as soon I try to paste it to the include section in my main ahk-Skript, it will not work.

Any ideas?

Thanks in advance,
zavjah


Last edited by zavjah on October 31st, 2008, 1:49 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2008, 3:25 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
you'll have to separate the auto-exec section while merging into another script (the part above 'Exit' in current script)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2008, 4:08 pm 
Offline

Joined: July 1st, 2008, 1:28 pm
Posts: 13
Hhhmm, I'm not sure, if I have expressed my aim correctly.

I wanted to call your script out of my one using:
Code:
#Include YourScript.ahk

(your script is in the same path as mine) and not to paste your complete code into my script.

Thanks for suggestions,
zavjah


Last edited by zavjah on October 31st, 2008, 1:49 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 4th, 2008, 4:21 pm 
Offline

Joined: November 5th, 2007, 7:25 pm
Posts: 454
Location: canada
At top of your script put

Code:
#include %A_ScriptDir%\Volume_OSD.ahk


that should work.

_________________
-=Raz=-


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], Google Feedfetcher, IsNull, Rajat and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group