SRL Archive - General

SCAR 3.20 released


Freddy1990

2009-04-18 16:01:33

Boreas Edit: 3.21 is out http://www.villavu.com/forum/showthread.php?t=48056



SCAR 3.20 has been released, this is the largest update in SCAR Divi history. It features a whole load of bugfixes, GUI changes, improvements, …

The codehints received an overhaul, making coding with large includes like SRL go much more smoothly.

A more important change, tolerance comparison has been improved, the default comparison is the most affected and runs at 200% efficiency with all of kaitnieks' functions. With the ones I wrote 100% myself it runs at 400% efficiency. Functions like FindColorTolerance execute 4 times as fast as before.

Get it here: http://freddy1990.com/?page=product&name=scar

Changelog:
Bugfixes:
- FindColorsTolerance always returned false when using Tolerance 0
- Bad Char: SmallChars #55
- Capitalize errored for an empty string
- ReplaceRegex malfunctioned when replacing a matched string with a string that could be matched
- The String To Picture tool didn't work for the newest bitmapstrings
- [#4] Minimized windowsizes weren't saved when SCAR was closed maximized
- [#17] Mousebutton functions were off a pixel on each axis
- [#5, #7] Code proposal wasn't shown for local variables in functions
- [#1, #12] There were some bugs in the functionlist parser
- [#18] Code proposal didn't show a type for variables in records, declared as dynamic or static array
- [#8] Code hints didn't work properly for class properties
- Scriptsettings were not saved and loaded correctly by the portable version
- A bug in the portable version prevented the help wizard from loading saving settings form the settings file, it tired ot use the registry instead
- [#11] The splitter in between the report box and debug box was malfunctioning
- SCAR displayed a socket error when it wasn't able to contact the SRL repository to check for updates
- The "Client Always On Top" button remained checked after changing to a window that wasn't on top
- "No Transparancy" moved the window to the left side of the screen
- Bug in debugging system
- Bug in the SRL downloader which caused errors on certain occasions
- The function list button wasn't toggled off when closing it using the cross button on the list itself
- [#40] Functions resulting in arrays weren't shown in the functionlist
- [#39] Files with non-lowercase extensions weren't opened when dragged onto SCAR
- [#6, #25] Including was not possible when there was something behind the include statement on the same line
- [#36] The TReplaceDialog component was missing ReplaceText and OnReplace properties
- [#27] Hints for the toolbaritems to run, stop and pause a script always showed the default shortkeys
- After reverting, a script still showed as modified
- [#47] Colorpicker only supported main screen
- [#48] The Show Report button on the toolbar didn't show the state of the reportbox properly
- Bad Char: NPCChars #88
- [#66] On some computers files didn't open when not entering the extension in the opendialog
- [#73] FindColorCircle was broken
- Memory leak in the initial character loading
- [#87] FindColorComp didn't work for ccLum

Improvements:
- Tweaked FindColor, FindColorTolerance (speed increased)
- Tweaked FindColorsTolerance (speed increased)
- Tweaked CountColor, CountColorTolerance (speed increased)
- New tabsystem (from SCAR 4.0), takes care of all old tab bugs
- When moving the splitter between the debug box and report box, the splitter moves while dragging now instead of after dragging
- The plugin system now allows overriding standard SCAR functions for real, append '>' to the start of the function defenition string to override the function
- Added a boolean result to FindColorsSpiralTolerance
- Toolbar icon for the report box now stays pressed when it's open
- Toolbar icon for the function list now stays pressed when it's open
- You can now unset bookmark by pressing the toggle button for a bookmark with the cursor on the line where it's placed
- SRL download moved to freddy1990.com for speed increasement and more frequent updates
- New TestPlugin
- New tabs for the script editor
- Revamped the "Update to Revision" dialog for the SRL SVN
- Revamped the Function List
- PosEx now uses the Delphi default function
- Revamped the options dialog
- WriteLn now accepts every basic datatype
- Rewrote the codehints engine to work a lot more efficient
- A TBitmap's TransparentColor property is now also writeable
- CodeHints now display for functions with no params as well when a bracklet is opened
- TimeOut system was rewritten to be more accurate
- SetTimeOut now uses ms rather than seconds
- PlaySound now returns true if succeeded
- ReplaceRegex now supports subexpressions
- Debugbox now allows for the user of different colors, fontstyles and fonts
- The "SRL Download" function now prompts to download or not when SRL is already installed
- Rewrote FindColorCircle to double the speed
- Doubled the speed of the standard tolerance comparison
- Greatly improved the speed of InTriangle
- Increased speed of FindColorTriangle by 60% (not including the InTriangle speed increase [including, the speed has more than doubled])
- New FindBitmap function, speed doubled
- New FindColorComp function with increased efficiency and speed

Additions:
- function GetTargetDC: HDC;
- function TPAInTPA(TPA1, TPA2: TPointArray): Boolean;
- function GetTPABounds(TPA: TPointArray): TBox;
- function MiddleTPA(TPA: TPointArray): TPoint;
- function MiddleTPAEx(TPA: TPointArray; var x, y: Integer): Boolean;
- function DeleteSetting(Section, Setting: string): Boolean;
- FriendChars
- T2DStringArray (= array of TStringArray)
- procedure AddSSLHandler(Connection: Integer; HTTP: Boolean);
- Added an SSL handler to GetPage
- You can now "permanently" enable API calls in the options, you can still enable it until scar closes in the script menu when it's not enabled entirely
- Added a "SCAR Always On Top" button to the View menu
- procedure GetColorspeed2Modifiers(var huemodifier, saturationmodifier: Extended);
- procedure GetColorspeed3Modifiers(var Sensitivity: Integer);
- procedure SetProxyDetails(Connection: Integer; IP: string; Port: Integer);
- function Format(s: string; data: array of const): string;
- Added a -tray parameter to move SCAR to the systemtray from commandline
- Opening scripts will now open a new tab rather than a new SCAR window, you can revert to the old method using multiple windows by changing the setting in the options
- When SCAR is closing it will now call the "SCARClosing" procedure in every plugin that exports it
- When a script is terminated, SCAR will now call the "ScriptTerminate" procedure in every plugin that exports it
- When a script is paused, SCAR will now call the "ScriptPause" procedure in every plugin that exports it
- When a script is resumed, SCAR will now call the "ScriptResume" procedure in every plugin that exports it
- Alert popups
- procedure Alert(s: string);
- function Implode(Glue: string; Pieces: TStringArray): string;
- function Explode(Separator, s: string): TStringArray;
- function ExplodeEx(Separator, s: string; Limit: Integer): TStringArray;
- function TBitmapFromBmp(Bitmap: TBitmap; Bmp: Integer): Boolean;
- Berg NextSuite Editors have been added to the script engine for usage on forms (TNxEdit, TNxButtonEdit, TNxNumberEdit, ...)
- TBitmap now also has the Transparent and TransparentMode properties
- Added Transparent and Flat properties to TSpeedButton along with the Click method
- Added the Click method to the TBitBtn
- Added the Anchors property to TGroupBox
- Added the OwnerDraw, OnDrawTab and OnGetImageIndex properties to TPageControl
- If external functions are defined and api calls are enabled the codehints will show both the internal and external function in case that a function with that name is already present internaly in SCAR (See DllTest.scar [FindWindow])
- Support for the online manual (Ctrl+F1), will take you to the page of the function ur caret is placed on if it exists
- function CreateMusicPlayer: TMusic;
- TMusic class: Allows you to play wav, mp3, ogg, flac, mp1, mp2, midi and aiff files with volume control
- TDebugParams
- function GetDebugParams: TDebugParams;
- procedure SetDebugParams(Params: TDebugParams);
- function FindBitmapTolerance(Bitmap: Integer; var x, y: Integer; Tol: Integer): Boolean;
- TBooleanArray (= array of Boolean)
- function FindTransparentBitmap(Bitmap: Integer; var x, y: Integer; TranspCol, xs, ys, xe, ye: Integer): Boolean;
- function FindTransparentBitmapTolerance(Bitmap: Integer; var x, y: Integer; TranspCol, xs, ys, xe, ye, Tol: Integer): Boolean;
- function Average(Values: TExtendedArray): Extended;
- function FindColors(var Points: TPointArray; Color, xs, ys, xe, ye: Integer): Boolean;
- function FindBitmaps(Bitmap: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer): Boolean;
- function FindBitmapsTolerance(Bitmap: Integer; var Points: TPointArray; xs, ys, xe, ye, Tol: Integer): Boolean;
- function CountBitmap(Bitmap: Integer; xs, ys, xe, ye: Integer): Integer;
- function CountBitmapTolerance(Bitmap: Integer; xs, ys, xe, ye, Tol: Integer): Integer;
- function GetFolders(Path: string): TStringArray;
- procedure FreeMusicPlayer(Player: TMusic);

Removed:
- procedure rs_DeleteUID;
- function rs_DeleteUIDEx(Folder: string): Boolean;
- function rs_OnMinimap(x, y: Integer): Boolean;
- function rs_FindMMColors(Color: Integer): TIntegerArray;
- function RearrangeTPA(thearray: TPointArray; startpt, endpt: Integer; dox, up: Boolean): TPointArray;
- Coordinate normalization (if xs > xe, then swap and same for y coords), this caused an unneeded slowdown and it's up to the user to use the functions properly
- Script encryption has been removed, will be re-evaluated for SCAR 4.0

randy marsh

2009-04-18 16:04:45

oh great work man!

Naum

2009-04-18 16:04:54

Hip Hip hurrayy for freddy!!!

Now I can use different music types!!

Brandon02852

2009-04-18 16:18:58

This man goes out of the way for us. Bless him.

Iroki

2009-04-18 16:24:30

nice Freddy

Dervish

2009-04-18 16:27:57

Does anyone else get problems when dl'ing includes ? :S

Nava2

2009-04-18 16:30:50

But did you get a girlfriend? :P

Good job, might just stick with 3.15b for now though. :)

Although, could you elaborate on the FindTransparentBitmap?

impiwimpi

2009-04-18 16:47:45

I must say, it looks great!!! The only thing that is weird, is that some scripts work with 3.15b but not with 3.20(especially the DTM's)

(The script I'm currently using is Wizzup? Edgeville Fisher, which works on 3.15b but not on 3.20)

EDIT: Just to say, don't worry, the other scripts I tryed are working fine :)

Freddy1990

2009-04-18 17:17:39

From: Dr D. Dervish
Does anyone else get problems when dl'ing includes ? :S


Includes downloading didn't work for 3.15 either because kaitnieks' server is messed up, same thing happened to the news, SCAR 3.20 can download includes from my server, but I have yet to set up the scripts for it.

From: Nava2
But did you get a girlfriend? :P

Good job, might just stick with 3.15b for now though. :)

Although, could you elaborate on the FindTransparentBitmap?


Gf… Don't get me started… No…
Anyway, the new FindBitmapIn function works different than the original, it's a small detail, this one is more correct, it finds the exact bitmap, kaitnieks' let it match any color for a black pixel on the bitmap you were trying to find. FindTransparentBitmap allows you to do the same, it finds a bitmap and matches any color for the pixels with the transparent color on the bitmap you're trying to find. So if you entered black as color, it'll work exactly like kait's original function.

From: impiwimpi
I must say, it looks great!!! The only thing that is weird, is that some scripts work with 3.15b but not with 3.20(especially the DTM's)

(The script I'm currently using is Wizzup? Edgeville Fisher, which works on 3.15b but not on 3.20)


That's odd, the DTM functions weren't changed at all…

ShowerThoughts

2009-04-18 21:11:31

Amazing! I will (ab)use it as much as I can! ;)

Colluci

2009-04-18 22:20:39

I've got a problem. Scar 20 doesnt even open for me. Error 0xc0000005

Reinstalled tons of times

Mystic

2009-04-18 22:26:24

Omg nice job freddy! :)

~Penguin

ZaSz

2009-04-18 22:37:01

Woot, I needed a faster scar :p

noidea

2009-04-18 23:12:33

I looked at the change log :)
What are Regex Functions? I know that Regex was the guy to make Aryan, but nothing else.
What is (procedure SetProxyDetails(Connection: Integer; IP: string; Port: Integer);) for? Would it be used for something like SMART?
And I laughed at 'Bug in debugging system' :p

Edit: I see no Scroll bar on the function list, when it excedes the length =\

Zlakata

2009-04-18 23:25:42

Speed improvements! Good Job Freddy! (;

Rasta

2009-04-18 23:55:37

Great job Freddy!

ZaSz

2009-04-19 00:01:05

From: noidea

Edit: I see no Scroll bar on the function list, when it excedes the length =\


click on a function/procedure, and use the scroll bar on mouse or arrow keys

ShowerThoughts

2009-04-19 00:03:20

From: Colluci
I've got a problem. Scar 20 doesnt even open for me. Error 0xc0000005

Reinstalled tons of times


Could
be vista, run as admin?

Camaro'

2009-04-19 00:22:24

From: Dr D. Dervish
Does anyone else get problems when dl'ing includes ? :S


I tryed copying over old SRL rev 32 to the same spot and i get an error in math.scar now..

Dan Cardin

2009-04-19 00:24:39

From: Colluci
I've got a problem. Scar 20 doesnt even open for me. Error 0xc0000005

Reinstalled tons of times


i think i had the same thing as you, but then i tried running it again, and it worked fine. (at least this is the case for 3.20 RC4)

Cazax

2009-04-19 00:35:48

I'm getting the same error, first it had problems with BASS.dll, then it always has Error 0xc0000142 :(

XcanadamanX

2009-04-19 00:45:43

Excellent Job Freddy! Havent used it yet but it looks nice :p

Nava2

2009-04-19 00:48:58

From: Freddy1990
Gf… Don't get me started… No…
Anyway, the new FindBitmapIn function works different than the original, it's a small detail, this one is more correct, it finds the exact bitmap, kaitnieks' let it match any color for a black pixel on the bitmap you were trying to find. FindTransparentBitmap allows you to do the same, it finds a bitmap and matches any color for the pixels with the transparent color on the bitmap you're trying to find. So if you entered black as color, it'll work exactly like kait's original function.


So, the old one already ignored any black pixels?

Or is that the new one… Sorry, didn't follow what you meant.

Kryptic

2009-04-19 01:28:31

Awesome!! Thanks Freddy! :)

Mystic

2009-04-19 01:29:36

Omg <3 <3!!! TYVM!!

~Penguin

XabdullahX

2009-04-19 01:34:47

From: Cazax
I'm getting the same error, first it had problems with BASS.dll, then it always has Error 0xc0000142 :(


Could be .net framework?

Google this: .net framework 2.0 - click "i feel lucky" and download :)

Freddy1990

2009-04-19 05:29:48

From: Nava2
So, the old one already ignored any black pixels?

Or is that the new one… Sorry, didn't follow what you meant.


The old one ignored black pixels, the new one doesn't.

From: xabdullahx
Could be .net framework?

Google this: .net framework 2.0 - click "i feel lucky" and download :)


SCAR doesn't use the .NET framework

Awkwardsaw

2009-04-19 06:26:37

wow. i love you freddy :)

you have out done your self again

Nadeem

2009-04-19 08:19:36

awesome :D

except i've encountered a problem… It seems that you can no longer script types the same way you could in 3.15b ?

ex:


{ In SCAR 3.15b }
type
TExample = record
MyInteger: Integer;
MyIDK: Variant;
end;
TExampleArray = array [0..3] of TExample; { <-- This line fails and returns an error }
{ Something like: Unknown type 'TExampleArray' in script }

How can this be fixed/interpreted in the script differently?

- Thank you!

Kryptic

2009-04-19 09:50:18

Tyvm Freddy!!! :) Downloading now.

~Kryptic

Freddy1990

2009-04-19 14:24:42

From: Nadeem
awesome :D

except i've encountered a problem… It seems that you can no longer script types the same way you could in 3.15b ?

ex:


{ In SCAR 3.15b }
type
TExample = record
MyInteger: Integer;
MyIDK: Variant;
end;
TExampleArray = array [0..3] of TExample; { <-- This line fails and returns an error }
{ Something like: Unknown type 'TExampleArray' in script }

How can this be fixed/interpreted in the script differently?

- Thank you!


Hmm, that's another new bug in the script engine, these aren't my doing, I already fixed one which prevented me from releasing 3.20 … I'll see what I can do, but this bug seems to be more complex, might be harder to fix.

ShowerThoughts

2009-04-19 14:32:18

Freddy1990 sometime scar freezes in the typign area which will let you show the old piece of text that there was but the new one pasted over it is there.
Sometimes I got white shapes on my code.

I love the new 'fatal' error & continue thing I still can save it.

Colluci

2009-04-19 14:47:07

From: Freddy1990
The old one ignored black pixels, the new one doesn't.



SCAR doesn't use the .NET framework


Then what's the problem? I can't open it. Tried to run as admin, everything. Am I missing any .dll?

Freddy1990

2009-04-19 15:02:55

From: Hermpie
I love the new 'fatal' error & continue thing I still can save it.


???

From: Colluci
Then what's the problem? I can't open it. Tried to run as admin, everything. Am I missing any .dll?


I'm not sure…

tico2

2009-04-19 19:06:15

Whan I try to open it it comes up with 50 error. I'm using vist business 64 bit. Is this happening to any 1 else?

Nadeem

2009-04-19 19:12:33

From: tico2
Whan I try to open it it comes up with 50 error. I'm using vist business 64 bit. Is this happening to any 1 else?


Yes :( Happened on my desktop, but works fine on my laptop using Vista Ultimate x86 (32-bit)

mrpickle

2009-04-19 19:30:56

I'll stick with 3.15b for now. seems like there's some inability for older things (eg scripts) to work on 3.20. I'll get 3.20 when I get mad at 3.15b =).

In other words. I'll try 3.20 soon.

Edit: Just tried the 3.20. Works much better than 3.15 You made me dl it twice in 5 min as I happened to have dled first one mins before you updated it.

ppl had issues with scripts not working in 3.20 that worked in 3.15b. So far, No problems for me =). (used it for only 2 hours and counting.)

Edit2: There are problems with it with some scripts. Compiles nicely, just the colour detection is different?

blahblob

2009-04-19 20:38:41

I'm downloading it right now. :D

From: Freddy1990

- Bug in debugging system


^lol

momosimo

2009-04-19 23:45:45

Thank you so much Freddy! <333333

Can't wait to start using it!

Freddy1990

2009-04-20 02:26:43

From: tico2
Whan I try to open it it comes up with 50 error. I'm using vist business 64 bit. Is this happening to any 1 else?


Try to redownload maybe? Shortly after the release I modified the download and reuploaded it, however, that version was highly bugged, spanwing errors like crazy, however, I fixed it shortly afterwards, but maybe you still got that bugged version?

MylesMadness

2009-04-20 02:56:06

The default script doesn't work anymore. Besides that <3

x[Warrior]x3500

2009-04-20 04:02:03

so i have SCAR Divi 3.20 RC2… is it worth downloading the final release and moving all my scripts to the new folder?

Freddy1990

2009-04-20 09:18:57

From: Mylesmadness
The default script doesn't work anymore. Besides that <3


Default script works fine for me… Default script is now saved as Default.scar, but it should still load newscript.txt …

From: x[Warrior]x3500
so i have SCAR Divi 3.20 RC2… is it worth downloading the final release and moving all my scripts to the new folder?


Yes, RC2 is quite unstable…

tico2

2009-04-20 10:21:06

From: Freddy1990
Try to redownload maybe? Shortly after the release I modified the download and reuploaded it, however, that version was highly bugged, spanwing errors like crazy, however, I fixed it shortly afterwards, but maybe you still got that bugged version?


Thank you very much :)

Yes I probably was one of the first to download it. Works perfectly now.

Great work! :D

Punkgi

2009-04-21 02:49:36

So will the scripts made with 3.15b be compatible?

ian.

2009-04-21 02:51:01

different SCAR's doesn't change it usually.. it's SRL that makes scripts not work :)

you'll have to edit a small amount of things.. but it should be obvious :)

senrath

2009-04-21 03:11:44

From: Punkgi
So will the scripts made with 3.15b be compatible?


There are a few things that SCAR 3.20 can do that 3.15b can't, but not many. So I'd say most of the scripts will be backwards compatible, but some won't.

Nadeem

2009-05-01 05:33:59

I think we should all start scripting all our upcoming scripts with 3.20b (hopefully people are already doing this), so that Freddy doesn't have to put up with too much strain trying to make 3.20 backwards compatible. Really 3.20b seems to be working really good! And has very nice new features :P He has also managed to fix the bug with type/records as I've noticed.

SCAR 3.20 is s3x3d up :)

Freddy1990 = :norris:

Edit: I know this may seem like a pretty big bump, but we need to support and promote SCAR 3.20 for all the effort Freddy has put into it.

ShowerThoughts

2009-05-01 14:13:56

Agreed, rewrite the SRL library!

j/k :p

ian.

2009-05-01 16:12:16

From: Hermpie
Agreed, rewrite the SRL library!

j/k :p


Agree the agreement! :D

CowFish

2009-05-03 01:30:53

For anyone who got the 0xc0000005 error, I just used SCAR Portable instead and that solved my problems. I don't know if there is much of a difference between portable and regular but as long as it works I'd say it's good. :D

Cazax

2009-05-03 01:35:45

For 0xc problems, download SCAR portable edition, copy the dlls inside the folder, paste them in C:\windows\system32.

l33t_h4x0r

2009-07-11 16:59:14

OS : Windows Vista 32-bit

Error : The procedure entry point _ could not be located in the dynamic link library BASS.dll

Problem signature:
Problem Event Name: APPCRASH
Application Name: scar.exe
Application Version: 0.0.0.0
Application Timestamp: 2a425e19
Fault Module Name: BASS.dll!_
Fault Module Version: 6.0.6001.18000
Fault Module Timestamp: 4791a7a6
Exception Code: c0000139
Exception Offset: 00009cac
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 9d13
Additional Information 2: 1abee00edb3fc1158f9ad6f44f0f6be8
Additional Information 3: 9d13
Additional Information 4: 1abee00edb3fc1158f9ad6f44f0f6be8

P.S. It worked fine on XP

Crusade123

2009-07-24 02:32:31

yay i have this version all whipped up and reddy 2 go :)

randy marsh

2009-07-24 02:46:58

- Bug in debugging system
lol the irony

Boreas

2009-07-24 02:57:31

3.21 is out
http://www.villavu.com/forum/showthread.php?t=48056