04-05-2007, 01:09 PM
Here are some macs that I use to really make WA extremely useful when watching iptv or really long ambient music or multi-hour XM radio recordings.
;This macro makes WinAmp skip ahead 30 seconds without the use of its shortcuts
int hwnd=win("" "Winamp v1.x")
if(!hwnd) ret
_i=SendMessage(hwnd WM_USER 0 105)
_i+30000;;time to skip in miliseconds (this is 30 seconds)
SendMessage(hwnd WM_USER _i 106)
;This macro loops the current song or unloops depending on current status.
int y z
int hwnd=win("" "Winamp v1.x")
if(!hwnd) ret
z=SendMessage(hwnd WM_USER 0 251);;get repeat value
y=SendMessage(hwnd WM_USER 1 634);;get manual advance value
if y+z=2
,SendMessage(hwnd WM_USER 0 635)
,OnScreenDisplay("Continue" 1 1000 10 "Arial" 0 0x1d60cd 0 "psa")
else
,OnScreenDisplay("Song Repeat" 1 1000 10 "Arial" 0 0x1d60cd 0 "psa")
,SendMessage(hwnd WM_USER 1 635);;set man advance
,SendMessage(hwnd WM_USER 1 253);;set repeat
;Next track without using WA's shortcuts
men 40048 win(" - Winamp" "Winamp v1.x") ;;Next
;Previous track without using WA's shortcuts
men 40044 win(" - Winamp" "Winamp v1.x") ;;Previous
;Displays remaining time of current song.
int hwnd trkLen trkPlc remain sec
hwnd=win("" "Winamp v1.x")
if(!hwnd) ret
str timeLeft sec0
trkPlc=SendMessage(hwnd WM_USER 0 105)
trkLen=SendMessage(hwnd WM_USER 1 105)
remain=trkLen-(trkPlc/1000)
sec= fmod(remain 60)
if sec<10
,sec0.from("0" sec)
else
,sec0=sec
timeLeft.from((remain/60) ":" sec0)
OnScreenDisplay(timeLeft 1 626 2 "" 12 292929 4)