have read the article in CT´ today and was happy about getting such a tool... - thank you
then I start trying and testing and then I do the mod for OSD-Volume-set-script (I use the script of Rajat and hints from CT´ - thanx to both) -
here it is :
; AHK-script by catch17
; 07-02-2005
version = 0.9
title = 'Volume_By_Wheel'_v%version%
name = 'Volume_By_Wheel'
SetWorkingDir %A_ScriptDir% ; To correctly find the icon.
Menu, TRAY, Tip, Master_VOLUME: 'ALT'+MouseWheel`nWave_VOLUME: 'WIN'+'ALT'+ MouseWheel`nVOLUME aus/ein: 'WIN'+'ALT'+'LEERTASTE'
IfExist volum.ico
Menu, TRAY, Icon, volum.ico
; Eigenes Menü erstellen
Menu, TRAY, NoStandard
Menu, TRAY, Add, Hilfe , hilfe
Menu, TRAY, Add
Menu, TRAY, Add, Icon ausblenden , hide_VolByWheel
Menu, TRAY, Add
Menu, TRAY, Add, Autostart einrichten , win_autostart
Menu, TRAY, Add, Autostart entfernen , no_autostart
Menu, TRAY, Add
Menu, TRAY, Add, Beenden , Quit_VolByWheel
Menu, TRAY, Default, Hilfe
; Schritte pro "Scroll-Einheit":
vol_Step = 4
; Dauer der OSD Anzeige in Millisekunden:
vol_DisplayTime = 2000
; Master Volume Balken Farbe
vol_CBM = 6666FF
; Wave Volume Balken Farbe
vol_CBW = 9999FF
; Hintergrund Farbe des Balkens
vol_CW = CCCCFF
; Balkenposition am Schirm (x0y0 ist links oben!).
vol_PosX = 18
vol_PosY = 18
vol_Width = 180 ; Balkenbreite
vol_Thick = 18 ; Balkenstärke
HotKey,!WheelUp, vol_MasterUp
HotKey,!WheelDown, vol_MasterDown
HotKey,#!WheelUp, vol_WaveUp
HotKey,#!WheelDown, vol_WaveDown
HotKey,#!SPACE, vol_mute
;-----------------------------------------------------------
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%
; Position des OSD
if vol_PosX >= 0
{
vol_BarOptionsMaster = %vol_BarOptionsMaster% X%vol_PosX%
vol_BarOptionsWave = %vol_BarOptionsWave% X%vol_PosX%
}
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_mute:
SoundSet, +2,,mute
return
vol_ShowBars:
IfWinNotExist, vol_Wave
Progress, %vol_BarOptionsWave%, , , vol_Wave
IfWinNotExist, vol_Master
{
; Berechnung der Position um Auflösungsveränderung während ausführen des Scripts zu berücksichtigen
if vol_PosY < 0
{
;Wave-Balke unter Master-Balken erstellen
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
}
; Volumes werden ausgelesen:
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
;---------------------------------
;Menue-Befehle
;---------------------------------
hilfe:
{
msgbox, ,Hilfe zu %title%,'ALT'-Taste + MausRad vor -> Master Volume lauter`n'ALT'-Taste + MausRad zurück -> Master Volume leiser`n`n'ALT'+'WIN'-Taste + MausRad vor -> Wave Volume lauter`n'ALT'+'WIN'-Taste + MausRad zurück -> Wave Volume leiser `n`n'WIN'+'ALT'+'LEERTASTE' -> Volume aus/ein`n`n
}
return
;---------------------------------
hide_VolByWheel:
; Aktion bestätigen lassen
MsgBox,36,%title%, Soll das %name%- Icon wirklich aus dem SysTray entfernt werden?`n`n
IfMsgBox, Yes ; Wenn ja
{
Menu,TRAY,NoIcon
MsgBox,64,%title%, Das %name% SysTray-Icon wird nicht mehr angezeigt.
}
return
;---------------------------------
win_autostart:
; Aktion bestätigen lassen
MsgBox,36,%title%, Soll %name% automatisch bei der Benutzeranmeldung gestartet werden?
IfMsgBox, Yes ; Wenn ja
{
; VolByWheel im Autostart des Users eintragen
RegWrite, REG_SZ, HKEY_CURRENT_USER , SOFTWARE\Microsoft\Windows\CurrentVersion\Run , VolumeByWheel , %A_ScriptFullPath%
MsgBox,64,%title%, %name% startet nun automatisch bei der Benutzeranmeldung.
}
return
;---------------------------------
no_autostart:
; Bestätigen lassen, ob VolByWheel wirklich aus Autostart entfernt werden soll
MsgBox,36,%title%, Soll der automatische Start von %name% bei der Benutzeranmeldung wirklich deaktiviert werden?
IfMsgBox, Yes ; Wenn ja
{
;VolByWheel aus dem Autostart
RegDelete, HKEY_CURRENT_USER , SOFTWARE\Microsoft\Windows\CurrentVersion\Run , VolumeByWheel
MsgBox, 64, %title%, %name% startet nun nicht mehr automatisch bei der Benutzeranmeldung.
}
return
;---------------------------------
Quit_VolByWheel:
ExitApp
return
hope you will enjoy this version of OSD-Volume-set using mousewheel - I do
-



Sign In
Create Account
Last active: Feb 10 2005 01:28 AM
Back to top