Search the Community
Showing results for tags 'pre-release'.
-
I've been "less active" lately, when it comes to releasing new things. The reason for this is that I've been working on a new project for quite some time now. So now I'd like to present the first public pre-release version for SCAR Divi 4.00, which will replace SCAR Divi 3.xx eventually, when it's finished. This is a pre-alpha release, so it could be far from stable. SCAR Divi 4 marks a major milestone in SCAR's evolution. It focuses on object oriented programming, performance and rapid development. Unlike SCAR Divi 3, this version runs scripts in a separate process, which prevents the script from ever causing the IDE to crash or to be affected in any negative way. Scripts will now execute at lightning speed, as SCAR 4 is powered by the powerful Delphi Web Script engine, which executes scripts efficiently by employing a powerful interpreter engine. The engine also offers a very extensive pascal syntax, with a lot of features which aren't even present in Delphi. This engine was chosen over other engines as it provides the perfect scripting environment, which is very powerful, yet easy to learn. You're probably wondering what SCAR 4 can do right now. So here's a list: Send input to/capture windows Work with bitmaps (WIP) Display errors/hints in-code live Display compiler messages live Display runtime exceptions Code completion Code hints Load included core units Garbage collection Compile projects consisting out of multiple units This list of abilities will of course be growing rapidly. at the moment there is no documentation available yet, but the included core API units can be used as a reference. Keep in mind that the API is still under development and is prone to changes. This small sample demonstrates how to capture a window and convert the image to a bitmap string. uses Macro; var Wnd = TWndTarget.Create(200886); // Replace number with a window handle WriteLn(Wnd.Capture.SaveToString); Aside from the main API, a scripted legacy API is also included, which aims to emulate the SCAR Divi 3 API. To include it, add "Legacy" to uses. Downloads: SCAR Divi Development Enjoy ~Freddy
-
The first 3.41 beta build is now available. 3.41 will be mainly a small maintenance release as I'm focusing my efforts on developing SCAR 4. Nonetheless, it has some important fixes and the latest updates from the PascalScript GitHub repository. Downloads: SCAR Divi Development Changelog: Bugfixes: - ReverseATPA did not function correctly - Large memory leak in the script engine Tweaks: - Updated PascalScript engine to latest build (5d00e6cfb950a3c898d2d6813862199e5c5142c6) Enjoy ~Freddy
-
The first 3.40 beta build is now available. I've been working a lot on TSCARBitmap, it will now load any type of png image. There's also several new functions available. Downloads: SCAR Divi Development Changelog: Bugfixes: - ActivateClient restored window when maximized - TPAUnique didn't function properly - A bug in Delphi's VCL framework prevented palette based PNG imaged to be loaded correctly by TSCARBitmap - Several png formats were unsupported or lost transparency - FloodFill(Tol)(Ex) threw exceptions due to an implementation flaw New: - procedure SortTPAByX(var TPA: TPointArray); - procedure SortTPAByY(var TPA: TPointArray); - TChrono class to measure time intervals - TObject.ClassName - procedure ClampInt(var Value: Integer; const Min, Max: Integer); - procedure ClampExt(var Value: Extended; const Min, Max: Extended); - procedure ClampTIA(var TIA: TIntArray; const Min, Max: Integer); - procedure ClampTEA(var TEA: TExtArray; const Min, Max: Extended); - function MoveFile(const OldPath, NewPath: string): Boolean; - TSCARBitmap.ClearEx - function CopyFile(const OldPath, NewPath: string): Boolean; - function IsValidPath(const Path: string): Boolean; - TBmpResampler = (brNearest, brBilinear, brBicubic, brSuperSample); - procedure TSCARBitmap.ResizeEx(const NewWidth, NewHeight: Integer; const Resampler: TBmpResampler); - procedure TSCARBitmap.ClearAlpha; - procedure TSCARBitmap.ClearAlphaEx(const Alpha: Byte); - procedure TSCARBitmap.SetAlpha(const Color: Integer; const Alpha: Byte); - procedure TSCARBitmap.SetAlphaEx(const Colors: TIntArray; const Alpha: Byte); - property TSCARBitmap.Alpha[const X, Y: Integer]: Byte; Tweaks: - Optimized TPASpread, SortTPA(Ex) and TPARemoveEx - Rewritten SplitTPA(Ex) for added performance - TPADelete now raises an exception when the index fall outside of the array boundaries - TPARemove now removes the first point instead of the last when removing just one - Editor now shows icon to indicate modifications in tab - New clean look - Improved TSCARBitmap.SaveToPng performance - Merged in changes from official PascalScript codebase: * Support Include/Exclude for sets * Support iterating over enum types - Proper alpha channel support in TSCARBitmap - TSCARBitmap.Pixels renamed to TSCARBitmap.Pixel - TSCARBitmap.DrawTo(Ex) now has the "Blend" parameter for alpha blending Removed: - TSCARObject - Automated resource freeing for (previous) TSCARObject descendants Enjoy ~Freddy
-
Hey guys, the first alpha build for 3.40 is now available. Currently it's mainly a couple of new functions and some performance tweaks. But SCAR also has a new look, which will stay if the feedback is positive. Downloads: SCAR Divi Development Changelog: New: - procedure SortTPAByX(var TPA: TPointArray); - procedure SortTPAByY(var TPA: TPointArray); Tweaks: - Optimized TPASpread, SortTPA(Ex) and TPARemoveEx - Rewritten SplitTPA(Ex) for added performance - TPADelete now raises an exception when the index fall outside of the array boundaries - TPARemove now removes the first point instead of the last when removing just one - Editor now shows icon to indicate modifications in tab - New clean look Enjoy ~Freddy
-
Just another bugfix. 3.39 will be a small maintenance release. Downloads: SCAR Divi Development Changelog: Bugfixes: - [#2] Bug in CTS2 algoritm - [#15] FindBitmap(Tol) with bitmap larger than area did not always return False - SCAR's process didn't always terminate on some occasions New: - TSCARBitmap.Crop Tweaks: - Greatly improved Explode(Ex) performance Enjoy ~Freddy
-
A new 3.39 alpha. Downloads: http://dev.scar-divi.com Changelog: Bugfixes: - [#2] Bug in CTS2 algoritm New: - TSCARBitmap.Crop Enjoy ~Freddy
-
Just a small bugfix scheduled for 3.38.01, nothing new in this release so far. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Nothing? Enjoy ~Freddy
-
The first beta release for SCAR Divi 3.38 is now available. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - Possibly critical fixes for several TIA functions: TIAIntersect, TIAUnique and TIAInTIA - [#175] Saving an untitled file doesn't update the program title New: - procedure ReplaceColors(const Bmp: TSCARBitmap; const Colors: TIntArray; const NewColor: Integer); - procedure ReplaceColorsTol(const Bmp: TSCARBitmap; const Colors: TIntArray; const NewColor, Tol: Integer); - function RandomTIA(const Count, Range: Integer): TIntArray; - function RandomTIAEx(const Count, Range: Integer; const AllowDuplicates: Boolean): TIntArray; - procedure OffsetTEA(var TEA: TExtArray; const Offset: Extended); - function TEAInsert(var TEA: TExtArray; const Index: Integer; const Ext: Extended): Integer; - function InvertColor(const Color: Integer): Integer; - TSCARBitmap.Invert - function SpiralPoint(const Pos: Cardinal): TPoint; - function SpiralPointEx(const Pos: Cardinal; const Origin: TPoint): TPoint; - function SpiralPos(const Pt: TPoint): Cardinal; - function SpiralPosEx(const Pt, Origin: TPoint): Cardinal; - procedure SortTPASpiral(var TPA: TPointArray); - procedure SortTPASpiralEx(var TPA: TPointArray; const Point: TPoint); - function CopyTIA(const TIA: TIntArray): TIntArray; - function CopyTIAEx(const TIA: TIntArray; const Index, Count: Integer): TIntArray; - function ATPADelete(var ATPA: T2DPointArray; const Index: Integer): TPointArray; - function ATIADelete(var ATIA: T2DIntArray; const Index: Integer): TIntArray; - function ATPAContains(const ATPA: T2DPointArray; const TPA: TPointArray): Boolean; - function ATIAContains(const ATIA: T2DIntArray; const TIA: TIntArray): Boolean; - function PermuteTPA(const TPA: TPointArray): T2DPointArray; - function PermuteTIA(const TIA: TIntArray): T2DIntArray; - procedure TIAFreq(const TIA: TIntArray; out Values, Frequencies: TIntArray); - procedure TIARelFreq(const TIA: TIntArray; out Values: TIntArray; out Frequencies: TExtArray); - procedure TPAFreq(const TPA: TPointArray; out Values: TPointArray; out Frequencies: TIntArray); - procedure TPARelFreq(const TPA: TPointArray; out Values: TPointArray; out Frequencies: TExtArray); - procedure TEAFreq(const TEA: TExtArray; out Values: TExtArray; out Frequencies: TIntArray); - procedure TEARelFreq(const TEA: TExtArray; out Values, Frequencies: TExtArray); - procedure TEARange(const TEA: TExtArray; out Lo, Hi: Extended); - function CombineTEA(const TEA1, TEA2: TExtArray): TExtArray; - procedure SortTEA(var TEA: TExtArray); - procedure SortTEAEx(var TEA: TExtArray; const Ext: Extended); - function TEAMean(const TEA: TExtArray): Extended; - function TEASum(const TEA: TExtArray): Extended; - procedure TEARemove(var TEA: TExtArray; const Ext: Extended); - procedure TEARemoveEx(var TEA: TExtArray; const Ext: Extended; const All: Boolean); - function CopyTEA(const TEA: TExtArray): TExtArray; - function CopyTEAEx(const TEA: TExtArray; const Index, Count: Integer): TExtArray; - procedure TIAAdd(var TIA: TIntArray; const Value: Integer); (Alias: OffsetTIA) - procedure TIAAddEx(var TIA: TIntArray; const Values: TIntArray); - procedure FillTIA(var TIA: TIntArray; const Int: Integer); - procedure FillTIAEx(var TIA: TIntArray; const Values: TIntArray); - procedure TIASubtract(var TIA: TIntArray; const Value: Integer); - procedure TIASubtractEx(var TIA: TIntArray; const Values: TIntArray); - procedure TIAMultiply(var TIA: TIntArray; const Value: Integer); - procedure TIAMultiplyEx(var TIA: TIntArray; const Values: TIntArray); - procedure TIADivide(var TIA: TIntArray; const Value: Integer); - procedure TIADivideEx(var TIA: TIntArray; const Values: TIntArray); - function TIAToTEA(const TIA: TIntArray): TExtArray; - procedure TEAAdd(var TEA: TExtArray; const Value: Extended); (Alias: OffsetTEA) - procedure TEAAddEx(var TEA: TExtArray; const Values: TExtArray); - procedure FillTEA(var TEA: TExtArray; const Value: Extended); - procedure FillTEAEx(var TEA: TExtArray; const Values: TExtArray); - procedure TEASubtract(var TEA: TExtArray; const Value: Extended); - procedure TEASubtractEx(var TEA: TExtArray; const Values: TExtArray); - procedure TEAMultiply(var TEA: TExtArray; const Value: Extended); - procedure TEAMultiplyEx(var TEA: TExtArray; const Values: TExtArray); - procedure TEADivide(var TEA: TExtArray; const Value: Extended); - procedure TEADivideEx(var TEA: TExtArray; const Values: TExtArray); - procedure FillTPA(var TPA: TPointArray; const Value: TPoint); - procedure FillTPAEx(var TPA: TPointArray; const Values: TPointArray); - procedure Write(x); - function RoundTEA(const TEA: TExtArray): TIntArray; - function TruncTEA(const TEA: TExtArray): TIntArray; - function FloorTEA(const TEA: TExtArray): TIntArray; - function CeilTEA(const TEA: TExtArray): TIntArray; - procedure TIAPush(var TIA: TIntArray; const Value: Integer); - function TIAPop(var TIA: TIntArray): Integer; - procedure TPAPush(var TPA: TPointArray; const Point: TPoint); - function TPAPop(var TPA: TPointArray): TPoint; - procedure TEAPush(var TEA: TExtArray; const Value: Extended); - function TEAPop(var TEA: TExtArray): Extended; - function TIAMedian(const TIA: Integer): Extended; - function TEAMedian(const TEA: TExtArray): Extended; - procedure SortTPAByColumn(var TPA: TPointArray); - TIntegerArray = TIntArray (alias) - TExtendedArray = TExtArray (alias) - TStringArray = TStrArray (alias) - procedure TIAReplace(var TIA: TIntArray; const OldValue, NewValue: Integer); - procedure TIAReplaceEx(var TIA: TIntArray; const OldValues: TIntArray; const NewValue: Integer); - procedure TEAReplace(var TEA: TExtArray; const OldValue, NewValue: Extended); - procedure TEAReplaceEx(var TEA: TExtArray; const OldValues: TExtArray; const NewValue: Extended); - procedure TPAReplace(var TPA: TPointArray; const OldPoint, NewPoint: TPoint); - procedure TPAReplaceEx(var TPA: TPointArray; const OldPoints: TPointArray; const NewPoint: TPoint); - procedure ReverseTEA(var TEA: TExtArray); Tweaks: - TPAMiddle => TPAMean - SortATPAByMiddle => SortATPAByMean - SortATPAByMiddleEx => SortATPAByMeanEx - Huge performance improvements for StrToTIA - TIAMean now throws an exception when an empty array is passed Removed: - procedure TPASort(var TPA: TPointArray); (alias: SortTPA) - procedure TPASortEx(var TPA: TPointArray; const Point: TPoint); (alias: SortTPAEx) - function AMax(const TIA: TIntArray): Integer; (alias: TIAMax) - function AMin(const TIA: TIntArray): Integer; (alias: TIAMin) - function TPAMiddleEx(const TPA: TPointArray; out x, y: Integer): Boolean; - procedure BubbleSort(var Values: TIntArray); - procedure BubbleSortB(var Values: TIntArray); - procedure QuickSort(var Values: TIntArray); - function Average(const Values: TExtArray): Extended; (alias: TEAMean) Enjoy ~Freddy
-
I bet you didn't see this coming? Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: New: - procedure ReplaceColors(const Bmp: TSCARBitmap; const Colors: TIntArray; const NewColor: Integer); - procedure ReplaceColorsTol(const Bmp: TSCARBitmap; const Colors: TIntArray; const NewColor, Tol: Integer); - function RandomTIA(const Count, Range: Integer): TIntArray; - function RandomTIAEx(const Count, Range: Integer; const AllowDuplicates: Boolean): TIntArray; - procedure OffsetTEA(var TEA: TExtArray; const Offset: Extended); - function TEAInsert(var TEA: TExtArray; const Index: Integer; const Ext: Extended): Integer; - function InvertColor(const Color: Integer): Integer; - TSCARBitmap.Invert - function SpiralPoint(const Pos: Cardinal): TPoint; - function SpiralPointEx(const Pos: Cardinal; const Origin: TPoint): TPoint; - function SpiralPos(const Pt: TPoint): Cardinal; - function SpiralPosEx(const Pt, Origin: TPoint): Cardinal; - procedure SortTPASpiral(var TPA: TPointArray); - procedure SortTPASpiralEx(var TPA: TPointArray; const Point: TPoint); - function CopyTIA(const TIA: TIntArray): TIntArray; - function CopyTIAEx(const TIA: TIntArray; const Index, Count: Integer): TIntArray; - function ATPADelete(var ATPA: T2DPointArray; const Index: Integer): TPointArray; - function ATIADelete(var ATIA: T2DIntArray; const Index: Integer): TIntArray; - function ATPAContains(const ATPA: T2DPointArray; const TPA: TPointArray): Boolean; - function ATIAContains(const ATIA: T2DIntArray; const TIA: TIntArray): Boolean; - function PermuteTPA(const TPA: TPointArray): T2DPointArray; - function PermuteTIA(const TIA: TIntArray): T2DIntArray; - procedure TIAFreq(const TIA: TIntArray; out Values, Frequencies: TIntArray); - procedure TIARelFreq(const TIA: TIntArray; out Values: TIntArray; out Frequencies: TExtArray); - procedure TPAFreq(const TPA: TPointArray; out Values: TPointArray; out Frequencies: TIntArray); - procedure TPARelFreq(const TPA: TPointArray; out Values: TPointArray; out Frequencies: TExtArray); Tweaks: - TPAMiddle => TPAMean - SortATPAByMiddle => SortATPAByMean - SortATPAByMiddleEx => SortATPAByMeanEx Removed: - procedure TPASort(var TPA: TPointArray); (alias: SortTPA) - procedure TPASortEx(var TPA: TPointArray; const Point: TPoint); (alias: SortTPAEx) - function AMax(const TIA: TIntArray): Integer; (alias: TIAMax) - function AMin(const TIA: TIntArray): Integer; (alias: TIAMin) - function TPAMiddleEx(const TPA: TPointArray; out x, y: Integer): Boolean; Enjoy ~Freddy
-
I've now uploaded the release candidate for SCAR Divi 3.37. This version got slightly out of hand, as it was supposed to be a small maintenance update with just a few new features? Instead it got huge. If there's any more issues with this build, please report them in Mantis before Saturday, the final version should be released then. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - [#127] Double clicking on a form element in the form designer will no longer assign an event internally - [#136] SCAR process sometimes did not terminate - Some selection features in color tools did not work properly - Dragging color tools items from/to stored colors sometimes lagged or froze SCAR - Small memory leak when loading png images - [#133] The new FindColor(s)SpiralTol(Ex) and FindColor(s)TPATol(Ex) functions did not return the correct results - [#139] Menu in DTM editor was detachable - GetCurrentKeyState and GetToggleKeyState did not function correctly for TSCARWindowClient - [#142] Some system colors were imported incorrectly - [#143] Several dialog functions were malfunctioning - TSCARBitmap.DC changed when TSCARBitmap.Flip() ot TSCARBitmap.Rotate() were called - TSCARBitmap.LoadFromStr set the entire bitmap to transparant - Error in firewall config when adding a rule - Picked colors were added in reverse to the list New: - Rename button in color tools rightclick menu - procedure TPAEdge(var TPA: TPointArray); - Capture Client button in DTM editor Edit menu - TTPAArtifacts = set of (taXAxis, taYAxis) - function BmpFromTPA(const TPA: TPointArray; const FgCol, BgCol: Integer): TSCARBitmap; - function BmpFromTPAEx(const TPA: TPointArray; const FgCol, BgCol, AfCol: Integer; const Scale: Single; const Artifacts: TTPAArtifacts): TSCARBitmap; - function TSCARBitmap.GetPixels(const TPA: TPointArray): TIntArray; - procedure TSCARBitmap.SetPixels(const TPA: TPointArray; const Color: Integer); - procedure TSCARBitmap.Skew(const Horiz, Vert: Single); - function LibsPath: string; - function ScriptsPath: string; - procedure TSCARBitmap.RotateEx(const Angle: Extended; const Resize: Boolean); - procedure TSCARBitmap.SkewEx(const Horiz, Vert: Single; const Resize: Boolean); - function StrToPoint(const Str: string): TPoint; - function StrToPointDef(const Str: string; const Default: TPoint): TPoint; - function PointToStr(const Point: TPoint): string; - function StrToBox(const Str: string): TBox; - function StrToBoxDef(const Str: string; const Default: TBox): TBox; - procedure ExpandBox(var Box: TBox; const SizeChange: Integer); - procedure OffsetBox(var Box: TBox; const XOffset, YOffset: Integer); - function TPAEquals(const TPA1, TPA2: TPointArray): Boolean; - function TIAEquals(const TIA1, TIA2: TIntArray): Boolean; - function TEAEquals(const TEA1, TEA2: TExtArray): Boolean; - Added all DateUtils routines: http://docwiki.embarcadero.com/Libraries/XE2/en/System.DateUtils#Routines - function BoxCenter(const Box: TBox): TPoint; - procedure TPADistToPoint(const TPA: TPointArray; const Point: TPoint; out MinDist, MaxDist: Extended); - procedure TPADistToPointEx(const TPA: TPointArray; const Point: TPoint; out MinDist, MaxDist: Extended; out MinPoint, MaxPoint: TPoint); - Option to toggle template completion - TSCARWindowClient.Scancodes Tweaks: - TSCARBitmap's SaveToBmp, SaveToJpeg and SaveToPng now creates the target folder if it does not exist - It is now possible to ctrl+click to add an item to the selection in color tools - Huge performance improvements for all TPAFilterX and TPAExtractX functions - Huge performance improvements for TPAIntersect and TIAIntersect - CreateMessageDialog tied into resource manager for forms - Added thread-safety for CreateMessageDialog, MessageDlg, MessageDlgPos, TaskMessageDlg, TaskMessageDlgPos, ShowMessage, ShowMessageFmt, ShowMessagePos, InputBox and InputQuery - Removed the HelpCtx parameter from MessageDlg, MessageDlgPos, TaskMessageDlg and TaskMessageDlgPos - ImageBox/InputBox in Target Client renamed to ImageArea/InputArea for consistency - More accurate rotation algorithm for TSCARBitmap.Rotate() - The databox in the color picker is now wider to accommodate the large coordinates on modern screens - Moved color squares in the color picker's databox to the left to be consistent with the datapicker - Color picker magnifier now has red corners around the center pixel, the bitmap picker has been adjusted accordingly - The databox in the color picker now repositions around your cursor when it reaches the edges of the monitor your cursor is currently on - function Distance(const X1, Y1, X2, Y2: Integer): Extended; (now returns extended) - Editing the name of items in color tools is no longer possible through clicking - The delete key now allows you to delete items from color tools as well - You can now group colors (and groups) together into groups in the color tools Enjoy ~Freddy
-
Time for some Beta builds. Because 3.37 contains some very important bugfixes, I have decided to push the release forward to this month, rather than releasing a minor bugfix build for 3.36. I will be adding some additional functionality into the color tools and some new TPA related functions before the RC hits. For now, I'd recommend using this build over 3.36. The final version of this will be released in 2 weeks tops. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - [#127] Double clicking on a form element in the form designer will no longer assign an event internally - [#136] SCAR process sometimes did not terminate - Some selection features in color tools did not work properly - Dragging color tools items from/to stored colors sometimes lagged or froze SCAR - Small memory leak when loading png images - [#133] The new FindColor(s)SpiralTol(Ex) and FindColor(s)TPATol(Ex) functions did not return the correct results - [#139] Menu in DTM editor was detachable - GetCurrentKeyState and GetToggleKeyState did not function correctly for TSCARWindowClient - [#142] Some system colors were imported incorrectly - [#143] Several dialog functions were malfunctioning - TSCARBitmap.DC changed when TSCARBitmap.Flip() ot TSCARBitmap.Rotate() were called - TSCARBitmap.LoadFromStr set the entire bitmap to transparant - Error in firewall config when adding a rule New: - Rename button in color tools rightclick menu - procedure TPAEdge(var TPA: TPointArray); - Capture Client button in DTM editor Edit menu - TTPAArtifacts = set of (taXAxis, taYAxis) - function BmpFromTPA(const TPA: TPointArray; const FgCol, BgCol: Integer): TSCARBitmap; - function BmpFromTPAEx(const TPA: TPointArray; const FgCol, BgCol, AfCol: Integer; const Scale: Single; const Artifacts: TTPAArtifacts): TSCARBitmap; - function TSCARBitmap.GetPixels(const TPA: TPointArray): TIntArray; - procedure TSCARBitmap.SetPixels(const TPA: TPointArray; const Color: Integer); - procedure TSCARBitmap.Skew(const Horiz, Vert: Single); - function LibsPath: string; - function ScriptsPath: string; - procedure TSCARBitmap.RotateEx(const Angle: Extended; const Resize: Boolean); - procedure TSCARBitmap.SkewEx(const Horiz, Vert: Single; const Resize: Boolean); - function StrToPoint(const Str: string): TPoint; - function StrToPointDef(const Str: string; const Default: TPoint): TPoint; - function PointToStr(const Point: TPoint): string; - function StrToBox(const Str: string): TBox; - function StrToBoxDef(const Str: string; const Default: TBox): TBox; - procedure ExpandBox(var Box: TBox; const SizeChange: Integer); - procedure OffsetBox(var Box: TBox; const XOffset, YOffset: Integer); - function TPAEquals(const TPA1, TPA2: TPointArray): Boolean; - function TIAEquals(const TIA1, TIA2: TIntArray): Boolean; - function TEAEquals(const TEA1, TEA2: TExtArray): Boolean; - Added all DateUtils routines: http://docwiki.embarcadero.com/Libraries/XE2/en/System.DateUtils#Routines - function BoxCenter(const Box: TBox): TPoint; - procedure TPADistToPoint(const TPA: TPointArray; const Point: TPoint; out MinDist, MaxDist: Extended); - procedure TPADistToPointEx(const TPA: TPointArray; const Point: TPoint; out MinDist, MaxDist: Extended; out MinPoint, MaxPoint: TPoint); - Option to toggle template completion Tweaks: - TSCARBitmap's SaveToBmp, SaveToJpeg and SaveToPng now creates the target folder if it does not exist - It is now possible to ctrl+click to add an item to the selection in color tools - Huge performance improvements for all TPAFilterX and TPAExtractX functions - Huge performance improvements for TPAIntersect and TIAIntersect - CreateMessageDialog tied into resource manager for forms - Added thread-safety for CreateMessageDialog, MessageDlg, MessageDlgPos, TaskMessageDlg, TaskMessageDlgPos, ShowMessage, ShowMessageFmt, ShowMessagePos, InputBox and InputQuery - Removed the HelpCtx parameter from MessageDlg, MessageDlgPos, TaskMessageDlg and TaskMessageDlgPos - ImageBox/InputBox in Target Client renamed to ImageArea/InputArea for consistency - More accurate rotation algorithm for TSCARBitmap.Rotate() - The databox in the color picker is now wider to accommodate the large coordinates on modern screens - Moved color squares in the color picker's databox to the left to be consistent with the datapicker - Color picker magnifier now has red corners around the center pixel, the bitmap picker has been adjusted accordingly - The databox in the color picker now repositions around your cursor when it reaches the edges of the monitor your cursor is currently on - function Distance(const X1, Y1, X2, Y2: Integer): Extended; (now returns extended) - Editing the name of items in color tools is no longer possible through clicking - The delete key now allows you to delete items from color tools as well - You can now group colors (and groups) together into groups in the color tools Enjoy ~Freddy
-
The first alpha version of SCAR Divi 3.37 is now available, it currently offers little changes, but I wanted to share the changes so far anyway. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - [#127] Double clicking on a form element in the form designer will no longer assign an event internally - [#136] SCAR process sometimes did not terminate - Some selection features in color tools did not work properly - Dragging color tools items from/to stored colors sometimes lagged or froze SCAR New: - Rename button in color tools rightclick menu Tweaks: - TSCARBitmap's SaveToBmp, SaveToJpeg and SaveToPng now creates the target folder if it does not exist - It is now possible to ctrl+click to add an item to the selection in color tools Enjoy ~Freddy
-
With this RC release of SCAR Divi 3.36, there will be no more additions to the code other than bugfixes before the final release on tuesday/wednesday. Currently the new color tools still misbehave on occasion, but this should be resolved before the final release. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - The TEA functions were cut out of the engine - InputQuery threw an access violation - [#120] Some specific functions did not show up in the function list New: - function FindColorsTPA(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray): Boolean; - function FindColorsTPATol(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean; - function FindColorsTPAEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray): Boolean; - function FindColorsTPATolEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean; - function GetActiveWindow: Hwnd; - procedure InvertTPA(var TPA: TPointArray); - function Odd(const Value: Int64): Boolean; - function Even(const Value: Int64): Boolean; - Color Tools with the ability to store colors, name them and more... (Replaces color history) Improvements: - procedure MoveMouseEx(const X, Y, MouseSpeed: Integer); - InvertTPA => ReverseTPA - InvertTIA => ReverseTIA - InvertATPA => ReverseATPA - Default mousespeed changed from 25 to 20 - Huge performance improvements for TPAUnique, TPAFilterPoints, TPAInTPA, TIAUnique, TIAInTIA, TEAUnique and TEAInTEA - Tweaked ReverseTPA, ReverseATPA and ReverseTIA - Holding Ctrl while picking a color lets you pick another one - You can now change the order of open script tabs by dragging them Enjoy ~Freddy
-
Finally, the Beta version of SCAR Divi 3.36. If the scheduled include system is not ready in time, this version will be released without the new include system, which would be pushed to 3.37. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - The TEA functions were cut out of the engine New: - function FindColorsTPA(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray): Boolean; - function FindColorsTPATol(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean; - function FindColorsTPAEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray): Boolean; - function FindColorsTPATolEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean; - function GetActiveWindow: Hwnd; - procedure InvertTPA(var TPA: TPointArray); - function Odd(const Value: Int64): Boolean; - function Even(const Value: Int64): Boolean; Improvements: - procedure MoveMouseEx(const X, Y, MouseSpeed: Integer); - InvertTPA => ReverseTPA - InvertTIA => ReverseTIA - InvertATPA => ReverseATPA - Default mousespeed changed from 25 to 20 - Huge performance improvements for TPAUnique, TPAFilterPoints, TPAInTPA, TIAUnique, TIAInTIA, TEAUnique and TEAInTEA - Tweaked ReverseTPA, ReverseATPA and ReverseTIA Enjoy ~Freddy
-
The first alpha version of SCAR Divi 3.36 is now available, currently only some new functions. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: New: - function FindColorsTPA(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray): Boolean; - function FindColorsTPATol(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean; - function FindColorsTPAEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray): Boolean; - function FindColorsTPATolEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean; - function GetActiveWindow: Hwnd; - procedure InvertTPA(var TPA: TPointArray); Improvements: - procedure MoveMouseEx(const X, Y, MouseSpeed: Integer); - InvertTPA => ReverseTPA - InvertTIA => ReverseTIA - Default mousespeed changed from 25 to 20 Enjoy ~Freddy
-
With the RC build of SCAR Divi 3.35, only bugfixes will be added after this point. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - The study modifier wasn't implemented correctly in the preg functions - Picture to string tool sometimes shrunk a pasted bitmap New: - function BoxToStr(const Box: TBox): string; - RESOURCE_MANAGEMENT preprocessor option (can only disable resourcemanagement for TSCARObject subclasses) - TSCARClient = class(TSCARObject); - TSCARWindowClient = class(TSCARClient); - function GetClient: TSCARClient; - function SetClient(const Client: TSCARClient): TSCARClient; - procedure KeyDown(const Key: Char); - procedure KeyUp(const Key: Char); - procedure MoveMouseExpert(const X, Y, Gravity, Wind, MinWait, MaxWait, MaxStep, TargetArea: Extended); - procedure MoveMouseEx(const X, Y, RX, RY, MouseSpeed: Integer); - procedure MoveMouse(const X, Y: Integer); {MouseSpeed = 25} - procedure ClickMouseEx(const X, Y: Integer; const Btn: TMouseButton; const Interval: Integer); - procedure MoveMouseBox(const Box: TBox); - procedure MoveMouseBoxEx(const Box: TBox; const MouseSpeed: Integer); - procedure PressVKey(const VKey: Byte); - procedure PressVKeyEx(const VKey: Byte; const Interval: Integer); - procedure PressKey(const Key: Char); - procedure PressKeyEx(const Key: Char; const Interval: Integer); - procedure TypeTextEx(const Str: string; const UseNumpad, UseDelays: Boolean); - procedure TypeText(const Str: string); - VK_XBUTTON1, VK_XBUTTON2, VK_CAPITAL, VK_KANA, VK_HANGUL, VK_JUNJA, VK_FINAL, VK_HANJA, VK_KANJI, VK_CONVERT - VK_NONCONVERT, VK_ACCEPT, VK_MODECHANGE, VK_LWIN, VK_RWIN, VK_APPS, VK_SLEEP, VK_NUMPAD0-VK_NUMPAD9 - VK_F13-VK_F24, VK_NUMLOCK, VK_SCROLL, VK_LSHIFT, VK_RSHIFT, VK_LCONTROL, VK_RCONTROL, VK_LMENU, VK_RMENU - VK_BROWSER_BACK, VK_BROWSER_FORWARD, VK_BROWSER_REFRESH, VK_BROWSER_STOP, VK_BROWSER_SEARCH, VK_BROWSER_FAVORITES - VK_BROWSER_HOME, VK_VOLUME_MUTE, VK_VOLUME_DOWN, VK_VOLUME_UP, VK_MEDIA_NEXT_TRACK, VK_MEDIA_PREV_TRACK - VK_MEDIA_STOP, VK_MEDIA_PLAY_PAUSE, VK_LAUNCH_MAIL, VK_LAUNCH_MEDIA_SELECT, VK_LAUNCH_APP1, VK_LAUNCH_APP2 - function GetKeyState(const VKey: Byte): Boolean; - function GetCurrentKeyState(const VKey: Byte): Boolean; - function GetToggleKeyState(const VKey: Byte): Boolean; - function FindColors(out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsTol(out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsEx(out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsTolEx(out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsSpiral(const SX, SY: Integer; out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsSpiralTol(const SX, SY: Integer; out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsSpiralEx(const SX, SY: Integer; out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsSpiralTolEx(const SX, SY: Integer; out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function CountColors(const Colors: TIntArray; const XS, YS, XE, YE: Integer): Integer; - function CountColorsTol(const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Integer; - TSCARBitmap = class(TSCARObject); - procedure FloodFill(const Bmp: TSCARBitmap; const X, Y, Color: Integer); - procedure FloodFillTol(const Bmp: TSCARBitmap; const X, Y, Color, Tol: Integer); - function FloodFillEx(const Bmp: TSCARBitmap; const X, Y: Integer): TPointArray; - function FloodFillTolEx(const Bmp: TSCARBitmap; const X, Y, Tol: Integer): TPointArray; - procedure TPAFilterTriangle(var TPA: TPointArray; const X1, Y1, X2, Y2, X3, Y3: Integer); - procedure TPAExtractTriangle(var TPA: TPointArray; const X1, Y1, X2, Y2, X3, Y3: Integer); - function TPAFromCircle(const Center: TPoint; const Radius: Integer): TPointArray; - function TPAFromTriangle(const X1, Y1, X2, Y2, X3, Y3: Integer): TPointArray; - function FindColorTPA(out X, Y: Integer; const Color: Integer; const TPA: TPointArray): Boolean; - function FindColorTPATol(out X, Y: Integer; const Color: Integer; const TPA: TPointArray; const Tol: Integer): Boolean; - function FindColorTPAEx(out Points: TPointArray; const Color: Integer; const TPA: TPointArray): Boolean; - function FindColorTPATolEx(out Points: TPointArray; const Color: Integer; const TPA: TPointArray; const Tol: Integer): Boolean; - function GetMouseBtnState(const Btn: TMouseButton): Boolean; - function GetDesktopWindow: Hwnd; - function GetShellWindow: Hwnd; - function FindWindows(const Title: string): THwndArray; - function FindWindowsEx(const ParentWnd: Hwnd; const Title, ClassName: string; const RecursiveSearch, CaseSensitive, PartialMatch: Boolean): THwndArray; - function FindWindowsPreg(const ParentWnd: Hwnd; const TitlePattern, ClassNamePattern: string; const RecursiveSearch: Boolean): THwndArray; - function GetParentWindow(const Wnd: Hwnd): Hwnd; - function WrapText(const Str: string; const MaxColumnSize: Integer): string; - function GetWindowBoxEx(const Wnd: Hwnd; const ClientArea: Boolean): TBox; - function GetWindowBox(const Wnd: Hwnd): TBox; - function GetWindowText(const Wnd: Hwnd): string; - function GetWindowClass(const Wnd: Hwnd): string; - procedure GetBoxSize(const Box: TBox; out Width, Height: Integer); - procedure SetWindowText(const Wnd: Hwnd; const Text: string); - function GetOuterWindow(const Wnd: Hwnd): Hwnd; - function IsWindowTopMost(const Wnd: Hwnd): Boolean; - function IsWindowValid(const Wnd: Hwnd): Boolean; - function FindWindowsBySize(const ParentWnd: Hwnd; const Width, Height: Integer; const RecursiveSearch: Boolean): THwndArray; - procedure SetWindowBox(const Wnd: Hwnd; const Box: TBox); - procedure GetWindowSizeEx(const Wnd: Hwnd; out Width, Height: Integer; const ClientArea: Boolean); - procedure GetWindowSize(const Wnd: Hwnd; out Width, Height: Integer); - procedure SetWindowSize(const Wnd: Hwnd; const Width, Height: Integer); - procedure ActivateWindow(const Wnd: Hwnd); - TSCARBitmapClient = class(TSCARClient) - function WrapTextEx(const Str, BreakStr, BreakChars: string; MaxColumnSize: Integer): string; - TCharArray = array of Char; - T2DCharArray = array of TCharArray; - Target Client panel - Added support for type 2 Simba library architecture (function exports only) - New library architecture Tweaks: - procedure MouseBtnDown(const X, Y: Integer; const Btn: TMouseButton); - procedure MouseBtnUp(const X, Y: Integer; const Btn: TMouseButton); - procedure ClickMouse(const X, Y: Integer; const Btn: TMouseButton); - Renamed: * FindBitmapIn -> FindBitmap * FindBitmapToleranceIn -> FindBitmapTol * HoldMouse -> MouseBtnDown * ReleaseMouse -> MouseBtnUp * KeyDown -> VKeyDown * KeyUp -> VKeyUp * GetKeyCode -> CharToVKey * MoveMouse -> SetMousePos * FindColorTolerance -> FindColorTol * FindColors -> FindColorEx * FindColorsTolerance -> FindColorTolEx * FindColorSpiralTolerance -> FindColorSpiralTol * FindColorsSpiralTolerance -> FindColorSpiralTolEx * FindColorsSpiral -> FindColorSpiralEx * CountColorTolerance -> CountColorTol * BitmapFromString -> BmpFromStrLegacy * MakeWindowTransparent -> SetWindowTransp * SetOnTop -> SetWindowTopMost * FastReplaceColor -> ReplaceColor * FastReplaceColorTolerance -> ReplaceColorTol * FindBitmaps -> FindBitmapEx * FindBitmapsTolerance -> FindBitmapTolEx * CountBitmapTolerance -> CountBitmapTol * TBooleanArray -> TBoolArray * T2DBooleanArray -> T2DBoolArray * T2DExtendedArray -> T2DExtArray * T2DStringArray -> T2DStrArray - Performance tweak for GetCursorType - function FindColorSpiral(const SX, SY: Integer; out X, Y: Integer; const Color, XS, YS, XE, YE: Integer): Boolean; - function FindColorSpiralTol(const SX, SY: Integer; out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer): Boolean; - function FindBitmap(out X, Y: Integer; const Bmp: TSCARBitmap; const XS, YS, XE, YE: Integer): Boolean; - function FindBitmapTol(out X, Y: Integer; const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Boolean; - procedure DebugBitmap(const Bmp: TSCARBitmap); - procedure SafeDrawBitmap(const Source: TSCARBitmap; const Dest: TCanvas; const X, Y: Integer); - function FindDeformedBitmapToleranceRotationIn(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; var accuracy: Extended; AngleIntervals: Extended; StartAngle, MaxAngle: Extended; var angle: Extended): Boolean; - function FindDeformedBitmapToleranceIn(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean; - function FindBitmapRotated(const Bmp: TSCARBitmap; var x, y, Angle: Integer; x1, y1, x2, y2: Integer): Boolean; - function FindBitmapSpiral(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean; - function FindBitmapSpiralTolerance(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance: Integer): Boolean; - function CreateBitmapMaskFromText(Text: AnsiString; Chars: Integer): TSCARBitmap; - function CreateBitmapFromText(Text: AnsiString; Chars: Integer; TextColor: Integer): TSCARBitmap; - function FindBitmapMaskTolerance(const Mask: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance, ContourTolerance: Integer): Boolean; - procedure ReplaceColor(const Bmp: TSCARBitmap; const Color, NewColor: Integer); - procedure ReplaceColorTol(const Bmp: TSCARBitmap; const Color, NewColor, Tol: Integer); - function FindBitmapEx(out Points: TPointArray; const Bmp: TSCARBitmap; const XS, YS, XE, YE: Integer): Boolean; - function FindBitmapTolEx(out Points: TPointArray; const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Boolean; - function SimilarBitmaps(const Bmp1, Bmp2: TSCARBitmap; const Tol: Integer): Boolean; - function SimilarBitmapsEx(const Bmp1, Bmp2: TSCARBitmap; const Tol: Integer; out Diff: TPointArray): Boolean; - function CountBitmap(const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Integer; - function CountBitmapTol(const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Integer; Removed: - procedure ClearDebugLine(const Line: Integer); - procedure DeleteDebugLine(const Line: Integer); - function GetDebugLineCount: Integer; - function GetDebugLine(const Line: Integer): AnsiString; - procedure ReplaceDebugLine(const Line: Integer; const Str: AnsiString); - function GetDebugText: AnsiString; - procedure GetClientDimensions(out Width, Height: Integer); - function GetClientWindowHandle: Hwnd; - procedure SetClientWindowHandle(const H: Hwnd); - function GetTargetDC: HDC; - procedure SetTargetDC(const DC: HDC); - procedure ResetDC; - procedure SetDesktopAsClient; - procedure ClickMouseMid(x, y: Integer); - procedure HoldMouseMid(x, y: Integer); - procedure ReleaseMouseMid(x, y: Integer); - function FindBitmap(Bitmap: Integer; var x, y: Integer): Boolean; - function FindBitmapTolerance(Bitmap: Integer; var x, y: Integer; Tolerance: Integer): Boolean; - procedure SendKeysVB(const Str: AnsiString; const Wait: Boolean); - procedure SendArrow(const Key: Byte); - procedure SendArrowWait(const Key: Byte; const WaitTime: Integer); - procedure MoveMouseCC(x, y, range, segments, pcount, delay: Integer); - procedure MoveMouseSmoothFrom(x1, y1, x2, y2: Integer); - procedure MoveMouseSmoothFromEx(x1, y1, x2, y2: Integer; minsleeptime, maxsleeptime, maxdistance, gravity, forces: Integer); - procedure MoveMouseSmoothEx(const X, Y, MinSleepTime, MaxSleepTime, MaxDistance, Gravity, Forces: Integer); - procedure MoveMouseSmooth(const X, Y: Integer); - procedure ClickWindMouse(X, Y, rx, ry: Integer; Btn: TMouseButton); - procedure ClickMouseBox(x1, y1, x2, y2: Integer; Btn: TMouseButton); - procedure MouseBox(x1, y1, x2, y2: Integer); - procedure SendKeys(const Str: AnsiString); - procedure TypeKeys(const Str: AnsiString); - procedure SendKeysWait(const Str: AnsiString; const WaitTime, RndTime: Integer); - function IsNumpadEnabled: Boolean; - function IsCapsLockEnabled: Boolean; - function IsArrowDown(const Num: Byte): Boolean; - function IsNumpadKeyDown(const Key: Byte): Boolean; - TMusic - function CreateMusicPlayer: TMusic; - function FreeMusicPlayer(const Player: TMusic): Boolean; - function FindColorSpiral2(var X, Y: Integer; const Color, XS, YS, XE, YE: Integer): Boolean; - function GetBitmapDC(const Bmp: Integer): HDC; - function BitmapAssigned(const iBmp: Integer): Boolean; - function CreateBitmap(const Width, Height, Color: Integer): Integer; - procedure GetBitmapSize(const Bmp: Integer; out Width, Height: Integer); - function BitmapToString(Bmp: Integer): AnsiString; - 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 FreeBitmap(const Bmp: Integer): Boolean; - function CreateMirroredBitmap(const Bmp: Integer): Integer; - function ResizeBitmap(const Bmp, Width, Height: Integer): Integer; - function FindColorCircle(out X, Y: Integer; const Color, CX, CY, R: Integer): Boolean; - function FindColorCircleTolerance(out X, Y: Integer; const Color, CX, CY, R, Tol: Integer): Boolean; - function FindColorTriangle(out X, Y: Integer; const Color, X1, Y1, X2, Y2, X3, Y3: Integer): Boolean; - function FindColorTriangleTolerance(out X, Y: Integer; const Color, X1, Y1, X2, Y2, X3, Y3, Tol: Integer): Boolean; - function FindColorSkipCoords(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const TPA: TPointArray): Boolean; - function FindColorSkipCoordsTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const TPA: TPointArray): Boolean; - function FindColorSkipBox(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const Box: TBox): Boolean; - function FindColorSkipBoxTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const Box: TBox): Boolean; - function FindColorSkipBoxArray(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const TBA: TBoxArray): Boolean; - function FindColorSkipBoxArrayTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const TBA: TBoxArray): Boolean; - function IsMouseButtonDown(LeftButton: Boolean): Boolean; - function IsFunctionKeyDown(Key: Byte): Boolean; - function IsFKeyDown(Num: Byte): Boolean; - function IsKeyDown(C: Char): Boolean; - function GetBitmapCanvas(bitmap: Integer): TCanvas; - function LoadBitmap(path: AnsiString): Integer; - procedure SaveBitmap(bitmap: Integer; path: AnsiString); - function GetBitmapCanvas(bitmap: Integer): TCanvas; - function RegexPos(const Subject, Pattern: AnsiString): Integer; - function FindRegex(const Subject, Pattern: AnsiString): AnsiString; - function ReplaceRegex(const Subject, Pattern, Replacement: AnsiString): AnsiString; - function FindWindowTitlePart(Title: AnsiString; CaseSensitive: Boolean): Boolean; - function TBitmapFromBmp(Bitmap: TBitmap; Bmp: Integer): Boolean; - function GetBitmapAreaColors(xs, ys, xe, ye: Integer): T2DIntArray; - procedure CopyClientToBitmap(bitmap: Integer; xs, ys, xe, ye: Integer); - function FastGetPixel(const Bmp, x, y: Integer): Integer; - procedure FastSetPixel(const Bmp, x, y, Color: Integer); - procedure FastDrawClear(bitmap: Integer; Color: TColor); - procedure SetTargetBitmap(bitmap: Integer); - function RotateBitmap(bitmap: Integer; angle: Extended): Integer; - procedure SetWindowText(const Wnd: Hwnd; const Text: string); - function FindTransparentBitmaps(Bitmap: Integer; var Points: TPointArray; TranspCol, xs, ys, xe, ye: Integer): Boolean; - function FindTransparentBitmapsTolerance(Bitmap: Integer; var Points: TPointArray; TranspCol, xs, ys, xe, ye, Tol: Integer): Boolean; - procedure FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer); - procedure FastDrawSizeTransparent(x1, y1, x2, y2: Integer; sourcebitmap, targetbitmap: Integer); - procedure SetBitmapFastDrawTarget(bitmap: Integer); - procedure SetTransparentColor(bitmap, color: Integer); - procedure SetTransparencyFromBitmap(Bitmap, AlphaMaskBitmap: Integer); - function CountTransparentBitmap(Bitmap: Integer; TranspCol, xs, ys, xe, ye: Integer): Integer; - function CountTransparentBitmapTolerance(Bitmap: Integer; TranspCol, xs, ys, xe, ye, Tol: Integer): Integer; - function FindWindowBySize(Width, Height: Integer): Boolean; - TIntegerArray (alias) - T2DIntegerArray (alias) - TExtendedArray (alias) - TStringArray (alias) - function MiddleTPA(const TPA: TPointArray): TPoint; (alias) - function MiddleTPAEx(const TPA: TPointArray; out x, y: Integer): Boolean; (alias) - procedure TPARemoveDupl(var TPA: TPointArray); (alias) - function GetTPABounds(const TPA: TPointArray): TBox; (alias) - procedure TPAInvert(var TPA: TPointArray); (alias) - function TPACombine(const TPA1, TPA2: TPointArray): TPointArray; (alias) - function TPARandom(const Count, XRange, YRange: Integer): TPointArray; (alias) - procedure TPARemovePointEx(var TPA: TPointArray; const Point: TPoint; const All: Boolean); (alias) - procedure TPARemovePoint(var TPA: TPointArray; const Point: TPoint); (alias) - function TPAChain(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAChainEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) - procedure ATPASortBySize(var ATPA: T2DPointArray); (alias) - function GroupTPA(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAToATPA(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAGroupEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) - function TPAToATPAEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) Enjoy ~Freddy
-
Everything I wanted to get done for this version has been implemented. There's also been tons of bugfixes since Alpha. There's a new panel in the main GUI (Target Client), if you've used SCAR previously, you will need to go into "C:\Users\[YourName]\AppData\Local\SCAR Divi\" and remove the docking settings file, or it will NOT show up. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - The study modifier wasn't implemented correctly in the preg functions - Picture to string tool sometimes shrunk a pasted bitmap New: - function BoxToStr(const Box: TBox): string; - RESOURCE_MANAGEMENT preprocessor option (can only disable resourcemanagement for TSCARObject subclasses) - TSCARClient = class(TSCARObject); - TSCARWindowClient = class(TSCARClient); - function GetClient: TSCARClient; - function SetClient(const Client: TSCARClient): TSCARClient; - procedure KeyDown(const Key: Char); - procedure KeyUp(const Key: Char); - procedure MoveMouseExpert(const X, Y, Gravity, Wind, MinWait, MaxWait, MaxStep, TargetArea: Extended); - procedure MoveMouseEx(const X, Y, RX, RY, MouseSpeed: Integer); - procedure MoveMouse(const X, Y: Integer); {MouseSpeed = 25} - procedure ClickMouseEx(const X, Y: Integer; const Btn: TMouseButton; const Interval: Integer); - procedure MoveMouseBox(const X1, Y1, X2, Y2: Integer); - procedure MoveMouseBoxEx(const X1, Y1, X2, Y2, MouseSpeed: Integer); - procedure PressVKey(const VKey: Byte); - procedure PressVKeyEx(const VKey: Byte; const Interval: Integer); - procedure PressKey(const Key: Char); - procedure PressKeyEx(const Key: Char; const Interval: Integer); - procedure TypeTextEx(const Str: string; const UseNumpad, UseDelays: Boolean); - procedure TypeText(const Str: string); - VK_XBUTTON1, VK_XBUTTON2, VK_CAPITAL, VK_KANA, VK_HANGUL, VK_JUNJA, VK_FINAL, VK_HANJA, VK_KANJI, VK_CONVERT - VK_NONCONVERT, VK_ACCEPT, VK_MODECHANGE, VK_LWIN, VK_RWIN, VK_APPS, VK_SLEEP, VK_NUMPAD0-VK_NUMPAD9 - VK_F13-VK_F24, VK_NUMLOCK, VK_SCROLL, VK_LSHIFT, VK_RSHIFT, VK_LCONTROL, VK_RCONTROL, VK_LMENU, VK_RMENU - VK_BROWSER_BACK, VK_BROWSER_FORWARD, VK_BROWSER_REFRESH, VK_BROWSER_STOP, VK_BROWSER_SEARCH, VK_BROWSER_FAVORITES - VK_BROWSER_HOME, VK_VOLUME_MUTE, VK_VOLUME_DOWN, VK_VOLUME_UP, VK_MEDIA_NEXT_TRACK, VK_MEDIA_PREV_TRACK - VK_MEDIA_STOP, VK_MEDIA_PLAY_PAUSE, VK_LAUNCH_MAIL, VK_LAUNCH_MEDIA_SELECT, VK_LAUNCH_APP1, VK_LAUNCH_APP2 - function GetKeyState(const VKey: Byte): Boolean; - function GetCurrentKeyState(const VKey: Byte): Boolean; - function GetToggleKeyState(const VKey: Byte): Boolean; - function FindColors(out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsTol(out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsEx(out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsTolEx(out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsSpiral(const SX, SY: Integer; out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsSpiralTol(const SX, SY: Integer; out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsSpiralEx(const SX, SY: Integer; out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsSpiralTolEx(const SX, SY: Integer; out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function CountColors(const Colors: TIntArray; const XS, YS, XE, YE: Integer): Integer; - function CountColorsTol(const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Integer; - TSCARBitmap = class(TSCARObject); - procedure FloodFill(const Bmp: TSCARBitmap; const X, Y, Color: Integer); - procedure FloodFillTol(const Bmp: TSCARBitmap; const X, Y, Color, Tol: Integer); - function FloodFillEx(const Bmp: TSCARBitmap; const X, Y: Integer): TPointArray; - function FloodFillTolEx(const Bmp: TSCARBitmap; const X, Y, Tol: Integer): TPointArray; - procedure TPAFilterTriangle(var TPA: TPointArray; const X1, Y1, X2, Y2, X3, Y3: Integer); - procedure TPAExtractTriangle(var TPA: TPointArray; const X1, Y1, X2, Y2, X3, Y3: Integer); - function TPAFromCircle(const Center: TPoint; const Radius: Integer): TPointArray; - function TPAFromTriangle(const X1, Y1, X2, Y2, X3, Y3: Integer): TPointArray; - function FindColorTPA(out X, Y: Integer; const Color: Integer; const TPA: TPointArray): Boolean; - function FindColorTPATol(out X, Y: Integer; const Color: Integer; const TPA: TPointArray; const Tol: Integer): Boolean; - function FindColorTPAEx(out Points: TPointArray; const Color: Integer; const TPA: TPointArray): Boolean; - function FindColorTPATolEx(out Points: TPointArray; const Color: Integer; const TPA: TPointArray; const Tol: Integer): Boolean; - function GetMouseBtnState(const Btn: TMouseButton): Boolean; - function GetDesktopWindow: Hwnd; - function GetShellWindow: Hwnd; - function FindWindows(const Title: string): THwndArray; - function FindWindowsEx(const ParentWnd: Hwnd; const Title, ClassName: string; const RecursiveSearch, CaseSensitive, PartialMatch: Boolean): THwndArray; - function FindWindowsPreg(const ParentWnd: Hwnd; const TitlePattern, ClassNamePattern: string; const RecursiveSearch: Boolean): THwndArray; - function GetParentWindow(const Wnd: Hwnd): Hwnd; - function WrapText(const Str: string; const MaxColumnSize: Integer): string; - function GetWindowBoxEx(const Wnd: Hwnd; const ClientArea: Boolean): TBox; - function GetWindowBox(const Wnd: Hwnd): TBox; - function GetWindowText(const Wnd: Hwnd): string; - function GetWindowClass(const Wnd: Hwnd): string; - procedure GetBoxSize(const Box: TBox; out Width, Height: Integer); - procedure SetWindowText(const Wnd: Hwnd; const Text: string); - function GetOuterWindow(const Wnd: Hwnd): Hwnd; - function IsWindowTopMost(const Wnd: Hwnd): Boolean; - function IsWindowValid(const Wnd: Hwnd): Boolean; - function FindWindowsBySize(const ParentWnd: Hwnd; const Width, Height: Integer; const RecursiveSearch: Boolean): THwndArray; - procedure SetWindowBox(const Wnd: Hwnd; const Box: TBox); - procedure GetWindowSizeEx(const Wnd: Hwnd; out Width, Height: Integer; const ClientArea: Boolean); - procedure GetWindowSize(const Wnd: Hwnd; out Width, Height: Integer); - procedure SetWindowSize(const Wnd: Hwnd; const Width, Height: Integer); - procedure ActivateWindow(const Wnd: Hwnd); - TSCARBitmapClient = class(TSCARClient) - function WrapTextEx(const Str, BreakStr, BreakChars: string; MaxColumnSize: Integer): string; - TCharArray = array of Char; - T2DCharArray = array of TCharArray; - Target Client panel Tweaks: - procedure MouseBtnDown(const X, Y: Integer; const Btn: TMouseButton); - procedure MouseBtnUp(const X, Y: Integer; const Btn: TMouseButton); - procedure ClickMouse(const X, Y: Integer; const Btn: TMouseButton); - Renamed: * FindBitmapIn -> FindBitmap * FindBitmapToleranceIn -> FindBitmapTol * HoldMouse -> MouseBtnDown * ReleaseMouse -> MouseBtnUp * KeyDown -> VKeyDown * KeyUp -> VKeyUp * GetKeyCode -> CharToVKey * MoveMouse -> SetMousePos * FindColorTolerance -> FindColorTol * FindColors -> FindColorEx * FindColorsTolerance -> FindColorTolEx * FindColorSpiralTolerance -> FindColorSpiralTol * FindColorsSpiralTolerance -> FindColorSpiralTolEx * FindColorsSpiral -> FindColorSpiralEx * CountColorTolerance -> CountColorTol * BitmapFromString -> BmpFromStrLegacy * MakeWindowTransparent -> SetWindowTransp * SetOnTop -> SetWindowTopMost * FastReplaceColor -> ReplaceColor * FastReplaceColorTolerance -> ReplaceColorTol * FindBitmaps -> FindBitmapEx * FindBitmapsTolerance -> FindBitmapTolEx * CountBitmapTolerance -> CountBitmapTol * TBooleanArray -> TBoolArray * T2DBooleanArray -> T2DBoolArray * T2DExtendedArray -> T2DExtArray * T2DStringArray -> T2DStrArray - Performance tweak for GetCursorType - function FindColorSpiral(const SX, SY: Integer; out X, Y: Integer; const Color, XS, YS, XE, YE: Integer): Boolean; - function FindColorSpiralTol(const SX, SY: Integer; out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer): Boolean; - function FindBitmap(out X, Y: Integer; const Bmp: TSCARBitmap; const XS, YS, XE, YE: Integer): Boolean; - function FindBitmapTol(out X, Y: Integer; const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Boolean; - procedure DebugBitmap(const Bmp: TSCARBitmap); - procedure SafeDrawBitmap(const Source: TSCARBitmap; const Dest: TCanvas; const X, Y: Integer); - function FindDeformedBitmapToleranceRotationIn(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; var accuracy: Extended; AngleIntervals: Extended; StartAngle, MaxAngle: Extended; var angle: Extended): Boolean; - function FindDeformedBitmapToleranceIn(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean; - function FindBitmapRotated(const Bmp: TSCARBitmap; var x, y, Angle: Integer; x1, y1, x2, y2: Integer): Boolean; - function FindBitmapSpiral(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean; - function FindBitmapSpiralTolerance(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance: Integer): Boolean; - function CreateBitmapMaskFromText(Text: AnsiString; Chars: Integer): TSCARBitmap; - function CreateBitmapFromText(Text: AnsiString; Chars: Integer; TextColor: Integer): TSCARBitmap; - function FindBitmapMaskTolerance(const Mask: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance, ContourTolerance: Integer): Boolean; - procedure ReplaceColor(const Bmp: TSCARBitmap; const Color, NewColor: Integer); - procedure ReplaceColorTol(const Bmp: TSCARBitmap; const Color, NewColor, Tol: Integer); - function FindBitmapEx(out Points: TPointArray; const Bmp: TSCARBitmap; const XS, YS, XE, YE: Integer): Boolean; - function FindBitmapTolEx(out Points: TPointArray; const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Boolean; - function SimilarBitmaps(const Bmp1, Bmp2: TSCARBitmap; const Tol: Integer): Boolean; - function SimilarBitmapsEx(const Bmp1, Bmp2: TSCARBitmap; const Tol: Integer; out Diff: TPointArray): Boolean; - function CountBitmap(const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Integer; - function CountBitmapTol(const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Integer; Removed: - procedure ClearDebugLine(const Line: Integer); - procedure DeleteDebugLine(const Line: Integer); - function GetDebugLineCount: Integer; - function GetDebugLine(const Line: Integer): AnsiString; - procedure ReplaceDebugLine(const Line: Integer; const Str: AnsiString); - function GetDebugText: AnsiString; - procedure GetClientDimensions(out Width, Height: Integer); - function GetClientWindowHandle: Hwnd; - procedure SetClientWindowHandle(const H: Hwnd); - function GetTargetDC: HDC; - procedure SetTargetDC(const DC: HDC); - procedure ResetDC; - procedure SetDesktopAsClient; - procedure ClickMouseMid(x, y: Integer); - procedure HoldMouseMid(x, y: Integer); - procedure ReleaseMouseMid(x, y: Integer); - function FindBitmap(Bitmap: Integer; var x, y: Integer): Boolean; - function FindBitmapTolerance(Bitmap: Integer; var x, y: Integer; Tolerance: Integer): Boolean; - procedure SendKeysVB(const Str: AnsiString; const Wait: Boolean); - procedure SendArrow(const Key: Byte); - procedure SendArrowWait(const Key: Byte; const WaitTime: Integer); - procedure MoveMouseCC(x, y, range, segments, pcount, delay: Integer); - procedure MoveMouseSmoothFrom(x1, y1, x2, y2: Integer); - procedure MoveMouseSmoothFromEx(x1, y1, x2, y2: Integer; minsleeptime, maxsleeptime, maxdistance, gravity, forces: Integer); - procedure MoveMouseSmoothEx(const X, Y, MinSleepTime, MaxSleepTime, MaxDistance, Gravity, Forces: Integer); - procedure MoveMouseSmooth(const X, Y: Integer); - procedure ClickWindMouse(X, Y, rx, ry: Integer; Btn: TMouseButton); - procedure ClickMouseBox(x1, y1, x2, y2: Integer; Btn: TMouseButton); - procedure MouseBox(x1, y1, x2, y2: Integer); - procedure SendKeys(const Str: AnsiString); - procedure TypeKeys(const Str: AnsiString); - procedure SendKeysWait(const Str: AnsiString; const WaitTime, RndTime: Integer); - function IsNumpadEnabled: Boolean; - function IsCapsLockEnabled: Boolean; - function IsArrowDown(const Num: Byte): Boolean; - function IsNumpadKeyDown(const Key: Byte): Boolean; - TMusic - function CreateMusicPlayer: TMusic; - function FreeMusicPlayer(const Player: TMusic): Boolean; - function FindColorSpiral2(var X, Y: Integer; const Color, XS, YS, XE, YE: Integer): Boolean; - function GetBitmapDC(const Bmp: Integer): HDC; - function BitmapAssigned(const iBmp: Integer): Boolean; - function CreateBitmap(const Width, Height, Color: Integer): Integer; - procedure GetBitmapSize(const Bmp: Integer; out Width, Height: Integer); - function BitmapToString(Bmp: Integer): AnsiString; - 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 FreeBitmap(const Bmp: Integer): Boolean; - function CreateMirroredBitmap(const Bmp: Integer): Integer; - function ResizeBitmap(const Bmp, Width, Height: Integer): Integer; - function FindColorCircle(out X, Y: Integer; const Color, CX, CY, R: Integer): Boolean; - function FindColorCircleTolerance(out X, Y: Integer; const Color, CX, CY, R, Tol: Integer): Boolean; - function FindColorTriangle(out X, Y: Integer; const Color, X1, Y1, X2, Y2, X3, Y3: Integer): Boolean; - function FindColorTriangleTolerance(out X, Y: Integer; const Color, X1, Y1, X2, Y2, X3, Y3, Tol: Integer): Boolean; - function FindColorSkipCoords(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const TPA: TPointArray): Boolean; - function FindColorSkipCoordsTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const TPA: TPointArray): Boolean; - function FindColorSkipBox(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const Box: TBox): Boolean; - function FindColorSkipBoxTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const Box: TBox): Boolean; - function FindColorSkipBoxArray(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const TBA: TBoxArray): Boolean; - function FindColorSkipBoxArrayTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const TBA: TBoxArray): Boolean; - function IsMouseButtonDown(LeftButton: Boolean): Boolean; - function IsFunctionKeyDown(Key: Byte): Boolean; - function IsFKeyDown(Num: Byte): Boolean; - function IsKeyDown(C: Char): Boolean; - function GetBitmapCanvas(bitmap: Integer): TCanvas; - function LoadBitmap(path: AnsiString): Integer; - procedure SaveBitmap(bitmap: Integer; path: AnsiString); - function GetBitmapCanvas(bitmap: Integer): TCanvas; - function RegexPos(const Subject, Pattern: AnsiString): Integer; - function FindRegex(const Subject, Pattern: AnsiString): AnsiString; - function ReplaceRegex(const Subject, Pattern, Replacement: AnsiString): AnsiString; - function FindWindowTitlePart(Title: AnsiString; CaseSensitive: Boolean): Boolean; - function TBitmapFromBmp(Bitmap: TBitmap; Bmp: Integer): Boolean; - function GetBitmapAreaColors(xs, ys, xe, ye: Integer): T2DIntArray; - procedure CopyClientToBitmap(bitmap: Integer; xs, ys, xe, ye: Integer); - function FastGetPixel(const Bmp, x, y: Integer): Integer; - procedure FastSetPixel(const Bmp, x, y, Color: Integer); - procedure FastDrawClear(bitmap: Integer; Color: TColor); - procedure SetTargetBitmap(bitmap: Integer); - function RotateBitmap(bitmap: Integer; angle: Extended): Integer; - procedure SetWindowText(const Wnd: Hwnd; const Text: string); - function FindTransparentBitmaps(Bitmap: Integer; var Points: TPointArray; TranspCol, xs, ys, xe, ye: Integer): Boolean; - function FindTransparentBitmapsTolerance(Bitmap: Integer; var Points: TPointArray; TranspCol, xs, ys, xe, ye, Tol: Integer): Boolean; - procedure FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer); - procedure FastDrawSizeTransparent(x1, y1, x2, y2: Integer; sourcebitmap, targetbitmap: Integer); - procedure SetBitmapFastDrawTarget(bitmap: Integer); - procedure SetTransparentColor(bitmap, color: Integer); - procedure SetTransparencyFromBitmap(Bitmap, AlphaMaskBitmap: Integer); - function CountTransparentBitmap(Bitmap: Integer; TranspCol, xs, ys, xe, ye: Integer): Integer; - function CountTransparentBitmapTolerance(Bitmap: Integer; TranspCol, xs, ys, xe, ye, Tol: Integer): Integer; - function FindWindowBySize(Width, Height: Integer): Boolean; - TIntegerArray (alias) - T2DIntegerArray (alias) - TExtendedArray (alias) - TStringArray (alias) - function MiddleTPA(const TPA: TPointArray): TPoint; (alias) - function MiddleTPAEx(const TPA: TPointArray; out x, y: Integer): Boolean; (alias) - procedure TPARemoveDupl(var TPA: TPointArray); (alias) - function GetTPABounds(const TPA: TPointArray): TBox; (alias) - procedure TPAInvert(var TPA: TPointArray); (alias) - function TPACombine(const TPA1, TPA2: TPointArray): TPointArray; (alias) - function TPARandom(const Count, XRange, YRange: Integer): TPointArray; (alias) - procedure TPARemovePointEx(var TPA: TPointArray; const Point: TPoint; const All: Boolean); (alias) - procedure TPARemovePoint(var TPA: TPointArray; const Point: TPoint); (alias) - function TPAChain(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAChainEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) - procedure ATPASortBySize(var ATPA: T2DPointArray); (alias) - function GroupTPA(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAToATPA(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAGroupEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) - function TPAToATPAEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) Enjoy ~Freddy
-
The major changes to the API have been completed. Everything that has not been updated has been integrated with the new system. There's still some bugs to fix, but it's time to push out the alpha build. Further updates to the API will follow in future versions, but the current updates, aside from the stuff that has just been made compatible, should remain unchanged. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - The study modifier wasn't implemented correctly in the preg functions. New: - function BoxToStr(const Box: TBox): string; - RESOURCE_MANAGEMENT preprocessor option (can only disable resourcemanagement for TSCARObject subclasses) - TSCARClient = class(TSCARObject); - TSCARWindowClient = class(TSCARClient); - function GetClient: TSCARClient; - function SetClient(const Client: TSCARClient): TSCARClient; - procedure KeyDown(const Key: Char); - procedure KeyUp(const Key: Char); - procedure MoveMouseExpert(const X, Y, Gravity, Wind, MinWait, MaxWait, MaxStep, TargetArea: Extended); - procedure MoveMouseEx(const X, Y, RX, RY, MouseSpeed: Integer); - procedure MoveMouse(const X, Y: Integer); {MouseSpeed = 25} - procedure ClickMouseEx(const X, Y: Integer; const Btn: TMouseButton; const Interval: Integer); - procedure MoveMouseBox(const X1, Y1, X2, Y2: Integer); - procedure MoveMouseBoxEx(const X1, Y1, X2, Y2, MouseSpeed: Integer); - procedure PressVKey(const VKey: Byte); - procedure PressVKeyEx(const VKey: Byte; const Interval: Integer); - procedure PressKey(const Key: Char); - procedure PressKeyEx(const Key: Char; const Interval: Integer); - procedure TypeTextEx(const Str: string; const UseNumpad, UseDelays: Boolean); - procedure TypeText(const Str: string); - VK_XBUTTON1, VK_XBUTTON2, VK_CAPITAL, VK_KANA, VK_HANGUL, VK_JUNJA, VK_FINAL, VK_HANJA, VK_KANJI, VK_CONVERT - VK_NONCONVERT, VK_ACCEPT, VK_MODECHANGE, VK_LWIN, VK_RWIN, VK_APPS, VK_SLEEP, VK_NUMPAD0-VK_NUMPAD9 - VK_F13-VK_F24, VK_NUMLOCK, VK_SCROLL, VK_LSHIFT, VK_RSHIFT, VK_LCONTROL, VK_RCONTROL, VK_LMENU, VK_RMENU - VK_BROWSER_BACK, VK_BROWSER_FORWARD, VK_BROWSER_REFRESH, VK_BROWSER_STOP, VK_BROWSER_SEARCH, VK_BROWSER_FAVORITES - VK_BROWSER_HOME, VK_VOLUME_MUTE, VK_VOLUME_DOWN, VK_VOLUME_UP, VK_MEDIA_NEXT_TRACK, VK_MEDIA_PREV_TRACK - VK_MEDIA_STOP, VK_MEDIA_PLAY_PAUSE, VK_LAUNCH_MAIL, VK_LAUNCH_MEDIA_SELECT, VK_LAUNCH_APP1, VK_LAUNCH_APP2 - function GetKeyState(const VKey: Byte): Boolean; - function GetCurrentKeyState(const VKey: Byte): Boolean; - function GetToggleKeyState(const VKey: Byte): Boolean; - function FindColors(out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsTol(out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsEx(out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsTolEx(out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsSpiral(const SX, SY: Integer; out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsSpiralTol(const SX, SY: Integer; out X, Y: Integer; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function FindColorsSpiralEx(const SX, SY: Integer; out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE: Integer): Boolean; - function FindColorsSpiralTolEx(const SX, SY: Integer; out Points: TPointArray; const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Boolean; - function CountColors(const Colors: TIntArray; const XS, YS, XE, YE: Integer): Integer; - function CountColorsTol(const Colors: TIntArray; const XS, YS, XE, YE, Tol: Integer): Integer; - TSCARBitmap = class(TSCARObject); - procedure FloodFill(const Bmp: TSCARBitmap; const X, Y, Color: Integer); - procedure FloodFillTol(const Bmp: TSCARBitmap; const X, Y, Color, Tol: Integer); - function FloodFillEx(const Bmp: TSCARBitmap; const X, Y: Integer): TPointArray; - function FloodFillTolEx(const Bmp: TSCARBitmap; const X, Y, Tol: Integer): TPointArray; - procedure TPAFilterTriangle(var TPA: TPointArray; const X1, Y1, X2, Y2, X3, Y3: Integer); - procedure TPAExtractTriangle(var TPA: TPointArray; const X1, Y1, X2, Y2, X3, Y3: Integer); - function TPAFromCircle(const Center: TPoint; const Radius: Integer): TPointArray; - function TPAFromTriangle(const X1, Y1, X2, Y2, X3, Y3: Integer): TPointArray; - function FindColorTPA(out X, Y: Integer; const Color: Integer; const TPA: TPointArray): Boolean; - function FindColorTPATol(out X, Y: Integer; const Color: Integer; const TPA: TPointArray; const Tol: Integer): Boolean; - function FindColorTPAEx(out Points: TPointArray; const Color: Integer; const TPA: TPointArray): Boolean; - function FindColorTPATolEx(out Points: TPointArray; const Color: Integer; const TPA: TPointArray; const Tol: Integer): Boolean; - function GetMouseBtnState(const Btn: TMouseButton): Boolean; - function GetDesktopWindow: Hwnd; - function GetShellWindow: Hwnd; - function FindWindows(const Title: string): THwndArray; - function FindWindowsEx(const ParentWnd: Hwnd; const Title, ClassName: string; const RecursiveSearch, CaseSensitive, PartialMatch: Boolean): THwndArray; - function FindWindowsPreg(const ParentWnd: Hwnd; const TitlePattern, ClassNamePattern: string; const RecursiveSearch: Boolean): THwndArray; - function GetParentWindow(const Wnd: Hwnd): Hwnd; - function WrapText(const Str: string; const MaxColumnSize: Integer): string; - function GetWindowBoxEx(const Wnd: Hwnd; const ClientArea: Boolean): TBox; - function GetWindowBox(const Wnd: Hwnd): TBox; - function GetWindowText(const Wnd: Hwnd): string; - function GetWindowClass(const Wnd: Hwnd): string; - procedure GetBoxSize(const Box: TBox; out Width, Height: Integer); - procedure SetWindowText(const Wnd: Hwnd; const Text: string); - function GetOuterWindow(const Wnd: Hwnd): Hwnd; - function IsWindowTopMost(const Wnd: Hwnd): Boolean; - function IsWindowValid(const Wnd: Hwnd): Boolean; - function FindWindowsBySize(const ParentWnd: Hwnd; const Width, Height: Integer; const RecursiveSearch: Boolean): THwndArray; - procedure SetWindowBox(const Wnd: Hwnd; const Box: TBox); - procedure GetWindowSizeEx(const Wnd: Hwnd; out Width, Height: Integer; const ClientArea: Boolean); - procedure GetWindowSize(const Wnd: Hwnd; out Width, Height: Integer); - procedure SetWindowSize(const Wnd: Hwnd; const Width, Height: Integer); - procedure ActivateWindow(const Wnd: Hwnd); - TSCARBitmapClient = class(TSCARClient) - function WrapTextEx(const Str, BreakStr, BreakChars: string; MaxColumnSize: Integer): string; - TCharArray = array of Char; - T2DCharArray = array of TCharArray; Tweaks: - procedure MouseBtnDown(const X, Y: Integer; const Btn: TMouseButton); - procedure MouseBtnUp(const X, Y: Integer; const Btn: TMouseButton); - procedure ClickMouse(const X, Y: Integer; const Btn: TMouseButton); - Renamed: * FindBitmapIn -> FindBitmap * FindBitmapToleranceIn -> FindBitmapTol * HoldMouse -> MouseBtnDown * ReleaseMouse -> MouseBtnUp * KeyDown -> VKeyDown * KeyUp -> VKeyUp * GetKeyCode -> CharToVKey * MoveMouse -> SetMousePos * FindColorTolerance -> FindColorTol * FindColors -> FindColorEx * FindColorsTolerance -> FindColorTolEx * FindColorSpiralTolerance -> FindColorSpiralTol * FindColorsSpiralTolerance -> FindColorSpiralTolEx * FindColorsSpiral -> FindColorSpiralEx * CountColorTolerance -> CountColorTol * BitmapFromString -> BmpFromStrLegacy * MakeWindowTransparent -> SetWindowTransp * SetOnTop -> SetWindowTopMost * FastReplaceColor -> ReplaceColor * FastReplaceColorTolerance -> ReplaceColorTol * FindBitmaps -> FindBitmapEx * FindBitmapsTolerance -> FindBitmapTolEx * CountBitmapTolerance -> CountBitmapTol * TBooleanArray -> TBoolArray * T2DBooleanArray -> T2DBoolArray * T2DExtendedArray -> T2DExtArray * T2DStringArray -> T2DStrArray - Performance tweak for GetCursorType - function FindColorSpiral(const SX, SY: Integer; out X, Y: Integer; const Color, XS, YS, XE, YE: Integer): Boolean; - function FindColorSpiralTol(const SX, SY: Integer; out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer): Boolean; - function FindBitmap(out X, Y: Integer; const Bmp: TSCARBitmap; const XS, YS, XE, YE: Integer): Boolean; - function FindBitmapTol(out X, Y: Integer; const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Boolean; - procedure DebugBitmap(const Bmp: TSCARBitmap); - procedure SafeDrawBitmap(const Source: TSCARBitmap; const Dest: TCanvas; const X, Y: Integer); - function FindDeformedBitmapToleranceRotationIn(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; var accuracy: Extended; AngleIntervals: Extended; StartAngle, MaxAngle: Extended; var angle: Extended): Boolean; - function FindDeformedBitmapToleranceIn(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean; - function FindBitmapRotated(const Bmp: TSCARBitmap; var x, y, Angle: Integer; x1, y1, x2, y2: Integer): Boolean; - function FindBitmapSpiral(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean; - function FindBitmapSpiralTolerance(const Bmp: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance: Integer): Boolean; - function CreateBitmapMaskFromText(Text: AnsiString; Chars: Integer): TSCARBitmap; - function CreateBitmapFromText(Text: AnsiString; Chars: Integer; TextColor: Integer): TSCARBitmap; - function FindBitmapMaskTolerance(const Mask: TSCARBitmap; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance, ContourTolerance: Integer): Boolean; - procedure ReplaceColor(const Bmp: TSCARBitmap; const Color, NewColor: Integer); - procedure ReplaceColorTol(const Bmp: TSCARBitmap; const Color, NewColor, Tol: Integer); - function FindBitmapEx(out Points: TPointArray; const Bmp: TSCARBitmap; const XS, YS, XE, YE: Integer): Boolean; - function FindBitmapTolEx(out Points: TPointArray; const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Boolean; - function SimilarBitmaps(const Bmp1, Bmp2: TSCARBitmap; const Tol: Integer): Boolean; - function SimilarBitmapsEx(const Bmp1, Bmp2: TSCARBitmap; const Tol: Integer; out Diff: TPointArray): Boolean; - function CountBitmap(const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Integer; - function CountBitmapTol(const Bmp: TSCARBitmap; const XS, YS, XE, YE, Tol: Integer): Integer; Removed: - procedure ClearDebugLine(const Line: Integer); - procedure DeleteDebugLine(const Line: Integer); - function GetDebugLineCount: Integer; - function GetDebugLine(const Line: Integer): AnsiString; - procedure ReplaceDebugLine(const Line: Integer; const Str: AnsiString); - function GetDebugText: AnsiString; - procedure GetClientDimensions(out Width, Height: Integer); - function GetClientWindowHandle: Hwnd; - procedure SetClientWindowHandle(const H: Hwnd); - function GetTargetDC: HDC; - procedure SetTargetDC(const DC: HDC); - procedure ResetDC; - procedure SetDesktopAsClient; - procedure ClickMouseMid(x, y: Integer); - procedure HoldMouseMid(x, y: Integer); - procedure ReleaseMouseMid(x, y: Integer); - function FindBitmap(Bitmap: Integer; var x, y: Integer): Boolean; - function FindBitmapTolerance(Bitmap: Integer; var x, y: Integer; Tolerance: Integer): Boolean; - procedure SendKeysVB(const Str: AnsiString; const Wait: Boolean); - procedure SendArrow(const Key: Byte); - procedure SendArrowWait(const Key: Byte; const WaitTime: Integer); - procedure MoveMouseCC(x, y, range, segments, pcount, delay: Integer); - procedure MoveMouseSmoothFrom(x1, y1, x2, y2: Integer); - procedure MoveMouseSmoothFromEx(x1, y1, x2, y2: Integer; minsleeptime, maxsleeptime, maxdistance, gravity, forces: Integer); - procedure MoveMouseSmoothEx(const X, Y, MinSleepTime, MaxSleepTime, MaxDistance, Gravity, Forces: Integer); - procedure MoveMouseSmooth(const X, Y: Integer); - procedure ClickWindMouse(X, Y, rx, ry: Integer; Btn: TMouseButton); - procedure ClickMouseBox(x1, y1, x2, y2: Integer; Btn: TMouseButton); - procedure MouseBox(x1, y1, x2, y2: Integer); - procedure SendKeys(const Str: AnsiString); - procedure TypeKeys(const Str: AnsiString); - procedure SendKeysWait(const Str: AnsiString; const WaitTime, RndTime: Integer); - function IsNumpadEnabled: Boolean; - function IsCapsLockEnabled: Boolean; - function IsArrowDown(const Num: Byte): Boolean; - function IsNumpadKeyDown(const Key: Byte): Boolean; - TMusic - function CreateMusicPlayer: TMusic; - function FreeMusicPlayer(const Player: TMusic): Boolean; - function FindColorSpiral2(var X, Y: Integer; const Color, XS, YS, XE, YE: Integer): Boolean; - function GetBitmapDC(const Bmp: Integer): HDC; - function BitmapAssigned(const iBmp: Integer): Boolean; - function CreateBitmap(const Width, Height, Color: Integer): Integer; - procedure GetBitmapSize(const Bmp: Integer; out Width, Height: Integer); - function BitmapToString(Bmp: Integer): AnsiString; - 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 FreeBitmap(const Bmp: Integer): Boolean; - function CreateMirroredBitmap(const Bmp: Integer): Integer; - function ResizeBitmap(const Bmp, Width, Height: Integer): Integer; - function FindColorCircle(out X, Y: Integer; const Color, CX, CY, R: Integer): Boolean; - function FindColorCircleTolerance(out X, Y: Integer; const Color, CX, CY, R, Tol: Integer): Boolean; - function FindColorTriangle(out X, Y: Integer; const Color, X1, Y1, X2, Y2, X3, Y3: Integer): Boolean; - function FindColorTriangleTolerance(out X, Y: Integer; const Color, X1, Y1, X2, Y2, X3, Y3, Tol: Integer): Boolean; - function FindColorSkipCoords(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const TPA: TPointArray): Boolean; - function FindColorSkipCoordsTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const TPA: TPointArray): Boolean; - function FindColorSkipBox(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const Box: TBox): Boolean; - function FindColorSkipBoxTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const Box: TBox): Boolean; - function FindColorSkipBoxArray(out X, Y: Integer; const Color, XS, YS, XE, YE: Integer; const TBA: TBoxArray): Boolean; - function FindColorSkipBoxArrayTolerance(out X, Y: Integer; const Color, XS, YS, XE, YE, Tol: Integer; const TBA: TBoxArray): Boolean; - function IsMouseButtonDown(LeftButton: Boolean): Boolean; - function IsFunctionKeyDown(Key: Byte): Boolean; - function IsFKeyDown(Num: Byte): Boolean; - function IsKeyDown(C: Char): Boolean; - function GetBitmapCanvas(bitmap: Integer): TCanvas; - function LoadBitmap(path: AnsiString): Integer; - procedure SaveBitmap(bitmap: Integer; path: AnsiString); - function GetBitmapCanvas(bitmap: Integer): TCanvas; - function RegexPos(const Subject, Pattern: AnsiString): Integer; - function FindRegex(const Subject, Pattern: AnsiString): AnsiString; - function ReplaceRegex(const Subject, Pattern, Replacement: AnsiString): AnsiString; - function FindWindowTitlePart(Title: AnsiString; CaseSensitive: Boolean): Boolean; - function TBitmapFromBmp(Bitmap: TBitmap; Bmp: Integer): Boolean; - function GetBitmapAreaColors(xs, ys, xe, ye: Integer): T2DIntArray; - procedure CopyClientToBitmap(bitmap: Integer; xs, ys, xe, ye: Integer); - function FastGetPixel(const Bmp, x, y: Integer): Integer; - procedure FastSetPixel(const Bmp, x, y, Color: Integer); - procedure FastDrawClear(bitmap: Integer; Color: TColor); - procedure SetTargetBitmap(bitmap: Integer); - function RotateBitmap(bitmap: Integer; angle: Extended): Integer; - procedure SetWindowText(const Wnd: Hwnd; const Text: string); - function FindTransparentBitmaps(Bitmap: Integer; var Points: TPointArray; TranspCol, xs, ys, xe, ye: Integer): Boolean; - function FindTransparentBitmapsTolerance(Bitmap: Integer; var Points: TPointArray; TranspCol, xs, ys, xe, ye, Tol: Integer): Boolean; - procedure FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer); - procedure FastDrawSizeTransparent(x1, y1, x2, y2: Integer; sourcebitmap, targetbitmap: Integer); - procedure SetBitmapFastDrawTarget(bitmap: Integer); - procedure SetTransparentColor(bitmap, color: Integer); - procedure SetTransparencyFromBitmap(Bitmap, AlphaMaskBitmap: Integer); - function CountTransparentBitmap(Bitmap: Integer; TranspCol, xs, ys, xe, ye: Integer): Integer; - function CountTransparentBitmapTolerance(Bitmap: Integer; TranspCol, xs, ys, xe, ye, Tol: Integer): Integer; - function FindWindowBySize(Width, Height: Integer): Boolean; - TIntegerArray (alias) - T2DIntegerArray (alias) - TExtendedArray (alias) - TStringArray (alias) - function MiddleTPA(const TPA: TPointArray): TPoint; (alias) - function MiddleTPAEx(const TPA: TPointArray; out x, y: Integer): Boolean; (alias) - procedure TPARemoveDupl(var TPA: TPointArray); (alias) - function GetTPABounds(const TPA: TPointArray): TBox; (alias) - procedure TPAInvert(var TPA: TPointArray); (alias) - function TPACombine(const TPA1, TPA2: TPointArray): TPointArray; (alias) - function TPARandom(const Count, XRange, YRange: Integer): TPointArray; (alias) - procedure TPARemovePointEx(var TPA: TPointArray; const Point: TPoint; const All: Boolean); (alias) - procedure TPARemovePoint(var TPA: TPointArray; const Point: TPoint); (alias) - function TPAChain(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAChainEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) - procedure ATPASortBySize(var ATPA: T2DPointArray); (alias) - function GroupTPA(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAToATPA(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (alias) - function TPAGroupEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) - function TPAToATPAEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (alias) Enjoy ~Freddy
-
As promised, I've uploaded a pre-alpha copy of SCAR Divi 3.35 to give everyone somewhat of an idea of the upcoming breaking changes. I decided if I'm going to break stuff, I might as well change everything that ever bothered me. The idea is to make as many breaking changes in as little versions as possible, to minimize the number of times you guys have to adapt to a modified API. I'll start off with the changelog: New: - function BoxToStr(const Box: TBox): string; - RESOURCE_MANAGEMENT preprocessor option (can only disable resourcemanagement for TSCARObject subclasses) - TSCARClient = class(TSCARObject); - TSCARWindowClient = class(TSCARClient); - function GetClient: TSCARClient; - procedure SetClient(const Client: TSCARClient); - function DesktopClient: TSCARWindowClient; Tweaks: - procedure HoldMouse(const X, Y: Integer; const Btn: TMouseButton); - procedure ReleaseMouse(const X, Y: Integer; const Btn: TMouseButton); - procedure ClickMouse(const X, Y: Integer; const Btn: TMouseButton); - Renamed: * FindBitmapIn -> FindBitmap * FindBitmapToleranceIn -> FindBitmapTol Removed: - procedure ClearDebugLine(const Line: Integer); - procedure DeleteDebugLine(const Line: Integer); - function GetDebugLineCount: Integer; - function GetDebugLine(const Line: Integer): AnsiString; - procedure ReplaceDebugLine(const Line: Integer; const Str: AnsiString); - function GetDebugText: AnsiString; - procedure GetClientDimensions(out Width, Height: Integer); - function GetClientWindowHandle: Hwnd; - procedure SetClientWindowHandle(const H: Hwnd); - function GetTargetDC: HDC; - procedure SetTargetDC(const DC: HDC); - procedure ResetDC; - procedure SetDesktopAsClient; - procedure ClickMouseMid(x, y: Integer); - procedure HoldMouseMid(x, y: Integer); - procedure ReleaseMouseMid(x, y: Integer); - function FindBitmap(Bitmap: Integer; var x, y: Integer): Boolean; The changelog is fairly large and it will certainly get a lot larger by the time I'm done. As you can see, I've deleted quite a lot of functions. There's also a few you'll notice that are missing from SCAR, but they will either be reimplemented once integrated into the new system, or they will be integrated in some other form. before I get to the biggest change, the new client API, I'll note that I've started by working on the input API as well, I don't really have an idea of the current state of the keyboard API, as I haven't worked on that yet, but about half of the mouse functions have been modified/ported into the new system so far. As you can see in the changelog, several mouse functions have been altered or removed as well. The client API is basically going to be the most major change in this version of SCAR. In the changelog you'll notice the TSCARClient class that has been added. This is basically an abstract base class from which client types are derived. It has 2 properties, the ImageArea:TBox and InputArea:TBox. The first specifies the client's box on whatever you're imaging. The InputBox specifies the box of the client in the inputarea, usually the screen. The TSCARWindowClient represents an actual window. It has a Handle, DC (device context) and Canvas property on top of those from it's parent class. A less straightforward property is the ClientArea property. When this is set to True, the client will select the client area of the window you're currently targeting. For a regular window, this would be where the content is located rather than the entire window with the titlebar included. The Clone function allows you to create an identical second TSCARWindowClient object in case you want to keep a copy of the original you were using before you start to modify it. Clone will in the future probably also become available in TSCARClient. The Exists function tells you whether the window you targeted (still) exists and the Update function will update the client to the window's current location. TSCARClient is a descendant of a new TSCARObject class which is tied into a new resource manager I created, so if you don't free a client, ti will get freed when the script terminates, but it's still good practice to do so. Aside from all the above, there's a lot of other details and such will I'll explain more thoroughly in the future, but this will allow you to play with it a bit. There's also still some memory leaks and such in the system which I still have to patch, but I'll get around to that tomorrow or so. Finally: When you start a script, the script will start with a clone of the client selected with the crosshair, when you change the client from the script, SCAR's selected client will NOT change, only that selected in the script. If you select a new client with the crosshair however, it will change the client in the script if a script is running. A small example (select some new clients with crosshair while running): [scar]var Prev, New: Hwnd; begin while True do begin Wait(100); New := TSCARWindowClient(GetClient).Handle; if Prev <> New then begin WriteLn(New); Prev := New; end; end; end.[/scar] Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease ~Freddy
-
Since I won't be adding anything new anymore anyway, I've decided to go ahead and push 3.34 to RC. So at this point, bugfixes only, though I don't think there should be any (new) bugs. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - TPAUnique and TIAUnique didn't always return a unique array - Script could not be stopped when paused - When pausing on a breakpoint the editor showed 2 icons in the gutter instead of 1 - Preprocessor had issues with single characters on a line or between directives - The filetype filters for the save dialog on the debug and report boxes were broken Tweaks: - TPAAppend now returns the index of the appended element - TIAAppend now returns the index of the appended element - RewriteFile, AppendFile and OpenFile now throw an error when a file can't be accessed - SCAR now always uses a dot as decimal separator rather than the localized one New: - function TPAEmpty(const TPA: TPointArray): Boolean; - function TPAInsert(var TPA: TPointArray; const Index: Integer; const Point: TPoint): Integer; - function TIAEmpty(const TIA: TIntArray): Boolean; - function TIAMax(const TIA: TIntArray): Integer; (Alias for AMax) - function TIAMaxEx(const TIA: TIntArray; out Index: Integer): Integer; - function TIAMin(const TIA: TIntArray): Integer; (Alias for AMin) - function TIAMinEx(const TIA: TIntArray; out Index: Integer): Integer; - function TIAInsert(var TIA: TIntArray; const Index, Int: Integer): Integer; - procedure OffsetTIA(var TIA: TIntArray; const Offset: Integer); - TExtArray = array of Extended; (Alias for TExtendedArray) - function TEAInTEA(const TEA1, TEA2: TExtArray): Boolean; - function TEAEmpty(const TEA: TExtArray): Boolean; - procedure TEAUnique(var TEA: TExtArray); - function TEAToStr(const TEA: TIntArray): string; - function StrToTEA(const Str: string): TExtArray; - function TEAContains(const TEA: TExtArray; const Ext: Extended): Boolean; - function TEAPos(const TEA: TExtArray; const Ext: Integer): Integer; - function TEAPosEx(const TEA: TExtArray; const Ext: Extended; const From: Integer): Integer; - function TEADelete(var TEA: TExtArray; const Index: Integer): Integer; - function TEAAppend(var TEA: TExtArray; const Ext: Extended): Integer; - TStrArray = array of string (Alias for TStringArray) - function CountStr(const SubStr, Str: string): Integer; Enjoy ~Freddy
-
As mentioned previously in the roadmap, this version won't be a huge update as my finals are coming up. I'll be releasing the final version somewhere this week though, as I'd like to get a head start on developing 3.35, to be able to stick to my monthly release schedule despite my finals. This build contains a few more new functions which are all also documented in the wiki and there's also a few bugfixes. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - TPAUnique and TIAUnique didn't always return a unique array - Script could not be stopped when paused - When pausing on a breakpoint the editor showed 2 icons in the gutter instead of 1 Tweaks: - TPAAppend now returns the index of the appended element - TIAAppend now returns the index of the appended element - RewriteFile, AppendFile and OpenFile now throw an error when a file can't be accessed - SCAR now always uses a dot as decimal separator rather than the localized one New: - function TEAInTEA(const TEA1, TEA2: TExtArray): Boolean; - function TPAEmpty(const TPA: TPointArray): Boolean; - function TPAInsert(var TPA: TPointArray; const Index: Integer; const Point: TPoint): Integer; - function TIAEmpty(const TIA: TIntArray): Boolean; - function TIAMax(const TIA: TIntArray): Integer; (Alias for AMax) - function TIAMaxEx(const TIA: TIntArray; out Index: Integer): Integer; - function TIAMin(const TIA: TIntArray): Integer; (Alias for AMin) - function TIAMinEx(const TIA: TIntArray; out Index: Integer): Integer; - function TIAInsert(var TIA: TIntArray; const Index, Int: Integer): Integer; - procedure OffsetTIA(var TIA: TIntArray; const Offset: Integer); - TExtArray = array of Extended; (Alias for TExtendedArray) - function TEAEmpty(const TEA: TExtArray): Boolean; - procedure TEAUnique(var TEA: TExtArray); - function TEAToStr(const TEA: TIntArray): string; - function StrToTEA(const Str: string): TExtArray; - function TEAContains(const TEA: TExtArray; const Ext: Extended): Boolean; - TStrArray = array of string (Alias for TStringArray); - function CountStr(const SubStr, Str: string): Integer; Enjoy ~Freddy
-
As usual, following a final release, here's the first new alpha build of the next version! Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - TPAUnique and TIAUnique didn't always return a unique array Tweaks: - TPAAppend now returns the index of the appended element - TIAAppend now returns the index of the appended element - RewriteFile, AppendFile and OpenFile now throw an error when a file can't be accessed - SCAR now always uses a dot as decimal separator rather than the localized one New: - function TPAEmpty(const TPA: TPointArray): Boolean; - function TPAInsert(var TPA: TPointArray; const Index: Integer; const Point: TPoint): Integer; - function TIAEmpty(const TIA: TIntArray): Boolean; - function TIAMax(const TIA: TIntArray): Integer; (Alias for AMax) - function TIAMaxEx(const TIA: TIntArray; out Index: Integer): Integer; - function TIAMin(const TIA: TIntArray): Integer; (Alias for AMin) - function TIAMinEx(const TIA: TIntArray; out Index: Integer): Integer; - function TIAInsert(var TIA: TIntArray; const Index, Int: Integer): Integer; - TExtArray = array of Extended; (Alias for TExtendedArray) - function TEAEmpty(const TEA: TExtArray): Boolean; - procedure TEAUnique(var TEA: TExtArray); - function TEAToStr(const TEA: TIntArray): string; - function StrToTEA(const Str: string): TExtArray; Enjoy ~Freddy
-
Heh, I've been coding like a mad man, here it is, already, 3.33 Beta. This beta contains the long awaited firewall rules editor, as well as a new library system with improved support for legacy libraries. A new library architecture will also be introduced before the build is pushed to RC. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - Memory leak in client system - Bug in client system with multi-monitor setups - FindColorSkipCoords(Tolerance) failed when a TPA with duplicate coordinates was entered - Types were not exported correctly from plugins - Functions updated/improved and ported to new framework: * FindColorSkipBox(Array)(Tolerance) - ScriptFile and TimeRunning did not function correctly when used with ThreadSafeCall - LoadDebugBitmap always returned False Tweaks: - Improved firewall system + now powered by SQLite3 rather than XML - New library system - Legacy libraries now support OnLoadLib and OnUnloadLib callbacks - Legacy libraries once again receive all previously included functions though SetFunctions except for those removed from SCAR - BitmapAssigned and CreateBitmap now export to legacy libraries New: - procedure SortTPAByRow(var TPA: TPointArray); - procedure TPAExtractCircle(var TPA: TPointArray; const Center: TPoint; const Radius: Extended); - procedure TPAFilterCircle(var TPA: TPointArray; const Center: TPoint; const Radius: Extended); - Firewall rules editor - function CreateBitmap(const Width, Height, Color: Integer): Integer; Removed: - FindColorComp - TColorComp - MakeScreenPath Happy testing! ~Freddy
-
The final version of SCAR Divi 3.32 was released a couple of days ago, so that means it's about time for a new pre-release copy! Currently I'm working on a new colorfinding framework that will seriously tidy up SCAR's source code and make it easier for me to add and test new stuff. I'm integrating the framework into the current system, which means that scripts will not need to be altered to use it. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Improvements: - FindColor(s)(Tolerance) ported to new framework - CountColor(Tolerance) ported to new framework Additions: - procedure SortTPAByRow(var TPA: TPointArray); Enjoy ~Freddy
-
I've uploaded SCAR Divi 3.32 RC. This build will probably be the final build as I don't expect any changes to be made after this. The 3.32 release started out of a bugfix release for 3.31, but since one of the biggest bugs was caused by a bug in the 3rd party SynEdit component SCAR was using, I've replaced the entire editor control. Since this release has become a lot bigger than anticipated, it has taken quite a lot more time to code it than anticipated. But it's finally done, so enjoy! The final build will probably be released in 24 hours. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - Small bug in the function parser - [#46] Execution errors were mapped incorrectly - [#40, #42] Bug in code completion caused by 3rd party component - [#49] TPAFromBox didn't calculate the box size correctly - Incorrect handling of trying to open non-existing files - [#52] TPADensity returned an incorrect result - Small bug in stats system causing issues with offline devices on first run - Italic or Underline types couldn't be toggled off once toggled on for a syntax style - [#55] All click actions now have the same effect when the primary mouse buttons are swapped - [#37, #38] In rare cases FindColorSpiral(Tolerance) threw access violations - [#45, #50] ScriptPath returned an empty string when used in ThreadSafeCall Improvements: - New code editor - Ported to Delphi XE2 - New settings manager (based on SQLite3 rather than XML) - WriteLn/AddToReport no longer open and set focus to the Debug/Report tabs Additions: - Line states - Regex searching/replacing - Code folding - [#48] New Defines: SCAR_PREALPHA, SCAR_ALPHA, SCAR_BETA, SCAR_RC, SCAR_FINAL Removed: - Option to print without syntax - GetDebugParams - SetDebugParams Enjoy ~Freddy