SCAR Code:
SCAR Divi 3.15:
---------------
Bugfixes:
- The "Show Report" button in the menu wasn't working
- When closing scripts, errors would occur
- TrimEx would get stuck in an infinite loop when using an empty string as delimiter
- Mouse coordinates in the statusbar wouldn't disable anymore when doubleclicking them
- The result of FindColorsTolerance was wrong
- Fixed the tray icon
- Couple of possible access violations
- When a bug with a compiler directive occurred, the script wasn't terminated
- There was a bug with T2DIntArray and T2DPointArray
- FindColorCircle wasn't working
- Dozer image in the getting started wizard had vanished
- rs_FindMMColors was broken
Improvements:
- The Swap function now accepts ANY datatype, they have to be 2 of the same kind though
- Optimised the FindBitmap function a bit
- Increased compiling time by 4ms
Additions:
- There's a new tolerancemode based on the CIE colorspace (XYZ)
- procedure SetColorspeed3Modifiers(Sensitivity: Integer); (default sensitivity is 4)
- The procedure ScriptPause will be called when a script is paused
- The procedure ScriptResume will be called when resuming a paused script
- Added the CaretPos property to the TMemo and TRichEdit classes
- Added the ScrollBars property to the TRichEdit class
- Time that was needed to compile after "successfully compiled"
- More functions accessable trough plugins
- Reset Specified Window button (sets the default window [desktop] as client)
- procedure SetDesktopAsClient;
- Separed portable edition of SCAR
Removed:
- Silent Mouse
- procedure SetMouseMode(Silent: Boolean);
- The Open From Web menu
- Forget Specified Window button
- Portable mode
SCAR Divi 3.14:
---------------
Bugfixes:
- CountColor didn't work
- The filewall settings weren't always saved
- SCAR didn't recycle the spots of freed bitmaps in the bitmap array
- Fixed rs_OnMinimap
- SCAR would error after restoring it from the tray when a script had already ran
- The CodeHints now hide when the user is prompted to reload a script
- Fixed bug in FindColorsTolerance that made the coordinates screwed up
- Fire- and filewall settings are now saved on portable mode
- TSizeConstraints had disappeared again somehow
- Fixed the tolerance bug
- Reverted the HSL tolerance algorithm, this means it's slower than 3.13, but it works and it's still a lot faster than before
- Disguise was not thread safe
- MoveToTray was not thread safe
Improvements:
- Improved the speed of CountColor
- Increased compiling speed
Additions:
- T2DPointArray = array of array of TPoint;
- TCanvas functions: Polygon, Polyline, PolyBezier, PolyBezierTo
- procedure QuickSort(var Values: TIntegerArray);
- function FindColorComp(var x, y: Integer; Comp: Variant; CompType: TColorComp; xs, ys, xe, ye: Integer; Tolerance: Extended): Boolean;
- TColorComp = (ccRed, ccGreen, ccBlue, ccHue, ccSat, ccLum);
Removed:
- function rs_ScanMiniMap(iFrom, iTo, Distance, Color: Integer): Integer;
- function rs_GetCompassAngleDegrees: Extended;
- function rs_GetCompassAngleRadians: Extended;
- function rs_GetMinimapAngle: Extended;
- function rs_ShopScreen: Boolean;
- function rs_IsBankOpen: Boolean;
- procedure rs_FixMouse(var x,y: integer; slot: Integer);
- procedure rs_FixMouseEx(var x,y: integer; slot, maxshift, squaresx, squaresy, squaresize: Integer; minaccuracy: Extended);
- function FindHue(var x, y: Integer; Hue: Extended; x1, y1, x2, y2: Integer): Boolean;
- function FindHueTolerance(var x, y: Integer; Hue: Extended; x1, y1, x2, y2: Integer; Tolerance: Extended): Boolean;
- function FindSaturation(var x, y: Integer; Sat: Extended; x1, y1, x2, y2: Integer): Boolean;
- function FindSaturationTolerance(var x, y: Integer; Sat: Extended; x1, y1, x2, y2: Integer; Tolerance: Extended): Boolean;
- function FindLuminance(var x, y: Integer; Lum: Extended; x1, y1, x2, y2: Integer): Boolean;
- function FindLuminanceTolerance(var x, y: Integer; Lum: Extended; x1, y1, x2, y2: Integer; Tolerance: Extended): Boolean;
SCAR Divi 3.13:
---------------
See SCAR Divi 3.12b-e
Bugfixes:
- FindColor and FindColorsTolerance were not functioning properly in SCAR 3.12d-e
- rs_isBankOpen gave an access violation when called when the bank wasn't opened
Additions:
- function rs_GetUpTextAt(x, y, TextLength: Integer): string;
New Scripts:
- Test\WelcomeToRS.scar
SCAR Divi 3.12e:
----------------
Bugfixes:
- "Math error" when using tolerance-based functions
Improvements:
- Increased the speed of FindColorSkipCoords by about 25%
- Increased the speed of FindColorCircle by about 20%
- Increased the speed of FindColor by about 57% (since SCAR 3.12c)
Additions:
- procedure FastReplaceColorTolerance(bmp: Integer; OldColor, NewColor, Tolerance: Integer);
SCAR Divi 3.12d:
----------------
Bugfixes:
- In ColortoXYZ and XYZtoColor the Y and Z values got switched
- TSizeConstraints was removed by accident
Improvements:
- Small speed increase of CountColors(Tolerance)
- Increased the speed of Tolerance functions up to twice as fast or more when using tolerancespeed 2
- Small speed increase of the FindColorSkipBox functions
- Increased the speed of all FindColorSpiral functions seriously
- GetClientCanvas is now resource-safe, there's no need to free the canvas anymore
- Increased the speed of GetColor by an average 0.0040ms (Now average 0.0131ms) (Useful during repetitive usage)
Removed:
- procedure rs_GetInvRC(xx, yy: Integer; var Row, Col: Integer);
- function rs_GetShopSlot(xx, yy: Integer): Integer;
- procedure rs_GetShopRC(xx, yy: Integer; var Row, Col: Integer);
- function rs_FindShopColorSlot(var Slot: Integer; Color, Tolerance: Integer): Boolean;
- function rs_FindShopBitmapSlot(var Slot: Integer; Bitmap, Tolerance: Integer): Boolean;
- function rs_FindShopDTMSlot(var Slot: Integer; DTM: Integer): Boolean;
- function rs_FindShopColorRC(var Row, Col: Integer; Color, Tolerance: Integer): Boolean;
- function rs_FindShopBitmapRC(var Row, Col: Integer; Bitmap, Tolerance: Integer): Boolean;
- function rs_FindShopDTMRC(var Row, Col: Integer; DTM: Integer): Boolean;
- function rs_GetCurrentTab: Integer;
- function rs_FindInvColorSlot(var Slot: Integer; Color, Tolerance: Integer): Boolean;
- function rs_FindInvBitmapSlot(var Slot: Integer; Bitmap, Tolerance: Integer): Boolean;
- function rs_FindInvDTMSlot(var Slot: Integer; DTM: Integer): Boolean;
- function rs_FindInvColorRC(var Row, Col: Integer; Color, Tolerance: Integer): Boolean;
- function rs_FindInvBitmapRC(var Row, Col: Integer; Bitmap, Tolerance: Integer): Boolean;
- function rs_FindInvDTMRC(var Row, Col: Integer; DTM: Integer): Boolean;
SCAR Divi 3.12c:
----------------
Bugfixes:
- Bug in the improved FindColorsTolerance
- Bug in the custom script directory function
SCAR Divi 3.12b:
----------------
Bugfixes:
- Even though you cancel when clicking update to rev using the SVN function, it would still move plugins, manual and show the update status message
- Small bug for portable setting
- Several small bugs in the fire-filewall system
Improvements:
- Increased the speed of FindColorsTolerance greatly with 6.5-11.5ms depending on if you're using 0 tolerance or more.
SCAR Divi 3.12:
---------------
Bugfixes:
- Error occurs when closing with Preview opened
- Opening with Function List opened doesn't show a check next to the menuitem
- Opening with Preview opened doesn't show a check next to the menuitem
- Debug Image menu item never checks
- UID removal functions
- Codehint remained active after closing the tab where it was created
- Tiny bug in the SRL download progressbar
- Memory leaks in the tab system
- SCAR will freeze when you don't try to reload a script you deleted in the open dialog
- Wait with negative number feezes SCAR (now it won't do anything)
- Bug in MoveMouse that caused a misplacement of a pixel or so
- Compassangle functions and minimapangle function were broken
- The small window function did not check if SCAR was maximised
- Some remaining bugs in the error lines
- Bug in codelist caused functions which have arrays as result types not to be listed
- DTM editor didn't ask if you wished to overwrite when saving
- You can't run scripts more than once at the same time anymore (compiling when running has been disabled)
- Script could include itself and form an infinite loop
- When a script was paused it would still count the time as running
Improvements:
- function rs_GetUpText: string; (Increased to 99% accuracy in all situations and speed to an average 10ms from 480ms)
- Function list only refreshes when it changes
- procedure SetTargetDc(Dc: HDC);
- function GetBitmapDc(Bmp: Integer): HDC;
- Clicking Show Preview when it's opened will now close it
- Clicking Show Debug Image when it's opened will now close it
- Removed grey line in the DebugBox
- FindColor & FindColorTolerance (small speed increase +/- 3ms)
- The status will now also be shown when hovering the tray icon
- Internal improvements of: DeleteDebugLine, GetDebugLineCount, GetDebugText
- Improved the bitmapsystem again
- IsNumpadKeyDown with 10 will now return true if the num lock key is down
- Recreated a huge part of the tabsystem
- SCAR will not ask to reload a script if it's changed while a script is running
- Improved the html export a bit
- The portable settings file (INI) is now 100% supported
- Hints won't open a new tab if they're in an include anymore
- Inc, IncEx, Dec and DecEx can now be used for all datatypes for which it's usable in Delphi
- Moved codehints settings to options
- All spaces in bitmapnames will be replaced with underscores for variables
- For forming the variablename for a bitmapstring the name will now be trimmed to 15 instead of 10 characters
- Mask editor will now use the newest bitmap encryption
- The form editor has been renewed!
- Replace All in the replace dialog will now instantly replace every instance in the script
- The installer has been modified to support SCAR's portable mode
Additions:
- function BitmapFromMem(Dc: HDC): Integer;
- function rs_isBankOpen: Boolean;
- New window option
- Close All Tabs item in the rightlick menu for the tabs
- The ability to use a couple of SCAR's built-in functions in plugins (see "Accessable SCAR Functions.txt" for which functions
- SCAR will now try to execute the procedure ScriptTerminate right before terminating the script
- Clear button for the reportbox
- Hide/Show Function List toolbarbutton
- Save, Save As and Save All items in the rightclick menu for the tabs
- function GetDebugLine(Line: Integer): string;
- procedure ClearDebugLine(Line: Integer);
- procedure ReplaceDebugLine(Line: Integer; s: string);
- The menu item to open the currently opened script's folder
- procedure SetOnTop(Window: Integer; Top: Boolean);
- Revert option
- Save as default option
- Tabdragging
- SCAR's window dimensions and position will be saved and loaded the next time you start it
- procedure FastReplaceColor(bmp: Integer; OldColor, NewColor: Integer);
- Compilerdirective that allows you to use certain code for certain versions of SCAR, it's formatted as: "Scar[version]" For 3.12: "Scar312" check DiviDirective.scar
- function RearrangeTPA(thearray: TPointArray; startpt, endpt: Integer; dox, up: Boolean): TPointArray; // By Boreas
- Options for the firewall to allow all, disallow all or ask for connections
- Options for the filewall to allow all, disallow all or ask for file access
- function MD5FromFile(Filepath: string): string;
- function CreateBitmapFromText(Text: string; Chars: Integer; TextColor: Integer): Integer;
- procedure DeleteINI(Section, KeyName, FileName: string);
- Changing the default scripts directory
- Subversion support for SRL
- function BitmapToString(Bmp: Integer): string;
- Bookmarks
- Adding registry entry with SCAR's path upon associating (key: "HKEY_CURRENT_USER\Software\SCAR" Entry: "Path")
- Adding registry entry with SCAR's version upon associating (key: "HKEY_CURRENT_USER\Software\SCAR" Entry: "Version")
Removed:
- function GetBitmapName(bmp: Integer): string;
- procedure SetBitmapName(bmp: Integer; Name: string);
- function GetBitmapFileName(bmp: Integer): string;
- procedure SetBitmapFileName(bmp: Integer; FileName: string);
- Rs screen constants
- "SCAR Divi 3.xx New Functions.txt" as now new functions are reported in the changelog
SCAR Divi 3.11:
---------------
Bugfixes:
- Function List refreshing when a closing tab trough a menu
- When 1 modifed script was opened it asked to save twice when you rightclicked the tab and pressed close
- Fixed where the codehints didn't display the information for functions built into SCAR
- Star next to filename in the tab didn't go away when undo'ing all modifications
- Fix for several access violations in the codehints
- Fixed a very critical bug in the scriptengine which was mostlikely the cause of many access violations
- Completely fixed statusbar dragging bug
Improvements:
- Added a square around the hovered pixel in the DTM editor zoom
- Constraints have been added to the TControl class (Now most form components will have them)
- Modified the way how the Function List refreshes
- SaveToFile and WriteINI now create the nessecary directories to save according to the filepath
- SaveToFile and LoadFromFile now return True if they succeeded, False if they failed
- procedure SetTargetDc(Dc: Extended);
Additions:
- function AMin(Data: TIntegerArray): Integer;
- function AMinE(Data: TExtendedArray): Extended;
- procedure BubbleSortB(var Values: TIntegerArray);
- TSizeConstraints class
- function MD5(s: string): string;
- The ability to make SCAR load it's settins from an INI file (and save them to it)
- Automated checking of opened files for external modifications
- Plugins folder button in the folders menu
- function GetBitmapDc(Bmp: Integer): Extended;
SCAR Divi 3.10:
---------------
Bugfixes:
- Crosshair freezing bug (dragging after closing the selected window)
- Crosshair error bug (closing while still selecting)
- Fixed a bug in GetColors (Access violation, not very common when properly used)
- Bug when closing
- Small memory leak in codehints
- Disabling SRL Download button after pressing until the download is completed
- Removed some debugging code I forgot to remove (nothing serious)
- Alot of fixing in the TRichEdit component
- Alot of fixing in the TProgressBar component
- Normalise window will minimalise the window when it's maximised first
- Errors when closing right after making scar open a folder in the folders menu
- Returning wrong error line
- Fixed Mousebox Functions
- Small memory leak in SRL Download
- Bug that made SCAR get a wrong shape when returning from maximization
- SetClientWindowHandle didn't set the client dimensions, rendering GetClientDimensions useless
Improvements:
- Improved stability of several components
- Speeded up running a script
- Slight improvements to the form editor
- Normalise window will try to resize until the normal size has been reached
- Made it possible not only to check for versions of SRL, but also for patches
Additions:
- function ToCart(Point: PPoint): TPoint;
- function ToCartOffset(Point: PPoint; offset: TPoint): TPoint;
- function ToPolar(Point: TPoint): PPoint;
- function ToPolarOffset(Point, offset: TPoint): PPoint;
- procedure Swap(var A, B: Integer);
- procedure BubbleSort(var Values: TIntegerArray);
- Progressbar for SRL Download
- procedure Dec(var Number: Integer);
- procedure DecEx(var Number: Integer; nDec: Integer);
- TCheckListView Component
- More eventhandlers for: TTabSheet, TStatusBar, TPageControl
- More eventhandlers in general: OnContextPopup, OnMouseWheel, OnMouseWheenUpDown
- TLabeledEdit Component
- function rs_GetMinimapAngle: Extended; (Made by pups)
- Caption property of the TTabSheet component
- function PosEx(search, s: string; from: Integer): Integer; (Made by Newbiehacker)
- function LastPosEx(search, s: string; from: Integer): Integer; (Made by Newbiehacker)
- function LastPos(search, s: string): Integer; (Made by Newbiehacker)
- function StartsWith(prefix, s: string): Boolean; (Made by Newbiehacker)
- function EndsWith(suffix, s: string): Boolean; (Made by Newbiehacker)
- function TrimEx(delimiter, s: string): string; (Made by Newbiehacker)
- function RegexPos(Txt, Regex: string): Integer;
- function FindRegex(Txt, Regex: string): string;
- function ReplaceRegex(Txt, Regex, ReplaceStr: string): string;
- function IsNumpadKeyDown(Key: Byte): Boolean;
- function StrToFloatDef(s: string; def: Extended): Extended;
- function StrToBoolDef(s: string; def: Boolean): Boolean;
- function GetColorToleranceSpeed: Integer;
- Function List
- function BitmapFromString2(Validate: Boolean; str: string): Integer;
- function GetBitmapName(bmp: Integer): string;
- procedure SetBitmapName(bmp: Integer; Name: string);
- function GetBitmapFileName(bmp: Integer): string;
- procedure SetBitmapFileName(bmp: Integer; FileName: string);
- procedure SetTargetDc(Dc: Integer);
- procedure ResetDc;
Removed:
- procedure TabSheetCaption(Tab: TTabSheet; Caption: string);