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 - Get Shuffle State

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





PostPosted: Sat Jul 23, 2005 1:38 pm    Post subject: Winamp - Get Shuffle State Reply with quote

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
Back to top
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