Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WinAmp Control Macros
#1
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.


Code:
Select All      Help
;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)


Code:
Select All      Help
;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


Code:
Select All      Help
;FastForward 5 seconds
men 40060 win("" "Winamp v1.x") ;;FFwd 5 seconds



Code:
Select All      Help
;Rewind 5 seconds
men 40144 win("" "Winamp v1.x") ;;Back 5 seconds


Code:
Select All      Help
;Next track without using WA's shortcuts
men 40048 win(" - Winamp" "Winamp v1.x") ;;Next              


Code:
Select All      Help
;Previous track without using WA's shortcuts
men 40044 win(" - Winamp" "Winamp v1.x") ;;Previous


Code:
Select All      Help
;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)
A new blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)