Old 22nd June 2002, 16:34   #1
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
Post Scripting IDE

My idea is simple, but not simple to make.

I want to create an enviroment (all-in-1) where people can write scripts for skins with tools that can make it easier on them.

The features i have in mind now are:

* (custom) syntax highlighting
* Object GUID Toolbar (to quickly add the guid to the code)
* Project tree (categorized)
* example scripts
* you want to suggest something?


The project isnt easy, for me, it will be hard. (well the only hard part for me is the syntax highlighting since i never done it b4).

Another reason why its hard because i have no clue how wa3 scripts work!

So if you guys could stick with me, i think i can get through this, and coders will have easier job..
Caleb is offline   Reply With Quote
Old 22nd June 2002, 16:48   #2
DJGrenola
Registered User
 
DJGrenola's Avatar
 
Join Date: May 2002
Location: Can't remember
Posts: 268
Syntax highlighting can be tricky, you need to build recursive trees for things like brackets and curly brackets.

You might be better off writing a language definition for an existing text editor (although I can't think of an example right now). That would be far less work, I'm sure.

DJG
DJGrenola is offline   Reply With Quote
Old 22nd June 2002, 17:09   #3
Naamloos
Forum King
 
Naamloos's Avatar
 
Join Date: Mar 2001
Location: irc.tehflap.org/*******
Posts: 3,085
Quote:
Originally posted by DJGrenola

You might be better off writing a language definition for an existing text editor (although I can't think of an example right now). That would be far less work, I'm sure.

DJG
http://forums.winamp.com/showthread....crimson+editor

Maki Higlight for Crimson Editor by Gonzotek
Naamloos is offline   Reply With Quote
Old 22nd June 2002, 18:44   #4
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
ah well.. dont know if i should go on with this

if people use crimson editor, and will not have use of what im going to make, i think i'll just drop the project


any1 has any other ideas?
Caleb is offline   Reply With Quote
Old 22nd June 2002, 19:46   #5
liquidmotion
Smokes Two Joints
Beta Team
 
liquidmotion's Avatar
 
Join Date: Feb 2001
Location: SFBA
Posts: 3,680
Send a message via ICQ to liquidmotion
Re: Scripting IDE

Quote:
Originally posted by Caleb
My idea is simple, but not simple to make.

I want to create an enviroment (all-in-1) where people can write scripts for skins with tools that can make it easier on them.

The features i have in mind now are:

* (custom) syntax highlighting
* Object GUID Toolbar (to quickly add the guid to the code)
* Project tree (categorized)
* example scripts
* you want to suggest something?


The project isnt easy, for me, it will be hard. (well the only hard part for me is the syntax highlighting since i never done it b4).

Another reason why its hard because i have no clue how wa3 scripts work!

So if you guys could stick with me, i think i can get through this, and coders will have easier job..
if its in VB i wrote a program that colors the text, from a word list. msg me for it

For a good time: shup | stashbox | my homepage
liquidmotion is offline   Reply With Quote
Old 23rd June 2002, 04:42   #6
thepyr0x
Major Dude
 
thepyr0x's Avatar
 
Join Date: Oct 2001
Location: At my house in a city in Canada
Posts: 1,336
liquid: you wouldn't really be able to do it from a word list; you would have to recognize certain patterns and be able to determine whether that's a variable, a procedure, function, module, etc etc etc

thepyr0x is offline   Reply With Quote
Old 23rd June 2002, 06:53   #7
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
First of all im writing the program in good ole Delphi 6.
It is smaller than a vb app (a vb app with the .dlls is 1mb+ and a delphi app has everything included in the .exe)

second,i figured that highlighting wont be that hard, i mean, all of the procedures or whatever will be a kept in a special file, with this format:

[color=red;style=italic]
object
something
blah

so the program checks if text has been modified, then it processes the current line which has been modified.

When you open a file, it simply processes everything.

my current problem is with "" and {}.
i think ill make a for loop for these..
Caleb is offline   Reply With Quote
Old 23rd June 2002, 08:59   #8
DJGrenola
Registered User
 
DJGrenola's Avatar
 
Join Date: May 2002
Location: Can't remember
Posts: 268
Tell you what, it would be l33t to have an IDE which would process the std.mi file, and could therefore offer you suggestions and autocomplete when typing class names, methods, etc.

Another thing you could do is get it to parse the XML tree for your skin.xml and give you a list of objects you could getObject() from the XML. Select one, specify a global or local variable, and it could create the object grabbing code for you, complete with NULL-checking, and give you a nice variable to start using straight away.

Oh, the fun you could have with this one ...

DJG
DJGrenola is offline   Reply With Quote
Old 23rd June 2002, 16:37   #9
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
uuhhm parsing is fun

i could hopefully do that afer a while.. but the thing is i dont know wtf ur talking about :P

i need some wa3 scripting knowledge (and XML , which i have no idea what is it, what it does, blah )
Caleb is offline   Reply With Quote
Old 24th June 2002, 01:31   #10
LENZ.NET
Senior Member
 
Join Date: Oct 2001
Location: Australia
Posts: 291
Send a message via ICQ to LENZ.NET
To do equation balancing you use a stack... For example

{ ( ( { [] } ) ) }
You push the left brackets onto the stack, and then when you get a right brace you pop it off the stack, if it is the same then the braces are fine, if it is not you have a syntax error. Simple!

"Some dance to remember, Some dance to forget."
Spacer | Previewer |
LENZ.NET is offline   Reply With Quote
Old 24th June 2002, 06:44   #11
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
ok im gonna get to work.

i'll post a design only version so you could tell me what is needed and what's not.

btw, i need a good wa3 scripting tutorial and an XML tut.

I dont know anything about how wa3 scripting works, the commands, and how to work with XML, so i wont exactly know what a scripter needs.


if you guys can give me stuff that explains about wa3 scripting, what's maki, .m files .wals, .wacs etc.. and XML stuff it'll be easier for me to do the app.

Last edited by Caleb; 24th June 2002 at 07:10.
Caleb is offline   Reply With Quote
Old 24th June 2002, 07:49   #12
DJGrenola
Registered User
 
DJGrenola's Avatar
 
Join Date: May 2002
Location: Can't remember
Posts: 268
.m (or .mi for the Nullsoft-produced code) is an uncompiled (source code) MAKI file. This is compiled to a bytecode version, in much the same way that Java is. Compiled bytecodes have .maki extension, and these are the files that are added to the skin zipfile to be interpreted by Winamp 3. The compiler (mc.exe) comes packaged with Winamp.

You can get an overview of the MAKI core language at:

http://www.winamp.com/nsdn/winamp3x/...overview.jhtml

If you've ever used Javascript, it bears a reasonable similarity to that.

All skin MAKI files have an #include statement in them near the top to include the standard MAKI library, std.mi, which also comes packaged with winamp. std.mi provides the API which scripters can use to control winamp, and the objects (layers, buttons, etc) within the XML making up their skin. std.mi essentially represents the definition of the MAKI object model.

DJG
DJGrenola is offline   Reply With Quote
Old 24th June 2002, 15:13   #13
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
thx for the explanation everything seems alot clearer now.

i have read some info about skinning.. although i dont understand how the .xml files get to work with the maki files in the end.


Also, i made a parser for std.mi.

It seperates Events and procedures and functions to different places. And lets say you click on an event, it gives you a description of it. (all taken from the std.mi)
It's great that the Nullsoft guys made the std.mi file so organized, thus making it easier to parse it.. YOU ROCK!


Quote:
Originally posted by DJGrenola
Another thing you could do is get it to parse the XML tree for your skin.xml and give you a list of objects you could getObject() from the XML. Select one, specify a global or local variable, and it could create the object grabbing code for you, complete with NULL-checking, and give you a nice variable to start using straight away.
Well, i can parse the skin.xml with endless depths and list all the objects (tags that have id="something" if im not wrong).

Abut global variables, i can grab them too from any .m source files.

just have to figure out where to put them.
Caleb is offline   Reply With Quote
Old 24th June 2002, 17:40   #14
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
This sounds like a great project, please try to make it happen!

If you need anything I can help with, get in touch with me via PM or email gonzotek@yahoo.com .

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 24th June 2002, 20:26   #15
schweitn
Winamp3 Component Guuuru
Beta Team
 
schweitn's Avatar
 
Join Date: Dec 2000
Location: Milwaukee, WI
Posts: 1,068
Send a message via AIM to schweitn Send a message via Yahoo to schweitn
I've actually started work on a similar thing... I'm in EXTREMELY early development... called Sashimi...

Except I'm planning on also doing a WYSIWYG skin creation (move images around, writes the XML for you, etc.).

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
- Albert Einstein

Winamp 3 Projects | Winamp 2x Plugin Manager | Explorer Playlist | FileSystem Object | Shoutcast List | Sashimi
schweitn is offline   Reply With Quote
Old 24th June 2002, 21:26   #16
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
Well, Auto-complete is kinda difficult depending on how u want it to work.

let's say if i decalre a new variable of type Layuot.
now everytime i write the name of the variable and a dot, the auto-complete pops up with only Layout specific commands. This looks very hard for me, so its not likely for me to do it this way.

Auto complete can work by just completing the words for you (only functions taken from std.mi and your other files that are in your tree).

Syntax highlighting is gonna work easily (when its done) because i have std.mi parsed already (a parser does it fairly quickly, about 1 sec or even less).

Another thing i wanted to include, is something like MSDN
If you noticed std.mi has description of almost everything, so as soon as i get that parsed (haven't done it yet coz i have no time).
So lets say you click a button, it shows you the list of all the commands, you double click one, and a description appears, something like:

System.Onsomething
Type: Event
Returns: Integer (description of the returned stuff)
Parameters: 1 - String, NAME
2 - Integer, NAME

althought this might change..

ill keep you posted guys!
Caleb is offline   Reply With Quote
Old 24th June 2002, 21:32   #17
omarello
Major Dude
 
omarello's Avatar
 
Join Date: Feb 2001
Location: ---- Montreal ---- Canada ----
Posts: 529
this looks amazing man, keep it up.

Shoot me again I ain't dead YET
omarello is offline   Reply With Quote
Old 25th June 2002, 20:19   #18
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
hey guys,
i need a really complex skin.

because i need to know how to parse skin.xml in the most difficult cases.

i think i can scan all the .xmls for <include> and to create some kind of a tree chart what goes where.

uhm ok let's stop the talking..

Currenly Working on: WA3 Scripting/XML IDE
Caleb is offline   Reply With Quote
Old 27th June 2002, 15:43   #19
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
Here's my l33t parser.

Notes: The parser isn't completed and it has some limitations.
If you find any BUGS, then post them here so i could improve the engine


ok now go download!!!!!!!!!

http://www.csoftcoders.com/l33t.zip

Currenly Working on: WA3 Scripting/XML IDE
Caleb is offline   Reply With Quote
Old 27th June 2002, 16:11   #20
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
Thumbs up

VERY VERY fine!

One immediate suggestion: Show the full command (with parameters) in the description (or in it's own field), e.g.

Event Field: onResize()

Description Field: Description: Hookable. Event happens when the object is about to be resized.
Parameter: x - The X position where the object will be anchored.
Parameter: y - The Y position where the object will be anchored.
Parameter: w - The width the object will have.
Parameter: h - The height the object will have.

?Usage? Field: guiobject.onResize(int x, int y, int w, int h)

Other than that, I didn't have a problem parsing 479's std.mi
-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 27th June 2002, 18:09   #21
liquidmotion
Smokes Two Joints
Beta Team
 
liquidmotion's Avatar
 
Join Date: Feb 2001
Location: SFBA
Posts: 3,680
Send a message via ICQ to liquidmotion
Quote:
Originally posted by thepyr0x
liquid: you wouldn't really be able to do it from a word list; you would have to recognize certain patterns and be able to determine whether that's a variable, a procedure, function, module, etc etc etc
it only highlights the keywords. structural highlighting is, as you say, impossible thru a word list.

For a good time: shup | stashbox | my homepage
liquidmotion is offline   Reply With Quote
Old 27th June 2002, 18:14   #22
liquidmotion
Smokes Two Joints
Beta Team
 
liquidmotion's Avatar
 
Join Date: Feb 2001
Location: SFBA
Posts: 3,680
Send a message via ICQ to liquidmotion
Quote:
Originally posted by Caleb
hey guys,
i need a really complex skin.

because i need to know how to parse skin.xml in the most difficult cases.

i think i can scan all the .xmls for <include> and to create some kind of a tree chart what goes where.

uhm ok let's stop the talking..
i wrote some xml functions in delphi (reading from a tag and writing to a tag). nothing special, but it might help ya

also in VB.

For a good time: shup | stashbox | my homepage
liquidmotion is offline   Reply With Quote
Old 28th June 2002, 06:58   #23
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
Quote:
Originally posted by Gonzotek
VERY VERY fine!

One immediate suggestion: Show the full command (with parameters) in the description (or in it's own field), e.g.

Event Field: onResize()

Description Field: Description: Hookable. Event happens when the object is about to be resized.
Parameter: x - The X position where the object will be anchored.
Parameter: y - The Y position where the object will be anchored.
Parameter: w - The width the object will have.
Parameter: h - The height the object will have.

?Usage? Field: guiobject.onResize(int x, int y, int w, int h)

Other than that, I didn't have a problem parsing 479's std.mi
-=Gonzotek=-
this won't be a problem at all. i have got the description field and the one with the extra info (parameters etc..) as a TStrings variables, which allows me to do whatever i want with them.

I didn't finish the parser yet, for example, i dont proccess whatever is in the "()" yet. I only read the parameter info from the description, but it will soon be proccessed too, and even give you more info about each parameter (like, of which type).

(I also plan to create a temp HTML file and then read it, so the text will be easier to read. the text should look better.. )

when the parser is completely ready, i can use it for syntax highlighting and auto-complete.

I have found an open source component(control) for delphi called SynEdit, i tought of using that as the "text field" because it already has syntax highlighting implemented, and the auto complete can be improved. writing the text editor will be hard so i think ill just "borrow" a 3rd party component.

Currenly Working on: WA3 Scripting/XML IDE
Caleb is offline   Reply With Quote
Old 28th June 2002, 07:06   #24
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
Quote:
Originally posted by liquidmotion


i wrote some xml functions in delphi (reading from a tag and writing to a tag). nothing special, but it might help ya

also in VB.
i dont need xml functions, all i need is to look for ID="" in tags so i could get a list of objects.

Currenly Working on: WA3 Scripting/XML IDE
Caleb is offline   Reply With Quote
Old 15th August 2002, 21:31   #25
Caleb
Senior Member
 
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
reviving thread :P

stuff that is Already possible:

* A nicely designed help file which can be easily generated everytime a new version of std.mi is out
* Search option that will show syntax and explanation of commands
* When ill get an IDE component (the place where u write text) that supports auto-complete it could be automaticaly read from the std.mi
* Syntax highlighting that reads from the std.mi
* blah

Currenly Working on: WA3 Scripting/XML IDE
Caleb is offline   Reply With Quote
Old 26th November 2002, 01:29   #26
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
this looks really promising, what's the status of it?
I actually had an idea to make a maki editor as a wa3 component, but I think I'm gonna ditch the idea since you're making this and Schweitn is apparently making one in wasabi..

good luck

-Plague
Plague is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

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