Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Volume OSD - updated


  • Please log in to reply
68 replies to this topic
Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
This script shows volume indicators as volume is increased/decreased using Winkey+Up / Winkey+Down or multimedia keys (the keys can be changed)

Posted Image

Script Updated:
Now you can change Master Volume AND Wave Volume, both showing OSD.
Also, hotkeys section is moved to top of script to allow easy customisation to newbies.


;_________________________________________________ 
;_______Volume OSD Script   - Rajat_______________ 
;_________________________________________________ 


;_________________________________________________ 
;_______User Settings_____________________________ 

;Make customisation only in this area


;change characters for empty & full bar here 
Full = | 
Empty = - 

;set bar position here (relative to desktop) 
setenv, PosX, 350 
setenv, PosY, 510 


;Customise Hotkeys here
HotKey, #Up, VolUp
HotKey, #Down, VolDn

HotKey, ^#Up, wVolUp
HotKey, ^#Down, wVolDn



;___________________________________________ 
;_____Auto Execute Section__________________ 

; DON'T CHANGE ANYTHING HERE!! 
; (unless u know what u're doing) 

SetFormat, float, 0.0 
SetTimer, splashoff, 1000 
CoordMode, ToolTip, Screen 
SoundGet, currsnd1 



;Building Empty Bar 
Loop, 25 
  EmptyBar = %EmptyBar%%Empty%
  
Exit

Display:
	IfNotEqual, Type, W, SoundGet, currsnd
	IfEqual, Type, W, SoundGet, currsnd, Wave
	if currsnd1 <> %currsnd% 
	{ 
		IfNotEqual, Type, W, ToolTip, %currsnd%`% %curr%, %PosX%, %PosY% 
		IfEqual, Type, W, ToolTip, * %currsnd%`% %curr%, %PosX%, %PosY%
		currsnd1 = %currsnd% 
	} 
	Type =

	setenv, presstime, %A_MDay%%A_hour%%A_Min%%A_Sec% 
	envadd, presstime, 2 
	SetTimer, SplashOff, On 
return 


Splashoff: 
  setenv, presstime2, %A_MDay%%A_hour%%A_Min%%A_Sec% 
  ifgreaterorequal, presstime2, %presstime% 
  { 
	 ToolTip 
	 SetTimer, SplashOff, off 
  } 
return 



;___________________________________________ 
;_____Hotkey Customisation Section__________ 

; User defined hotkeys here 


wVolUp:
	Type = W
VolUp:
	#MaxHotkeysPerInterval 50 
	
	IfNotEqual, Type, W
	{
		SoundSet, +4       
		SoundGet, currsnd
	}
	
	IfEqual, Type, W
	{
	   SoundSet, +4, Wave
	   SoundGet, currsnd, Wave
	}
	
	mark=0 
	curr=%EmptyBar% 
	loopup: 
	mark += 4 
	iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full% 
	iflessorequal,mark, %currsnd%, goto, loopup 
	gosub, display 
return 


wVolDn:
	Type = W
VolDn:
	#MaxHotkeysPerInterval 50 
	
	IfNotEqual, Type, W
	{
		SoundSet, -4       
		SoundGet, currsnd
	}
	
	IfEqual, Type, W
	{
	   SoundSet, -4, Wave
	   SoundGet, currsnd, Wave
	}
	
	mark=0 
	curr=%EmptyBar% 
	loopdown: 
	mark += 4 
	iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full% 
	iflessorequal,mark, %currsnd%, goto, loopdown 
	gosub, display 
return 

;___________________________________________ 


MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I tried it... it's very slick, nice work. I might wind up using a variant of this.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
if that variancy is not for some personal reqmt, then do post it! as i use this script regularly, any improvement is welcome! :)

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
I use the right and left keys to do things as well.

#LEFT:: ; Windows Key + LEFT
SoundSet, 1 ; Set volume to 1%
SoundSet, 100, wave ; Set Wave volume to 100%
return

#RIGHT:: ; Windows Key + RIGHT
SoundSet, +1, , mute ; Toggles Mute on and off
SoundSet, 100, wave ; Set Wave volume to 100%
return

I hate how some media players, msn voice chat, etc... change the Wave volume instead of the master volume. So I like to keep it at 100%.

thanks,
beardboy

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
The script above has been changed to use ToolTip (v1.0.9+) instead of SplashText. This looks better.

Also the script has been optimized so that the timer doesn't keep running.... its run only for about 2 seconds when the hotkey is pressed, then again turned off.

Chris, do give it a try... the new command looks nice. This is the general purpose use i've put the command to, other than the more serious uses that now this command will be used for.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
Chris and Rajat,

Already added ToolTip to a script I have, great addition.

thanks,
beardboy

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

Chris, do give it a try... the new command looks nice. This is the general purpose use i've put the command to, other than the more serious uses that now this command will be used for.

I tried it and it looks good. It seems that ToolTip has more general purpose uses than TrayTip. In addition, TrayTip (since it uses balloon help) only works on Win2k and XP I think.

beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004

I tried it and it looks good. It seems that ToolTip has more general purpose uses than TrayTip. In addition, TrayTip (since it uses balloon help) only works on Win2k and XP I think.

Balloon Popups like MSN Messenger? Is that a new feature that is on the list?

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
actually i'd asked for balloon tips (traytips) too, but tooltips has turned out better than my expectations... the most important is that it has no amount of text limitations. and Chris has enabled multi-line support.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
AutoIt3 uses "balloon help" (or whatever the official name for it is) to do a TrayTip. I don't know if you can have these balloon windows elsewhere on the screen. In any case, TrayTip should be in the next release even though it only works on XP/2000.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

TrayTip should be in the next release

... that's great! ... it always positions itself above tray notification area, so absolute placement is no problem... also it has a title & a close button (if title added).

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004

also it has a title & a close button (if title added).

Hopefully it will have a timeout Option to auto close the notification, and Label option that if the user clicked on the message it would GoSub to the label. ;)

thanks,
beardboy

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

Hopefully it will have a timeout Option to auto close the notification, and Label option that if the user clicked on the message it would GoSub to the label.

Great stuff. If it's readily doable I'll try to include it.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

and Label option that if the user clicked on the message it would GoSub to the label

I think this is achievable, but according to MSDN it would only work on Windows XP. Is it still something you would use? It'll stay on the list in any event, since I'm sure someone would find it useful.

beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004

Is it still something you would use? It'll stay on the list in any event, since I'm sure someone would find it useful.

When you guys mentioned Balloon Help, for some reason I got it stuck in my head that it was like msn messenger popups :oops: . TrayTip is a very nice addition, and with things only working on 2000/XP I'll take it either way, even though 99% of the PC I remotely manage are still on NT. I'll still use it where I can.

thanks,
beardboy