Jump to content

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

The Winamp Song Title & Function Bar


  • Please log in to reply
2 replies to this topic
Muzzi
  • Members
  • 111 posts
  • Last active: Dec 15 2013 03:54 AM
  • Joined: 15 Jun 2008
This is fairly straight forward plain and simple.

I did it so I could not only prevent access from the menu bar and the close button but to give you easier access to the controls without cramping the library and playlist views. Works great if you are using it on a larger TV or monitor in conjunction with a remote presenter mouse.

For all to enjoy!! =)
Posted Image

If anyone knows how to remove the "Winamp" text at the end of the song title I would love to know.

Posted Image




#Persistent
Run Winamp

Gui, -Caption
Winset, Transcolor, 000000 192, wintitle
Gui, +AlwaysOnTop
Gui, Color, F50000
Gui, Show, x1280 y-1 h40 w1280  ; bottom of screen mask

SavedWATitle=
setTimer WinampTitle,100
return

;-----the buttons-----
WinampTitle:
IfWinExist ahk_class Winamp v1.x
{
WinGetTitle CurrentWATitle,ahk_class Winamp v1.x
if CurrentWATitle<>%SavedWATitle%
{
Gui 1:-Caption
Gui 1:+AlwaysOnTop
Gui 1:Color, 000000
Gui 1:Submit, nohide
Gui 1:Font, S16 cRed Bold , Tahoma
Gui 1:Add, Button, x5 y1 w25 h35, <
Gui 1:Font, S16 cRed Bold , Tahoma
Gui 1:Add, Button, x118 y1 w25 h35, >
Gui 1:Font, S16 cRed Bold , Tahoma
Gui 1:Add, Button, x29 y1 w90 h35, PLAY
Gui 1:Font, S14 cRed Bold , Tahoma
Gui 1:Add, Button, x147 y1 w60 h35, STOP
Gui 1:Font, S14 cRed Bold , Tahoma
Gui 1:Add, Button, x212 y1 w100 h35, VISUALS
Gui 1:Font, S9 cRed, Tahoma
Gui 1:Add, Button, x320 y1 w45 h16, UP
Gui 1:Font, S9 cRed, Tahoma
Gui 1:Add, Button, x320 y18 w45 h18, DOWN
Gui 1:Font, S20 cD3FC00, ariel
Gui 1:Add, Text, x380 y5, %CurrentWATitle%
Gui 1:Add, Text, x380 y5, %A_Space%                                                                                                                    . ;clear the bar
SavedWATitle:=CurrentWATitle
}
}
return

;-----the button commands-----
ButtonPLAY:
DetectHiddenWindows, On
Target := "ahk_class Winamp v1.x"
IfWinNotExist %Target%
{
Run "%ProgramFiles%\Winamp\Winamp.exe"
WinWait, %Target%
}
SendMessage, 1024, 0, 104   ; Is Winamp Playing?
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 0 )
{
ControlSend, ahk_parent, x  ; Play
}
else
{
ControlSend, ahk_parent, c  ; Pause
}
return

button<:
DetectHiddenWindows, On
Target := "ahk_class Winamp v1.x"
IfWinNotExist %Target%
{
Run "%ProgramFiles%\Winamp\Winamp.exe"
WinWait, %Target%
}
SendMessage, 1024, 0, 104 
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 1 )
{
ControlSend, ahk_parent, z  ; previous track
}
return

button>:
DetectHiddenWindows, On
Target := "ahk_class Winamp v1.x"
IfWinNotExist %Target%
{
Run "%ProgramFiles%\Winamp\Winamp.exe"
WinWait, %Target%
}
SendMessage, 1024, 0, 104   ; IsWinampPlaying?
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 1 )
{
ControlSend, ahk_parent, b  ; Next track
}
return

buttonSTOP:
DetectHiddenWindows, On
Target := "ahk_class Winamp v1.x"
IfWinNotExist %Target%
{
Run "%ProgramFiles%\Winamp\Winamp.exe"
WinWait, %Target%
}
SendMessage, 1024, 0, 104   ; IsWinampPlaying?
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 1 )
{
ControlSend, ahk_parent, v  ; stop
}
return

buttonVISUALS:
DetectHiddenWindows, On
Target := "ahk_class Winamp v1.x"
IfWinNotExist %Target%
{
Run "%ProgramFiles%\Winamp\Winamp.exe"
WinWait, %Target%
}
SendMessage, 1024, 0, 104   ; IsWinampPlaying?
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 1 )
{
ControlSend, ahk_parent, ^+k  ; visuals
}
return

buttonUP:
DetectHiddenWindows, On
Target := "ahk_class Winamp v1.x"
IfWinNotExist %Target%
{
Run "%ProgramFiles%\Winamp\Winamp.exe"
WinWait, %Target%
}
SendMessage, 1024, 0, 104   ; IsWinampPlaying?
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 1 )
{
ControlSend, ahk_parent, {up}  ; volume up
ControlSend, ahk_parent, {up}
}
return

buttonDOWN:
DetectHiddenWindows, On
Target := "ahk_class Winamp v1.x"
IfWinNotExist %Target%
{
Run "%ProgramFiles%\Winamp\Winamp.exe"
WinWait, %Target%
}
SendMessage, 1024, 0, 104   ; IsWinampPlaying?
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 1 )
{
ControlSend, ahk_parent, {down}  ; volume down
ControlSend, ahk_parent, {down} 
}
return

Esc::ExitApp


Muzzi
  • Members
  • 111 posts
  • Last active: Dec 15 2013 03:54 AM
  • Joined: 15 Jun 2008
If all you get is just a hideous red bar then you need to install Winamp to see it working in full flight otherwise it's useless.

If you do have it then Winamp will open when you run the script. ;)

The war II
  • Members
  • 28 posts
  • Last active: May 12 2018 05:04 PM
  • Joined: 01 Jun 2013

THANKS YOU it is working

i fix short

^f::
DetectHiddenWindows, On
Target := "ahk_class WMPlayerApp"
IfWinNotExist %Target%
{
Run C:\Program Files\Windows Media Player\wmplayer.exe
WinWait, %Target%
}
SendMessage, 1024, 0, 104   ; Is Winamp Playing?
WinampPlayStatus := ErrorLevel
If( WinampPlayStatus == 0 )
{
ControlSend, ahk_parent, ^p  ; Play
}
else
{
ControlSend, ahk_parent, ^s  ; Pause
}
Return