One of my occasional script...
It is a volume control with an icon in tray.
You can download it from here
([#np] = number from numeric pad)
[Ctrl]+[3np] = toggle mute
[Ctrl]+[7np] = +2 volume
[Ctrl]+[1np] = -2 volume
[Shift]+[Ctrl]+[7np] = +0.5 volume
[Shift]+[Ctrl]+[1np] = -0.5 volume
[Ctrl]+[3] = tray test
What think about it?
Volume in tray
Started by
PerezDeQueya80
, Dec 20 2005 01:21 PM
13 replies to this topic
#1
-
Posted 20 December 2005 - 01:21 PM
It's nice...
Why don't you post the code here, a bit more information on what it does, and offer some screenshots of the icon changing?
:wink:
Why don't you post the code here, a bit more information on what it does, and offer some screenshots of the icon changing?
:wink:
#3
-
Posted 21 December 2005 - 12:34 PM
ok
the code is this:
the code is this:
#HotkeyInterval 100 ; Increase this value slightly to reduce the problem. #MaxHotkeysPerInterval 1000 ; Decreasing this value (milliseconds) should also help. #Persistent #SingleInstance Gosub, refreshvol ^Numpad3::Gosub, volMute ^Numpad7::Gosub, volUpUp ^Numpad1::Gosub, volDownDown ^NumpadHome::Gosub, volUp ^NumpadEnd::Gosub, volDown ^3::Gosub, test return ; _________ ICON VOLUME _________ volMute: SoundSet, -1, MASTER, MUTE ; Toggle mute Gosub, refreshvol return volUp: SoundSet, +0.5, MASTER, VOLUME ; Volume Up Gosub, refreshvol return volDown: SoundSet, -0.5, MASTER, VOLUME ; Volume Down Gosub, refreshvol return volUpUp: SoundSet, +2, MASTER, VOLUME ; Volume Up Gosub, refreshvol return volDownDown: SoundSet, -2, MASTER, VOLUME ; Volume Down Gosub, refreshvol return refreshvol: volico=1; SoundGet, vol, MASTER, MUTE if vol = OFF { SoundGet, vol, MASTER, VOLUME if vol=0 { volico = 1 } else { volico := (vol * 0.15) volico := volico + 2 } } ;MSgBox %volico% Menu, tray, Icon, volicos.icl, %volico% return test: menu, tray, Icon, volicos.icl, 1 Sleep, 500 menu, tray, Icon, volicos.icl, 2 Sleep, 100 menu, tray, Icon, volicos.icl, 3 Sleep, 100 menu, tray, Icon, volicos.icl, 4 Sleep, 100 menu, tray, Icon, volicos.icl, 5 Sleep, 100 menu, tray, Icon, volicos.icl, 6 Sleep, 100 menu, tray, Icon, volicos.icl, 7 Sleep, 100 menu, tray, Icon, volicos.icl, 8 Sleep, 100 menu, tray, Icon, volicos.icl, 9 Sleep, 100 menu, tray, Icon, volicos.icl, 10 Sleep, 100 menu, tray, Icon, volicos.icl, 11 Sleep, 100 menu, tray, Icon, volicos.icl, 12 Sleep, 100 menu, tray, Icon, volicos.icl, 13 Sleep, 100 menu, tray, Icon, volicos.icl, 14 Sleep, 100 menu, tray, Icon, volicos.icl, 15 Sleep, 100 menu, tray, Icon, volicos.icl, 16 Sleep, 100 menu, tray, Icon, volicos.icl, 17 returnand the effect on tray is this (simulate):
#4
-
Posted 21 December 2005 - 01:14 PM
It would be nice if the tray icon reflected the position of the volume slider in Volume Control.
#5
-
Posted 21 December 2005 - 03:14 PM
"Anything worth doing is worth doing slowly." - Mae West
The tray already reflect the position of the master volume...It would be nice if the tray icon reflected the position of the volume slider in Volume Control.
#6
-
Posted 21 December 2005 - 03:45 PM
To clarify what I meant, the icon should change if I move the volume control slider in Volume Control.
#7
-
Posted 21 December 2005 - 03:51 PM
"Anything worth doing is worth doing slowly." - Mae West
In effect this not workTo clarify what I meant, the icon should change if I move the volume control slider in Volume Control.
But I don't know how to do this... maybe with a constant refresh?
#8
-
Posted 21 December 2005 - 04:05 PM
I added this before the gosub in the autoexecute section:
settimer, refreshvol, 500
#9
-
Posted 21 December 2005 - 04:07 PM
"Anything worth doing is worth doing slowly." - Mae West
I like the tray icon effect, thank you for sharing. :) I shortened the refreshvol section a little:
refreshvol: soundget, vol, master soundget, mute, master, mute if (vol = 0 or mute = "on") menu, tray, icon, volicos.icl, 1 else { volico := ((vol * 0.15) + 2) menu, tray, icon, volicos.icl, %volico% } return
#11
-
Posted 21 December 2005 - 07:39 PM
"Anything worth doing is worth doing slowly." - Mae West
I like the script very much, but I changed the icons to:
https://ahknet.autoh...One/volicos.icl
It's better to see full volume level and I like these colors more.
Also I added this(from another script) for Wheelcontrol of volume level with the taskbar:
https://ahknet.autoh...One/volicos.icl
It's better to see full volume level and I like these colors more.
Also I added this(from another script) for Wheelcontrol of volume level with the taskbar:
WheelDown:: CoordMode, mouse, screen MouseGetPos, x, y SysGet, sy, 1 if (y>sy-30) { SoundSet, -5 GoSub, refreshvol } else Send {WheelDown} return WheelUp:: CoordMode, mouse, screen MouseGetPos, x, y SysGet, sy, 1 if (y>sy-30) { SoundSet, +5 GoSub, refreshvol } else Send {WheelUp} return
#12
-
Posted 21 December 2005 - 10:12 PM
Sorry for question in Scripts & Functions section.
how to make action if mouse is detected in bottom right corner.
example
WheelDown:: CoordMode, mouse, screen MouseGetPos, x, y SysGet, sy, 1 SysGet, sx, 0 if (y>sy-30); cant figure out how to make likex>sx-30 and y>sy-30 if (x>sx-30);^ { blabla.. }
how to make action if mouse is detected in bottom right corner.
example
-------- | | | __| | | | --------
#13
-
Posted 05 January 2006 - 10:59 PM
Assuming I understand correctly, I think you would write it as:if (y>sy-30); cant figure out how to make likex>sx-30 and y>sy-30
if (x>sx-30);^
if (y > sy-30 AND x > sx-30)
...
#14
-
Posted 06 January 2006 - 04:31 PM