SRL Archive - Development

Test please! (Simba)


Olly

2014-06-19 21:14:26

If you want to test a new SRL-6 with the new Simba, Scroll to the bottom of this post!

Hi all, this is nothing offical but i (and others) would appreciate if people could test this Simba version.

You will want to download Simba from here, the best way is to download the Simba.i386-win32.exe and just replace your current Simba.exe with it. Everything should still work. :)

The change list is long, but i will list the most important here:



  • Huge changes to codeinsight (code completion and code hints) this is mostly why I want people to test it. :)
    1. Code completion will now show type procedures and functions.
    2. Code hints now appears for type procedures and functions.
    3. Code hints now wont accidentally show params of a type proc named the same as a regular procedure.
    4. Code completion will now fill when the keyword Self is used.
    5. May have fixed that backspacing while CC is open crash.
    6. Code completion will now have parent types.
  • Added a Lape section to the function list
  • A compiling error in Lape will now be handled the same as in pascalscript (Open the file, scroll to line, highlight etc.)
  • Added function/procedures (Mostly Lape):
    1. DeleteDirectory
    2. PosMulti
    3. GetNativeHandle
    4. TPAPartition
    5. BlurBitmap
    6. SplitRegExpr
    7. IsStrInArr
    8. GetEnvironmentVariable
    9. UnZipFile + ZipFiles
    10. Export TProcess to Lape
    11. ShowBalloonHint
    12. ResizeBitmapEx
    13. RotateBitmapEx
    14. Export TMMLTimer
    15. Add DrawTextBitmap & DrawSystemTextBitmap.
  • Lape forms additions:
    1. TSpinButton
    2. TStatusBar
    3. TSpeedButton
    4. TMainMenu
    5. Add Hints
  • Lape has been updated
    1. New operators (+=, /=, *=, **=, -=, **).
    2. Fixed raise exception

To see every commit, go here and keep going back until you hit Nov 29, 2013 commit.

I didn't do every single one of these, it's a combination of me, slacky, dgby, frement, and wizzup. :)

Keep a eye on this space also, I have a srl-6 version that i will need testing which requires this!



How to use SRL-6 with this Simba

  1. Download this (Newest Simba build + placeholders)
  2. Download the latest SRL-6 zip from here and extract into Simba/Includes (Renaming it to SRL-6).
  3. Enable the SRL extension, But disable the auto updating (SRL > Automaticly > Update (Untick)).
  4. Update Plugins via the extension.

Once Plugins have finished, your good to go. :)

Turpinator

2014-06-19 21:32:11

whooh its finally here!!

Ian

2014-06-19 21:45:54

Gz on the release :)

Flight

2014-06-19 21:57:54

Amazing work, I'll download this right now. I saw the changes on Github and downloaded it days ago; perhaps mine is slightly outdated.

slacky

2014-06-19 22:08:52

Good job Olly! :-) Let's just hope it's stable now. I should look in to <type-clicking> (ctrl+clicking on a function related to a type) as I think I might know why it does not work yet.

From: Flight
Amazing work, I'll download this right now. I saw the changes on Github and downloaded it days ago; perhaps mine is slightly outdated.

Sounds a bit outdated yeah :) Olly has been a good boy, fixing small bugs in the GUI that no one else wanted to fix, and these updates are the latest (tops a couple of days old) :P

KeepBotting

2014-06-19 23:56:21

Sweet

sgtwalrusfur

2014-06-21 20:01:47

From: KeepBotting
Sweet

Can you help me? I have no clue how to get my simba scripts working :c my skypes Jiggaatheist if you could help..

bonsai

2014-06-21 20:24:49

From: sgtwalrusfur
Can you help me? I have no clue how to get my simba scripts working :c my skypes Jiggaatheist if you could help..


This is kind of the wrong place for your question but…

For rs3 follow this guide and if you have problems make a thread in the appropriate general botting help area. Make sure your post has lots of information about what you tried and what was displayed, what happened…

Setting up old school is more involved. I'm not sure if anything here is current or not. The guys who do that stuff are very helpful though.

The Mayor

2014-06-22 02:48:05

When I run:

program new;
{$I SRL-6/SRL.simba}

begin
clearDebug();
setupSRL();
end.

I get:


ERROR comes from a non-existing file (!addGlobalFuncHdr)
Error: Duplicate declaration "BlurMatrix" at line 1
Compiling failed.
Exception TLPThread.Destroy: Access violation

Something to do with the include

Also the extensions still disappear if you don't open up from C:/simba

slacky

2014-06-22 06:12:55

From: The Mayor
When I run:

program new;
{$I SRL-6/SRL.simba}

begin
clearDebug();
setupSRL();
end.

I get:


ERROR comes from a non-existing file (!addGlobalFuncHdr)
Error: Duplicate declaration "BlurMatrix" at line 1
Compiling failed.
Exception TLPThread.Destroy: Access violation

Something to do with the include

Also the extensions still disappear if you don't open up from C:/simba

1. SRL-6 is not compatible with this build, it's not a bug. BlurMatrix is now in Simba, Olly have to update the tesseract plugin, and remove that expo.
2. Extensions still disappear: It's not in the list of fixed/updated stuff.

Olly

2014-06-22 10:03:32

Sorry i totally forgot srl-6 won't work with this build… Il finish off the srl-6 that works with this today.

Olly

2014-06-22 16:30:33

Updated it, some more CC improvements and new Lape version.

slacky

2014-06-22 16:44:02

Regarding the new operators I added [+=, /=, *=, -=] (compound assignment operators) might be new to some of you people.

The concept behind am is very simple, it assigns to "left" by calling the given math-operator on the values "left", and "right" (where "left" would be left side of the op, and "right", on the value on the right side of the operator).
So instead of having to do:

var x,y:Int32;
begin
x := 5;
y := 5;
x := x + 10;
y := y * 5;
end;
You now only have to do:

var x,y:Int32;
begin
x := 5;
y := 5;
x += 10;
y *= 5;
end;

The += operator also works with pointers (increases it by the given number of bytes), and strings, so for strings:

var x:String;
begin
x := 'hello ';
x += 'world';
WriteLn(x);
end;

Pointers also has support for the -= operator.

Other then that, they support all numeric types.

Janilabo

2014-06-22 16:48:11

I just must say, nice work and big thanks for all of you guys.

Special mention to @slacky for fixing that annoying plugin memory leaking issue - cheers mate!

The Mayor

2014-06-22 17:06:25

From: slacky

2. Extensions still disappear: It's not in the list of fixed/updated stuff.


Ahh. I though dgby said he fixed the extensions issue ages ago but it was never released. I just assumed that it was included in this build.

E: Those new operators look awesome! Nice work guys!

Olly

2014-06-22 17:07:48

From: The Mayor
Ahh. I though dgby said he fixed the extensions issue ages ago but it was never released. I just assumed that it was included in this build.


Lol no, He never fixed it (It's been in your simba for like, a year).. maybe he thought he did but he never did, I've looked at and cant work out why they reset.

The Mayor

2014-06-22 17:09:36

From: Olly
Lol no, He never fixed it (It's been in your simba for like, a year).. maybe he thought he did but he never did, I've looked at and cant work out why they reset.


Ah OK. I could swear he said he did. If I had time I would hunt down his post! Anyway, it's not that important, more annoying than anything.

Olly

2014-06-22 17:43:20

From: The Mayor
Ah OK. I could swear he said he did. If I had time I would hunt down his post! Anyway, it's not that important, more annoying than anything.


No he did say he fixed it, there's a commit with it. But the fact is he didnt. :( It has to be down to path issues or simba settings.

Flight

2014-06-23 22:30:22

Your most recent update seemed to have some issues. I didn't go far into investigating where exactly but something to do with, at least, writeln('-'). How my progress reports are printed is weird now. I already went back to the revision from June 20th.

Also, how about we replace TPAtoATPA/Ex with PartitionTPA?

Olly

2014-06-23 23:39:42

From: Flight
Your most recent update seemed to have some issues. I didn't go far into investigating where exactly but something to do with, at least, writeln('-'). How my progress reports are printed is weird now. I already went back to the revision from June 20th.


Hmm, seemed to work fine for me :s nor did i even remotely close the debug box try a new version once wizzup accepts my current pull request, if it still happens il take a deeper look into it :p

From: Flight
Also, how about we replace TPAtoATPA/Ex with PartitionTPA?


Wont happen, Although PartitionTPA does what TPAToATPA should do imo, they still do different things. Wizzup doesn't like changing how things act.

Olly

2014-06-23 23:48:06

From: The Mayor
When I run:

program new;
{$I SRL-6/SRL.simba}

begin
clearDebug();
setupSRL();
end.
…


Hi Mayor, (or anyone else) it would be nice if you could try this srl version.

Download: http://www.speedyshare.com/rBbGx/New-SRL-6.zip

Just use that file (Dont forget to extract!), make sure you update plugins. The new playerform should work, but it has no save implemented yet, nor i have actually tested SRL-6 with any scripts.

So please post what doesn't work!

slacky

2014-06-24 02:23:04

From: Flight
Your most recent update seemed to have some issues. I didn't go far into investigating where exactly but something to do with, at least, writeln('-'). How my progress reports are printed is weird now. I already went back to the revision from June 20th.

You really should elaborate more.. What you just said does not help me at all at fixing it.
Give us a way to recreate the error, and do tell us what the error was.

Did Lape fail? Was it the code-completion? I don't even know where to start when I don't even know the error.


Ref: « Your most recent update seemed to have some issues »
- Was there more the the one issue?

Some CC issues regarding compound assignment will be fixed at next release.

Flight

2014-06-24 03:09:58

From: slacky
You really should elaborate more.. What you just said does not help me at all at fixing it.
Give us a way to recreate the error, and do tell us what the error was.

Did Lape fail? Was it the code-completion? I don't even know where to start when I don't even know the error.


Ref: « Your most recent update seemed to have some issues »
- Was there more the the one issue?

Some CC issues regarding compound assignment will be fixed at next release.


Yes, I remember an access violation error when I stopped a running script and this made Simba stop responding completely. I'll re-download the newest revision and try again, hopefully with some more informative feedback.

Edit:
First of all I'm running Lape. Here's something else I came across; the version from June 22 (most recent I assume) prints 0 when running this:

function setResult(): Extended;
begin
Result := 2.50;
Result := MinE(50, Result);
Writeln(toStr(result));
end;

And the progress report issue, printed with Simba from June 20:

[==================================]
[ Agile Ape V 2 Rev 0 ]
[ by Flight ]
[==================================]
[ Total Run Time : 27 Sec ]
[ Agility XP : 400 (24,000/Hr) ]
[ Breaks : 0 ]
[ Hopped : 0 ]
[ Logged In : 0 ]
[==================================]
[ Agile Ape V 2 Rev 0 ]
[==================================]
Printed with Simba from June 22:

[===]
[ Agile Ape V 2 Rev 0 ]
[ by Flight ]
[===]
[ Total Run Time : 43 Sec ]
[ Agility XP : 460 (27,600/Hr) ]
[ Breaks : 0 ]
[ Hopped : 0 ]
[ Logged In : 0 ]
[===]
[ Agile Ape V 2 Rev 0 ]
[===]

Not sure what happened there but there's a lot of math involved for printing the progress report, if you'd like to take a look here's the function:

function progressReport(
ResultType:integer; ScriptName, ScriptAuthor, ScriptVersion: String;
VarNames: TStringArray;
VarValues: TVariantArray
): Variant;
var
TSA : TStringArray;
s : string;
i, i2, L : integer;
begin
if (ResultType = RESULT_STRING) then
Result := '';

if length(VarNames) <> Length(VarValues) then
begin
Writeln('VarNames and VarValues must be the same length');
exit;
end;
SetLength(TSA, 3 + Length(VarNames) + 4);

TSA[0] := '=';
TSA[1] := Capitalize(ScriptName)+' '+ScriptVersion;
TSA[2] := 'by '+ScriptAuthor;
TSA[3] := '=';

i2 := 3 + Length(VarNames);

for i:= 4 to i2 do
L := Max(L, Length(VarNames[i-4]));

for i:= 4 to i2 do
begin
s := VarValues[i-4];
TSA[i] := Padr(Capitalize(VarNames[i-4]), L)+' : '+ Capitalize(s);
end;

TSA[i2+1] := '=';
TSA[i2+2] := Capitalize(ScriptName)+' '+ScriptVersion;
TSA[i2+3] := '=';

i2 := 0;
for i:= 0 to High(TSA) do
i2 := Max(i2, Length(TSA[i]));

TSA[0] := Replicate('=', i2);
TSA[3] := Replicate('=', i2);
TSA[High(TSA)-2] := Replicate('=', i2);
TSA[High(TSA)] := Replicate('=', i2);

TSA[2] := Replicate(' ', round((i2 - Length(TSA[2]))/2) ) + TSA[2]; //centering by ScriptAuthor
TSA[High(TSA)-1] := Replicate(' ', round((i2 - Length(TSA[High(TSA)-1]))/2) ) + TSA[High(TSA)-1];

for i:= 0 to High(TSA) do
if (TSA[i][1] = '=') then
case ResultType of
RESULT_DEBUGBOX : writeln ('[='+Padr(TSA[i], i2)+'=]');
RESULT_REPORTBOX : AddToReport ('[='+Padr(TSA[i], i2)+'=]');
RESULT_STRING : Result := Result + '[='+Padr(TSA[i], i2)+'=]' + chr(13);
else begin Writeln('Invalid Result Type'); exit; end;
end
else
case ResultType of
RESULT_DEBUGBOX : writeln ('[ '+Padr(TSA[i], i2)+' ]');
RESULT_REPORTBOX : AddToReport ('[ '+Padr(TSA[i], i2)+' ]');
RESULT_STRING : Result := Result + '[ '+Padr(TSA[i], i2)+' ]' + chr(13);
else begin Writeln('Invalid Result Type'); exit; end;
end;

if not ResultType = RESULT_STRING then Result := true;
end;

I hope that helps.

slacky

2014-06-24 04:12:15

From: Flight
…
I hope that helps.

interesting, very nice find! I am looking in to it.

Edit: I know where/what's causing the error now.
This is going to be rough to fix, without breaking the fix for array plugin-leak.
- Idk how long this will take.

The Mayor

2014-06-24 07:34:11

From: Olly
Hi Mayor, (or anyone else) it would be nice if you could try this srl version.

Download: http://www.speedyshare.com/rBbGx/New-SRL-6.zip

Just use that file (Dont forget to extract!), make sure you update plugins. The new playerform should work, but it has no save implemented yet, nor i have actually tested SRL-6 with any scripts.

So please post what doesn't work!


I'll give it a test tomorrow!

The Mayor

2014-06-25 01:28:17

This might be related to flights issue.

In one of my scripts I read a list of email addresses from a text file in the same location as the script.



var
ListOfNames: TStringArray;
CurrentNameIndex: Integer;

procedure readPlayerNames();
var
i, namesFile: integer;
namesText: string;
begin
namesFile := openFile(scriptPath + 'names.txt', true);
readFileString(namesFile, namesText, fileSize(namesFile));
closeFile(namesFile);

ListOfNames := explode([#13#10], namesText);
CurrentNameIndex := 0;

for i := 0 to high(ListOfNames) do
writeLn(ListOfNames[i]);

writeLn('You have loaded [' + toStr(length(ListOfNames)) + '] player names');
end;

I have 3 emails in the text file. The old output is:


ilovebob+1@gmail.com
ilovebob+2@gmail.com
ilovebob+3@gmail.com
You have loaded [3] player names

Now the output is




You have loaded [1] player names

It reads the file OK. It's something to do with the explode(), or the #13#10 control character which represents a new line.


EDIT: On another note, I like the idea of automatically including d3d9.dll with simba

Dgby714

2014-06-25 05:02:42

Haven't tested but where'd the "]" come from?

ListOfNames := explode(#13#10], namesText)

Olly

2014-06-25 12:20:14

From: The Mayor

EDIT: On another note, I like the idea of automatically including d3d9.dll with simba


I (or any other dev) can add anything to the plugins package, (providing it's source is available and such). :)

The Mayor

2014-06-25 20:03:36

From: Dgby714
Haven't tested but where'd the "]" come from?

ListOfNames := explode(#13#10], namesText)


Opps the hash tags screwed it up, it's meant to be a tsa

ListOfNames := explode([#13#10], namesText)

Dgby714

2014-06-26 04:36:33

From: The Mayor
Opps the hash tags screwed it up, it's meant to be a tsa

ListOfNames := explode([#13#10], namesText)


Explodes first parameter is a string, not a tsa, unless someone has seriously changed things…

Olly

2014-06-27 10:24:41

From: Dgby714
Explodes first parameter is a string, not a tsa, unless someone has seriously changed things…


There's a overload in SRL-6 that accepts a TSA.

e: New build out @ http://nala.villavu.com/downloads/olly-dbg/13e7811b5398880419f2aca33595b46e52ad42c5/

Export TMMLTimer
Add DrawTextBitmap & DrawSystemTextBitmap.
New Lape (Remove plugin leak fix :/) + Fix some compound operators

Dgby714

2014-06-28 04:30:21

From: Olly
There's a overload in SRL-6 that accepts a TSA.

e: New build out @ http://nala.villavu.com/downloads/olly-dbg/13e7811b5398880419f2aca33595b46e52ad42c5/

Export TMMLTimer
Add DrawTextBitmap & DrawSystemTextBitmap.
New Lape (Remove plugin leak fix :/) + Fix some compound operators


But why is he using the TSA verison with only 1 index…

bonsai

2014-06-28 06:08:45

Shouldn't it be #13 +#10 ? Is #13 #10 a valid string with no quotes as shown?

The Mayor

2014-06-28 06:52:08

From: bonsai
Shouldn't it be #13 +#10 ? Is #13 #10 a valid string with no quotes as shown?


Yea it works fine with the old simba/SRL6 but I had a problem with the new one.

Patriq

2014-06-29 07:52:27

Testing it now :)
So far is really good. Some times when I ctrl+space it takes a while to load all the options, nothing really big, but big enough so a human can notice.

Olly

2014-06-30 09:17:45

From: The Mayor
Yea it works fine with the old simba/SRL6 but I had a problem with the new one.


Do you still get the problem in the latest build?

From: PatriqDesigns
Testing it now :)
So far is really good. Some times when I ctrl+space it takes a while to load all the options, nothing really big, but big enough so a human can notice.


With what Include? srl-6?

Patriq

2014-06-30 10:33:06

From: Olly
With what Include? srl-6?

Yes with SRL-6.

Olly

2014-06-30 11:11:08

From: PatriqDesigns
Yes with SRL-6.


Hmm seems pretty fast to me, nor did i even touch how that all works :x

Patriq

2014-06-30 12:21:05

Yeah and I have this annoying error which wont let me compile anything :(
[ATTACH=CONFIG]23470[/ATTACH]

The Mayor

2014-06-30 16:18:10

From: PatriqDesigns
Yeah and I have this annoying error which wont let me compile anything :(
[ATTACH=CONFIG]23470[/ATTACH]


I was getting that before too. I installed the exe though

Patriq

2014-06-30 18:16:17

What exe? I can't install anything :P Since it executes simba right away :(

slacky

2014-06-30 22:28:55

From: PatriqDesigns
What exe? I can't install anything :P Since it executes simba right away :(

this is a beta/test version of Simba. You should get your self the official release:
http://wizzup.org/simba/#download-ref

Olly

2014-06-30 23:13:37

From: PatriqDesigns
Yeah and I have this annoying error which wont let me compile anything :(
[ATTACH=CONFIG]23470[/ATTACH]


I haven't updated srl-6 to work with the newest version, Il do it tomorrow.

Olly

2014-07-05 12:58:04

Sorry for the wait, I've finally updated the OP to show how to use the new SRL-6 with this.

Brandon

2014-07-05 20:21:31

New operators (+=, /=, *=, **=, -=, **)



Nice! Now add ++(pre-fix) and (post-fix)++.. Syntactical sugar is the best kind of sugar.

slacky

2014-07-05 21:59:07

From: Brandon
Nice! Now add ++(pre-fix) and (post-fix)++.. Syntactical sugar is the best kind of sugar.

Sorry, mate, I do not plan on adding increment and decrement ops :p

If you want operations which works the same way:
Post-increment is achieved with both "inc(i)", and "i+=1", pre-increment can be achived with the ugly: "(i+=1)-1" or "Inc(i)-1" ;P

I was at one point considering making all compound ops EG:"i+=1" return previous value like pre-increment/-decrement ops, as that would be a bit nicer/more useful then having am as post-increment.. But I dropped it as it was more work.

The Mayor

2014-07-13 22:41:12

You know what would be cool, if lape had those hints about unused variables. Like 'hint: variable y never used at line xxx'

Press Play

2014-07-13 22:44:33

From: The Mayor
You know what would be cool, if lape had those hints about unused variables. Like 'hint: variable y never used at line xxx'

This would be useful, especially when re-writing/updating old scripts (exactly what I'm doing now :p).

slacky

2014-07-14 03:25:05

From: The Mayor
You know what would be cool, if lape had those hints about unused variables. Like 'hint: variable y never used at line xxx'

I agree, it's a nice feature to have. But it has very low priority (to me).

Guys - Also test out:
> https://villavu.com/forum/showthread.php?t=109476
I need to know if there are any bugs there, or if it's working fine.
- I need that feedback to be sure everything is working fine, so I can focus on other Lape features.

Olly

2014-07-21 17:55:26

Un-pushed stuff, but try doing this in the current Simba. :P


Olly

2014-07-26 19:36:36

Okay this should be the last update before i attempt to get it put it in the updater (SRL-6 and Simba), All testing would be appreciated. :)

The Mayor

2014-07-26 19:38:23

From: Olly
Okay this should be the last update before i attempt to get it put it in the updater (SRL-6 and Simba), All testing would be appreciated. :)


What is changed since last update?

Olly

2014-07-26 19:40:42

From: The Mayor
What is changed since last update?


Simba:
Fixed TFontStyle,
Added TPanel, TShape, TScrollBox
Added some missing properties in TControl

SRL-6 was just minor bug fixes.

Although the changes aren't big it still needs some more testing before we can release it officially.

Ashaman88

2014-07-27 12:38:12

Scripts working well with the merged include I sent you @Olly; and stop ignoring me on IRC!