Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 29th April 2004, 01:35   #1
eye_onus
Senior Member
 
eye_onus's Avatar
 
Join Date: Feb 2004
Posts: 183
Changing preferences using script

How do you change the preferences using scripts? Specifically the Manual Playlist Advance option?
eye_onus is offline   Reply With Quote
Old 29th April 2004, 18:55   #2
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,237
the info in this thread may be of some use -> http://forums.winamp.com/showthread....hreadid=174946

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

-daz

Moved to WADEV DrO
DrO is offline   Reply With Quote
Old 30th April 2004, 04:23   #3
eye_onus
Senior Member
 
eye_onus's Avatar
 
Join Date: Feb 2004
Posts: 183
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
eye_onus is offline   Reply With Quote
Old 30th April 2004, 05:03   #4
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,237
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
DrO is offline   Reply With Quote
Old 13th May 2004, 00:15   #5
eye_onus
Senior Member
 
eye_onus's Avatar
 
Join Date: Feb 2004
Posts: 183
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

mu'o mi'e .aionys.

.i.a'o.e'e ko klama le bende pe denpa bu
eye_onus is offline   Reply With Quote
Old 26th May 2004, 20:51   #6
eye_onus
Senior Member
 
eye_onus's Avatar
 
Join Date: Feb 2004
Posts: 183
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

mu'o mi'e .aionys.

.i.a'o.e'e ko klama le bende pe denpa bu

Last edited by eye_onus; 26th May 2004 at 22:32.
eye_onus is offline   Reply With Quote
Old 27th May 2004, 12:12   #7
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,237
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
DrO is offline   Reply With Quote
Old 29th May 2004, 19:23   #8
eye_onus
Senior Member
 
eye_onus's Avatar
 
Join Date: Feb 2004
Posts: 183
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:
Quote:
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

mu'o mi'e .aionys.

.i.a'o.e'e ko klama le bende pe denpa bu
eye_onus is offline   Reply With Quote
Old 1st June 2004, 12:07   #9
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,237
Quote:
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 window
so 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
DrO is offline   Reply With Quote
Old 2nd June 2004, 22:51   #10
eye_onus
Senior Member
 
eye_onus's Avatar
 
Join Date: Feb 2004
Posts: 183
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

mu'o mi'e .aionys.

.i.a'o.e'e ko klama le bende pe denpa bu
eye_onus is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump