SRL Archive - Senior Scripts and Snippets

Azula


nielsie95

2008-08-23 06:58:45


Hey,

Quite some time ago I started to work on a function parser (you might have seen the list(s) of functions from SRL). At that time it could only parse functions. Now, Azula can parse Includes, vars, constants, types, functions and procedures.

It isn't finished and I do not have plans to finish it in this state. I am planning to start all over again. Partly to clean up the code and partly to - this time - use legal components only. Even though not everything is finished, a lot of it actually works. Including a clipboard viewer, code navigating, calltips, codefolding, themes and regex search.

Things that are not finished, but have a base are: File Searching, New File, function list saving and class completion.

The feature I am the most proud of (and probably the reason for this post) is code navigating. It is a feature from Delphi which I tried to copy. You activate it by holding down the control button and hovering over a word. You should see a blue line under the word. If you see a blue line, click the word and, if it works, you shall be taken to the place where this word is declared.


Another few things:
  • Double click a word and all the same words will be hilighted.
  • File drag+drop works.
  • Export to HTML works.
  • Code navigating and CallTips should work in with statements.
  • Most settings are saved in the .ini file. You can there change the theme (colors).
  • Regex syntax is the same as the Perl regex.
  • Function Description Box should hilight the current Parameter in the calltip.
  • I have included a dump of a non-modified Pascal Engine (similar to the one SCAR uses), so class function parameters will also work (TBitmap.Canvas.FillRect()).

If your SCAR Includes folder is somewhere else than C:\Program Files\SCAR 3.14\includes\ or C:\Program Files\SCAR 3.15\includes\ you should open up your .ini, go to [Misc] > IncludeDirs and enter your directory there (make sure it ends with a \).

You can give a procedure a description (visible in Description Box), like this:


program New;

var
i: Integer;

procedure Test(a: Integer);
{description:
This is a test function to demonstrate the description tags.
/description}
var
i: Integer;
begin
Inc(i);
end;

begin
Test(i);
end.

I think this is all. Please tell me how well it works/ what to improve / what to add. I can send code at request. I will not send everything (at once), so please tell me what you want to see.

Cheers,
Nielsie95

the scar noob

2008-08-23 07:22:38

You released it :cool:

IMO, it's very good, nice lay-out etc but you should make the compiler, cause it would own SCAR than:p

Keep up developing this project!

-Tsn.

EDIT: the clipboard viewer + proc/funct description own:p

Ron

2008-08-23 07:43:59

looks very promising!

n3ss3s

2008-08-23 08:01:59

Sweet jesus that GUI makes me feel dirty! :p

nielsie95

2008-08-23 08:04:51

Now actually test it! :p
There's only one view (which is mine).

n3ss3s

2008-08-23 08:11:55

Tested some things around, good job :)

Bobarkinator

2008-08-23 13:08:46

Love the clipboard viewer and my favorite aspect would have to be the include function list. That owns.

mastaraymond

2008-08-23 13:54:22

Good stuff over there!

Markus

2008-08-23 14:04:51

As I told you, this owns :D

bullzeye95

2008-08-23 17:06:53

Very nice!

Smartzkid

2008-08-23 22:27:22

Niiice! I like the ribbon :)

All delphi, I assume?

EDIT: Usability feedback:
Ribbon's pretty, but I wish it didn't waste so much space. I doubt it, but is it possible to shrink the ribbon horizontally? The extra room would be a very nice space for function descriptions.

Also, should be able to save as scar script.

Bobarkinator

2008-08-24 00:12:30

Like TSN said, this very limited in being used widely because it can't actually compile a scar script. You should talk to Freddy about making a Scar Virtual Machine :p

Ron

2008-08-24 10:10:08

Yeah it would be nice if Freddy put everything into something like engine.dll and if you included it in your delphi program, all you have to do to compile the script is: Compile(memoCode.Text);

Freddy1990

2008-08-24 14:38:26

From: n3ss3s
Sweet jesus that GUI makes me feel dirty! :p


Well, it's all unlicensed GUI components, about every one I'm planning to use for SCAR 4.0, however, I myself am against using unlicensed components… Those components are easily $750 or more…

From: the scar noob
IMO, it's very good, nice lay-out etc but you should make the compiler, cause it would own SCAR than:p


Why do I always get my point proved, I work my ass off on SCAR and then I get stuff like this? I've got every component he used, I just refuse to use them because I respect the companies who made them. And I also prefer to spend most of my time working on the script engine so scripts run better and faster rather than spending every minute on the user interface. Finally, why do you think I'm rewriting SCAR from scratch? Not for me…

mastaraymond

2008-08-24 15:24:41

From: Freddy1990
Well, it's all unlicensed GUI components, about every one I'm planning to use for SCAR 4.0, however, I myself am against using unlicensed components… Those components are easily $750 or more…



Why do I always get my point proved, I work my ass off on SCAR and then I get stuff like this? I've got every component he used, I just refuse to use them because I respect the companies who made them. And I also prefer to spend most of my time working on the script engine so scripts run better and faster rather than spending every minute on the user interface. Finally, why do you think I'm rewriting SCAR from scratch? Not for me…

Don't you think you should credit the makers of the Interpeter then somewhere?:rolleyes:

bullzeye95

2008-08-24 15:30:07

You must admit, Freddy, that the components used in this are better looking than the ones currently used in SCAR. I respect that you don't want to use unlicensed components, and nobody is going to hold that against you (probably the opposite, at least for me), but you can't bite back when you're told that the GUI is better looking than SCAR's. It is more expensive than the stuff used in SCAR, so of course it should look better. Nobody said that you don't work hard on SCAR. Nobody said it's not good.

Freddy1990

2008-08-24 15:36:36

From: mastaraymond
Don't you think you should credit the makers of the Interpeter then somewhere?:rolleyes:


I never claimed I made it, but I have modified it seriously to fill in loads of requests made by a lot of people.

From: bullzeye95
You must admit, Freddy, that the components used in this are better looking than the ones currently used in SCAR. I respect that you don't want to use unlicensed components, and nobody is going to hold that against you (probably the opposite, at least for me), but you can't bite back when you're told that the GUI is better looking than SCAR's. It is more expensive than the stuff used in SCAR, so of course it should look better. Nobody said that you don't work hard on SCAR. Nobody said it's not good.


Of course the GUI looks better, I'm not denying that, I can make SCAR looks exactly like that, but I won't until I can raise the money to buy the components I need rather than use the unlicensed copies. Of course, at the rate donations are pouring in, that might take a while…

EDIT: Well, I just purchased one of the components Nielsie used, mainly thanks to Janilabo who has already donated $200, and also thanks to lordsaturn, who, even though he only donated $5, tries to help out as well. I hope many others will follow their examples, if many people even pitch in a bit I can get everything in no time… And those who can't can always still click my ads once a day, seeing I will be donating ad money as well that's not used for my site's upkeep. The components I purchased will already be used in SCAR 3.20, and thanks to Nielsie's example I can even improve the GUI more with them :) (Don't expect it to look like that just yet though, the whole package will be in SCAR 4.0, but this is a nice start)

the scar noob

2008-08-24 18:03:22

From: Freddy1990

Why do I always get my point proved, I work my ass off on SCAR and then I get stuff like this? I've got every component he used, I just refuse to use them because I respect the companies who made them. And I also prefer to spend most of my time working on the script engine so scripts run better and faster rather than spending every minute on the user interface. Finally, why do you think I'm rewriting SCAR from scratch? Not for me…


Hey, dude, calm it down! I don't take that sorry, because what you say is totally untrue. I respect you, for putting a lot effort into SCAR, so don't say that..
I was just saying that the interface rocks ass! yes, I like it more than SCAR's interface, so what?
You are doing great work, don't try mentioning I don't respect you.

-Tsn.

Freddy1990

2008-08-24 18:17:13

From: the scar noob
Hey, dude, calm it down! I don't take that sorry, because what you say is totally untrue. I respect you, for putting a lot effort into SCAR, so don't say that..
I was just saying that the interface rocks ass! yes, I like it more than SCAR's interface, so what?
You are doing great work, don't try mentioning I don't respect you.

-Tsn.


Well, try formulating it differently then next time… =/

EDIT: Actually having a goal that's finished required some serious work on the donate page :p
http://freddy1990.com/donate.php It's finished now, I did find that I have to pay 19% taxes for the some stuff, pretty sure I have to for the script and form editors, which therefor go from about $560 to $666


EDIT2:
And btw, Nielsie, nice work

Bobarkinator

2008-08-24 20:11:37

Freddy, what do you think of Ron's suggestion?

Smartzkid

2008-08-24 20:21:06

Freddy, I'm not sure as to the size of those component's developers, but maybe you (/a volunteer/all of us, writing and editing to perfection :)) could write a letter to them, and explain the situation; freeware, work will be credited, could we have a discount?

Your work is sooo appreciated, it just isn't all flashy :p


Is the ribbon a pay component for delphi?

EDIT: Freddy, what's the 'error reporter' component bring?

Also, when we search with your custom search, do you get anything?

bullzeye95

2008-08-24 21:22:32

@Ron and Bobarkinator: Not needed since the engine SCAR uses is free.

EDIT: I'm going to take a guess and say that "error reporting" is to catch application errors so they don't crash the program.

Bobarkinator

2008-08-24 21:38:51

From: bullzeye95
@Ron and Bobarkinator: Not needed since the engine SCAR uses is free.

EDIT: I'm going to take a guess and say that "error reporting" is to catch application errors so they don't crash the program.


But, as Freddy has already stated, he has modified it a ton.

Smartzkid

2008-08-24 22:46:20

From: bullzeye95
I'm going to take a guess and say that "error reporting" is to catch application errors so they don't crash the program.


For 100+$ I hope it does alittle more than that :p

bullzeye95

2008-08-25 00:12:32

If we're lucky, maybe it tells information about the error also ;)

The Claw

2008-08-25 03:42:39

Whats the deal with all these expensive components? They look sweet but surely for that price you could make your own.

Freddy1990

2008-08-25 03:50:00

The error reporting catches errors and allows you to send me a bugreport which contains very detailed information about the bug which tells me a lot more than just "access violation at address …", it will often allow me to pinpoint the exact location of the bug and fix it… The Claw, these components are the result of years of work by professional programmers… SmartzKid, the ribbon is the $199 component on my goals list.

EDIT: And Smartzkid, I could write em, but I doubt they'd care…

EDIT2: Also note that I'll be making some components available to the script engine as well

nielsie95

2008-08-25 06:04:55

From: Smartzkid
Niiice! I like the ribbon :)

All delphi, I assume?

EDIT: Usability feedback:
Ribbon's pretty, but I wish it didn't waste so much space. I doubt it, but is it possible to shrink the ribbon horizontally? The extra room would be a very nice space for function descriptions.

Also, should be able to save as scar script.


Thanks :)
No you can not shrink it horizontally, only vertical (so it acts like a normal mainmenu). I shall add the save as SCAR Script :)

The Ribbon is all Delphi and is a pay component.

I also worked on class completion yesterday (probably because I couldn't get on internet). It's getting there :)

I am also against the use of unlicensed components, that is the reason this is SSRL only. It is also the reason that I'll start over again with free components only. This time I'm, instead of the ribbon, going to use spTBXlib.

mastaraymond

2008-08-25 06:29:57

All these GUI components are fancy and stuff.. But they aren't really needed to run scar, only to make it look awesome.. Why would you want to spend so many moneyz on the GUI itself?

Freddy1990

2008-08-25 06:55:06

From: nielsie95

The Ribbon is all Delphi and is a pay component.


<3

From: nielsie95
I am also against the use of unlicensed components, that is the reason this is SSRL only. It is also the reason that I'll start over again with free components only. This time I'm, instead of the ribbon, going to use spTBXlib.


Yeah, I assumed so :) I don't like spTBXLib much though, I tried it a while back, don't remember exactly why but there was something about it… But it's a good choice, one of the best free TBX libs out there afaik…

From: mastaraymond
All these GUI components are fancy and stuff.. But they aren't really needed to run scar, only to make it look awesome.. Why would you want to spend so many moneyz on the GUI itself?


There's not much aside from the GUI to spend money on and it doesn't just make it look better, it makes it work better and gives the user way more features and stuff…

Smartzkid

2008-08-25 15:17:35

$200 for the ribbon seems like a ripoff, IMO: http://msdn.microsoft.com/en-us/office/aa973809.aspx

Free, no? It can't be that hard to use w/o that special control..

It's not too hard to use in C#, I know that:
http://www.codeproject.com/KB/WPF/ribboncontrol.aspx

EvilChicken!

2008-08-25 15:40:06

Wow.
This is just..



Amazing. Ø_ø
NOW MAKE IT COMPILE STUFF!


*bends down and worships Nielsie's feet*

Freddy1990

2008-08-25 17:59:53

From: Smartzkid
$200 for the ribbon seems like a ripoff, IMO


Hmm, it's really worth it, DevExpress controls are the best around for Delphi

Smartzkid

2008-08-25 19:32:20

http://www.devexpress.com/Products/VCL/Subscription/

Do you know how much that is?

Also, the ribbon doesn't sound too hard to use by itself, why pay extra for a wrapper?

Freddy1990

2008-08-26 03:48:06

I know how much that is, yea, and I'm not just interested in the wrapper, neither am I willing to buy the VCL subscription

mastaraymond

2008-08-27 09:01:42

From: Freddy1990
I know how much that is, yea, and I'm not just interested in the wrapper, neither am I willing to buy the VCL subscription

Wouldn't you buy the compiler first and after that buy the components? ^_^..
In theory all the standard components are illegal as well :rolleyes:.

Freddy1990

2008-08-28 04:53:36

From: mastaraymond
Wouldn't you buy the compiler first and after that buy the components? ^_^..
In theory all the standard components are illegal as well :rolleyes:.


Borland doesn't sell Delphi 7 anymore, Borland doesn't even exist anymore…

mastaraymond

2008-08-28 05:52:09

From: Freddy1990
Borland doesn't sell Delphi 7 anymore, Borland doesn't even exist anymore…

That makes it legal to use delphi 7 for phree?

The Claw

2008-08-28 07:05:28

Doubt a big company would just let their program go to waste like that, they probably sold the rights to someone else so i doubt it

the scar noob

2008-08-28 09:35:37

From: Freddy1990
Borland doesn't sell Delphi 7 anymore, Borland doesn't even exist anymore…


I'm registred user @ CodeGear.

Piece of letter I received few days ago:
Delphi 2009 and C++Builder 2009 product announcement and two weeks of Live Webinars
start on Monday, August 25 at 5am Pacific Daylight Time (UTC-7)
———-

We are on the verge of the formal announcement of Delphi 2009 and C++Builder 2009.
Starting next Monday, August 25, we will begin two weeks of Live Webinars for
Delphi and C++Builder. It all starts Monday morning at 5am Pacific Daylight Time (UTC-7)
with the first of twenty-three Live Webinars timed to coincide with the
publishing of the announcement press release.

Two articles have already appeared in eWeek and Infoworld online editions:

eWeek - http://www.eweek.com/c/a/Application-Development/Embarcadero-Plans-New-Delphi-CBuilder-Releases/

Infoworld - http://news.yahoo.com/s/infoworld/20080821/tc_infoworld/109777

The complete schedule of Live Webinars and a link to the pre-registration site
can be found in the Developer Network article at

http://dn.codegear.com/article/38478

Remember, it all starts Monday Morning, August 25th, at 5am Pacific Daylight Time (UTC-7)
and continues for the next two weeks. Come join the fun!


Sincerely,

David Intersimone "David I"
Vice President and Chief Evangelist - CodeGear
Embarcadero Technologies


Oh noez tsn t3h nub, you're wrong Borland <> CodeGear
=>
About CodeGear

CodeGear delivers innovative, high-productivity development tools for a wide spectrum of software developers, from individuals to enterprise teams. Formed from the Developer Tools Division of Borland to focus exclusively on technical innovation and support for software developers, CodeGear has more than 25 years of technology leadership and more than 3.2M users of its products worldwide. In November 2006, CodeGear became an independent organization within Borland Software Corporation - with a separate management, R&D, sales, marketing and operations team.

Which you can see at: CodeGear

Btw, You can't download Delphi7 from over there, but you can gain a serial key (for users who have the installation cd)

-Tsn.

the scar noob

2008-08-28 09:36:52

From: Freddy1990
Borland doesn't sell Delphi 7 anymore, Borland doesn't even exist anymore…


I'm registred user @ CodeGear.

Piece of letter I received few days ago:
Delphi 2009 and C++Builder 2009 product announcement and two weeks of Live Webinars
start on Monday, August 25 at 5am Pacific Daylight Time (UTC-7)
———-

We are on the verge of the formal announcement of Delphi 2009 and C++Builder 2009.
Starting next Monday, August 25, we will begin two weeks of Live Webinars for
Delphi and C++Builder. It all starts Monday morning at 5am Pacific Daylight Time (UTC-7)
with the first of twenty-three Live Webinars timed to coincide with the
publishing of the announcement press release.

Two articles have already appeared in eWeek and Infoworld online editions:

eWeek - http://www.eweek.com/c/a/Application-Development/Embarcadero-Plans-New-Delphi-CBuilder-Releases/

Infoworld - http://news.yahoo.com/s/infoworld/20080821/tc_infoworld/109777

The complete schedule of Live Webinars and a link to the pre-registration site
can be found in the Developer Network article at

http://dn.codegear.com/article/38478

Remember, it all starts Monday Morning, August 25th, at 5am Pacific Daylight Time (UTC-7)
and continues for the next two weeks. Come join the fun!


Sincerely,

David Intersimone "David I"
Vice President and Chief Evangelist - CodeGear
Embarcadero Technologies


Oh noez tsn t3h nub, you're wrong Borland <> CodeGear
=>
About CodeGear

CodeGear delivers innovative, high-productivity development tools for a wide spectrum of software developers, from individuals to enterprise teams. Formed from the Developer Tools Division of Borland to focus exclusively on technical innovation and support for software developers, CodeGear has more than 25 years of technology leadership and more than 3.2M users of its products worldwide. In November 2006, CodeGear became an independent organization within Borland Software Corporation - with a separate management, R&D, sales, marketing and operations team.

Which you can see at: CodeGear

Btw, You can't download Delphi7 from over there, but you can gain a serial key (for users who have the installation cd)

-Tsn.

Freddy1990

2008-08-28 17:27:22

From: mastaraymond
That makes it legal to use delphi 7 for phree?


No, but it makes it the only solution…

And Tsn, why u double posting and wtf are you trying to tell me?

bullzeye95

2008-08-28 17:36:25

I think he's trying to say that Borland exists under the name CodeGear?

The Claw

2008-08-29 03:50:16

Reading his deleted posts he misread an email and thought Codegear was Borland, but then realised his mistake, so deleted his posts. Dunno why he posted so many times but lol.

Freddy1990

2008-08-29 05:13:26

Borland is now Embarcadero Technologies…
But I think we're straying a bit offtopic here

the scar noob

2008-08-29 06:56:04

From: The Claw
Reading his deleted posts he misread an email and thought Codegear was Borland, but then realised his mistake, so deleted his posts. Dunno why he posted so many times but lol.


The truth is that Nielsie didn't believed me or so and i became kinda pissed off.. a bit:p
So I was talking like SRL Devs+ ftw! and deleted the post because I was angry:)

-TSn.

Ron

2009-02-15 12:44:29

@bullseye, what do you mean scar can't do that because of its free uses?? Any code can be a .dll file and be included into another program with the right specifications.

Is nielsie still developing this?

Oh and in my opinion, do not add the Ribbon component. It was one of the reasons why I don't use the new Microsoft Word. SCAR has a cool simple GUI and I love that.

If you're still working on this nielsie, it would be cool if you had an option to switch from the ribbon gui to a more smaller, more standard gui.

~Ron

bullzeye95

2009-02-15 13:41:14

From: Ron
@bullseye, what do you mean scar can't do that because of its free uses?? Any code can be a .dll file and be included into another program with the right specifications.


I meant that if you wanted to use the engine, you might as well just download it, so you can modify it any way you like. Though Freddy's is modified quite a bit, so a dll could be kind of useful I guess..

nielsie95

2009-02-15 14:30:12

I'm not developing this any further.. I've made a start to a new (similar) project. I work on it occasionally, but not that much. I got rid of the ribbon and switched to spTBXLib (as I posted earlier).

Sir R. M8gic1an

2009-02-15 15:22:47

i just saw this for the first time nielsie. Looks(/ed) great! I will be looking forward for the new version when it comes out, if it does. Might actually end up using this just for the kicks of it :p

~RM

R0b0t1

2009-02-15 22:22:47

Personally, I'd jack the components. And it would make sense you're making the program for yourself.