AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Winamp Sound Device Changer

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Bigrob55



Joined: 24 Sep 2007
Posts: 37

PostPosted: Mon Sep 15, 2008 9:28 pm    Post subject: Winamp Sound Device Changer Reply with quote

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. Very Happy

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!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group