PDA

View Full Version : Changing preferences using script


eye_onus
29th April 2004, 01:35
How do you change the preferences using scripts? Specifically the Manual Playlist Advance option?

DrO
29th April 2004, 18:55
the info in this thread may be of some use -> http://forums.winamp.com/showthread.php?s=&threadid=174946

as long as you can send a WM_COMMAND message then you can change most settings

-daz

Moved to WADEV DrO

eye_onus
30th April 2004, 04:23
Unless I can copy the C code that thread ID points to, I can't use that script . Plus I have no idea what a WM_COMMAND message is or how to use one. A little more help if you could, please?

Eye/Onus

DrO
30th April 2004, 05:03
the way winamp works for control is to have messages sent to it in the form of a msg id and then depending on that message will decide what the next two values will be.

eg WM_COMMAND,1,0

without knowing how you're trying to script things, i can't really help out much more since it all depends if you are able to send this message to the main window

-daz

eye_onus
13th May 2004, 00:15
This is what I plan on doing:
I want to add an LCD onto the Repeat button. Pretending '[' and ']' are the left and right borders of the LCD and '@' is the repeat symbol you see on CD players, it will go like this: [ 1] [@1] [@a] [__]. I want it to cycle through that on a left-click, or you directly select on a right-click.

[ 1] = Play One (Manual Playlist Advance ON, Repeat OFF)
[@1] = Repeat One (MPA ON, Repeat ON)
[@a] = Repeat All (MPA OFF, Repeat ON)
[__] = Play (MPA OFF, Repeat OFF)

I need to know the code to set MPA and repeat to 1 or 0 from within a script. I can code the LCD screen, the right-click menu and the cycling on left-click from there.

Eye/Onus

eye_onus
26th May 2004, 20:51
All I need to know is how to turn repeat and manual playlist advance on and off- if someone can tell me how to do that, I can code the rest myself.

Eye/Onus

DrO
27th May 2004, 12:12
SendMessage(hwnd_winamp,WM_WA_IPC,state,IPC_SETREPEAT); (think that's right since i'm typing from memory at work).

that's what you need to flip the repeat mode on / off depending on what 'state' is

-daz

eye_onus
29th May 2004, 19:23
I'm getting an error on this thing: I'm using MC to compile the script, and it exits with a Syntax error at the declaration of hwnd_Winamp.
Here's the output when I try to compile:

MC - Maki Compiler v1.1.1.b3
(c)2001, Nullsoft Inc.

Preprocessing...
OK: 18 macro expansions, 53169 bytes, 2142 lines, 2 files

syntax error at std.mi:1788 [17] :

HWND hwnd_Winamp;

Exited with code 4

If I don't inclde std.mi, it gives a syntax error as soon as it comes to a WA class (button, togglebutton, layout, etc...) Is there a file in the SDK which includes a definition of what the HWND type is, the same way std.mi defines the WA classes? I'm sure the error will disappear if I include that file.

Eye/Onus

DrO
1st June 2004, 12:07
Originally posted by DrO
without knowing how you're trying to script things, i can't really help out much more since it all depends if you are able to send this message to the main windowso it's a maki script you using, no surprise what i suggested isn't going to work. you're best bet is to ask in the skinning forum (and look for any example scripts, etc)

-daz

eye_onus
2nd June 2004, 22:51
I know you said this is possible in C(++), can a C script be run from within the skin? I don't want to make an exterior plugin for this, I want it to be part of the skin, so if the C script can be run from within the skin, that's all I need.

Eye/Onus