MrB2323 Guest
|
Posted: Sat Jul 23, 2005 1:38 pm Post subject: Winamp - Get Shuffle State |
|
|
Using the WM_COMMAND Messages (hex code 0x111) to control winamp shuffle function doesn't allow much.
You cannot determine the actual state. This is annoying if you want to set it either to on or off - the toggle always depends on the last state which you don't know.
Using WM_USER,0,250 (a value I couldn't find in Rajat's extensive tutorial) returns the acutal state: 0 for no shuffle, 1 for shuffle on.
The following code allows you to set shuffle to be always on.
| Code: |
ShufflePlaylistOn:
SendMessage, 0x400, 0, 250,,ahk_class Winamp v1.x ;query shuffle status: 0 =off, 1=on
if ErrorLevel <> FAIL
If ErrorLevel = 0
PostMessage, 0x111, 40023, 0, , ahk_class Winamp v1.x ;toggle shuffle on
return |
|
|