![]() |
#1 |
Senior Member
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
|
![]()
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.. |
![]() |
![]() |
![]() |
#2 |
Registered User
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 |
![]() |
![]() |
![]() |
#3 | |
Forum King
Join Date: Mar 2001
Location: irc.tehflap.org/*******
Posts: 3,085
|
Quote:
Maki Higlight for Crimson Editor by Gonzotek |
|
![]() |
![]() |
![]() |
#4 |
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? |
![]() |
![]() |
![]() |
#5 | |
Smokes Two Joints
Beta Team |
Re: Scripting IDE
Quote:
![]() |
|
![]() |
![]() |
![]() |
#6 |
Major Dude
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
![]() |
![]() |
![]() |
![]() |
#7 |
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.. |
![]() |
![]() |
![]() |
#8 |
Registered User
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 |
![]() |
![]() |
![]() |
#9 |
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 ) |
![]() |
![]() |
![]() |
#10 |
Senior Member
|
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! |
![]() |
![]() |
![]() |
#11 |
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 08:10. |
![]() |
![]() |
![]() |
#12 |
Registered User
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 |
![]() |
![]() |
![]() |
#13 | |
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:
Abut global variables, i can grab them too from any .m source files. just have to figure out where to put them. |
|
![]() |
![]() |
![]() |
#14 |
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=- But I'm feeling much better now. |
|
![]() |
![]() |
![]() |
#15 |
Winamp3 Component Guuuru
Beta Team |
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 ![]() |
![]() |
![]() |
![]() |
#16 |
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! |
![]() |
![]() |
![]() |
#17 |
Major Dude
Join Date: Feb 2001
Location: ---- Montreal ---- Canada ----
Posts: 529
|
this looks amazing man, keep it up.
Shoot me again I ain't dead YET |
![]() |
![]() |
![]() |
#18 |
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 |
![]() |
![]() |
![]() |
#19 |
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 |
![]() |
![]() |
![]() |
#20 |
![]()
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=- But I'm feeling much better now. |
|
![]() |
![]() |
![]() |
#21 | |
Smokes Two Joints
Beta Team |
Quote:
|
|
![]() |
![]() |
![]() |
#22 | |
Smokes Two Joints
Beta Team |
Quote:
![]() also in VB. |
|
![]() |
![]() |
![]() |
#23 | |
Senior Member
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#24 | |
Senior Member
Join Date: Feb 2002
Location: In The Llama's Ass
Posts: 364
|
Quote:
Currenly Working on: WA3 Scripting/XML IDE |
|
![]() |
![]() |
![]() |
#25 |
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 |
![]() |
![]() |
![]() |
#26 |
f(caffeine){
return wasabi; } (Forum King) 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 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|