Bigrob55
Joined: 24 Sep 2007 Posts: 37
|
Posted: Mon Sep 15, 2008 9:28 pm Post subject: Winamp Sound Device Changer |
|
|
Winamp Sound Changer v2
This is a very helpful little script that allows me to swtich between having winamp play audio to my USB Headset, Desktop Speakers, or my FM Transmitter on the fly!
As soon as you take a look @ it, you can change it to fite your Audio Devices.
| Code: | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2
#SingleInstance Force
;===========================================================
TrayTip,Winamp Sound Changer,Right Click Icon To Select Sound Deivce!,30,17
;Right Click Menu ===================================
Menu, tray, NoStandard
Menu, Tray, Icon,Winamp.ico
Menu, tray, add, 1 - Logitech, Start1
Menu, tray, add ; Creates a separator line.
Menu, tray, add, 2 - SoundMax, Start2
Menu, tray, add ; Creates a separator line.
Menu, tray, add, 3 - RocketFM, Start3
Menu, tray, add ; Creates a separator line.
Menu, tray, add, Close, END
;===========================================================
~1:: ;Logitech
Start1:
IfWinNotExist, Main Window
{
Sleep 100
WinShow, Main Window
Gosub, Start1
}
else
{
WinActivate, Main Window
Send ^p ;Opens Winamp Preferences
Send {down 50}
sleep 20
Send {up 5}
sleep 20
Send !c ;Opens DirectSound Outputsettings
WinWait, DirectSound output settings
PostMessage, 0x201, , , Button5, DirectSound output settings, Refresh
sleep 20
PostMessage, 0x202, , , Button5, DirectSound output settings, Refresh
sleep 20
Send {left}{up 4}{down 1}
sleep 20
Send {enter}
Send {esc}
sleep 200
WinHide, Main Window
GoSub, submit
TrayTip,Changed Winamp Sound To:,Logitech,30,0
sleep,1500
ExitApp
}
;===========================================================
~2:: ;SoundMax
Start2:
IfWinNotExist, Main Window
{
Sleep 100
WinShow, Main Window
Gosub, Start2
}
else
{
WinActivate, Main Window
Send ^p ;Opens Winamp Preferences
Send {down 50}
sleep 20
Send {up 5}
sleep 20
Send !c ;Opens DirectSound Outputsettings
WinWait, DirectSound output settings
PostMessage, 0x201, , , Button5, DirectSound output settings, Refresh
sleep 20
PostMessage, 0x202, , , Button5, DirectSound output settings, Refresh
sleep 20
Send {left}{up 4}{down 2}
sleep 20
Send {enter}
Send {esc}
sleep 200
WinHide, Main Window
GoSub, submit
TrayTip,Changed Winamp Sound To:,SoundMax,30,0
sleep,1500
ExitApp
}
;===========================================================
~3:: ;RocketFM
Start3:
IfWinNotExist, Main Window
{
Sleep 100
WinShow, Main Window
Gosub, Start3
}
else
{
WinActivate, Main Window
Send ^p ;Opens Winamp Preferences
Send {down 50}
sleep 20
Send {up 5}
sleep 20
Send !c ;Opens DirectSound Outputsettings
WinWait, DirectSound output settings
PostMessage, 0x201, , , Button5, DirectSound output settings, Refresh
sleep 20
PostMessage, 0x202, , , Button5, DirectSound output settings, Refresh
sleep 20
Send {left}{up 4}{down 3}
sleep 20
Send {enter}
Send {esc}
sleep 200
WinHide, Main Window
GoSub, submit
TrayTip,Changed Winamp Sound To:,RocketFM,30,0
sleep,1500
ExitApp
}
;===========================================================
submit:
Send, !^{left}
sleep 500
return
;===========================================================
END:
ExitApp |
_________________ Bigrob
L337 Speak - A Ventrilo Client Side program
Winamp Sound Changer - Change Audio Output on the Fly! |
|