FHannes Posted May 4, 2013 Share Posted May 4, 2013 (edited) 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 Edited September 19, 2013 by Freddy 1 Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 4, 2013 Author Share Posted May 4, 2013 I've uploaded a new copy, I'll be including small testscripts as well now with the prerelease versions. This will give you guys a better idea of how to use SCAR 4 as well. For example: [scar]uses Bitmaps; var Bmp = TBitmap.Create(100, 100); Bmp.Pixels[Point(50, 50)] := 255; WriteLn(Bmp.CountColor([255])); WriteLn(Bmp.CountColor([0])); WriteLn(Bmp.CountColor([0, 255])); WriteLn(Bmp.CountColor([]));[/scar] Quote Link to comment Share on other sites More sharing options...
Daniel Posted May 10, 2013 Share Posted May 10, 2013 (edited) Wow, very nice work! A bit Visual Studio-esque, but still looks neat. Nice to see it being mutli-process now, too I am guessing you are using the "nightly" DWScript verson, too? EDIT: Couple of things I have encountered thus far: The error messages are extremely unhelpful ("Failed to compile.") When indenting, code completion lists only a few methods (namely ones starting with "E", then "En"...) Form editor is pointless Colour picker/Eyedropper tool does not have any balloon help, neither does the client selection crosshair Help -> Download News doesn't visibly do anything Other areas need changes to match the new interface (e.g. form editor, DTM editor, settings) No code completion for unit names in the uses clause Slow redrawing when resizing the program results in flickering and visible lag Noticeable input lag "Structure" dialog doesn't populate The editor always seems to display a squiggly red underline on the first line What I found annoying, was that the "Open" dialog box always went back to the defined workspace, instead of last opened folder. Redoing (CTRL+Y) an action redoes each individual character types, not words, whereas Undo undoes entire actions. The following code seems to cause DWScript (the "engine") to crash:[scar]type TTestClass = class public procedure SetBool(const Bool: Boolean); function GetBool: Boolean; end;[/scar] And on that note, logs aren't properly generated Anyways, time for bed now Edited May 10, 2013 by Daniel Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 10, 2013 Author Share Posted May 10, 2013 (edited) This is a pre-alpha version. Most stuff isn't finished or implemented yet. As for the compiler errors, they are shown in the compiler messages tab, failed to compile is a message sent by the engine. Also, the engine doesn't crash on that code you pasted, but that wouldn't compile, the class methods aren't implemented... The structure panel seems to populate just fine. I'm also not experiencing any input lag, what OS are you on? Edited May 10, 2013 by Freddy Quote Link to comment Share on other sites More sharing options...
Daniel Posted May 11, 2013 Share Posted May 11, 2013 This is a pre-alpha version. Most stuff isn't finished or implemented yet. I am aware of that. Was just letting you know. Also, the engine doesn't crash on that code you pasted, but that wouldn't compile, the class methods aren't implemented... They are, and it does. The structure panel seems to populate just fine. It doesn't. It's empty (aside from the typical "Classes"..."Variables"). I'm also not experiencing any input lag, what OS are you on? Windows 7 x86_64 (same as you, I would imagine). It's like SSH'ing into a server where you have 500ms ping - the delay between character strokes is quite noticeable. Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 11, 2013 Author Share Posted May 11, 2013 It doesn't. It's empty (aside from the typical "Classes"..."Variables"). Is there anything in the script for it to populate it with? Windows 7 x86_64 (same as you, I would imagine). It's like SSH'ing into a server where you have 500ms ping - the delay between character strokes is quite noticeable. I'll look into it, but so far I haven't been able to reproduce the issue. Quote Link to comment Share on other sites More sharing options...
Wanted Posted May 11, 2013 Share Posted May 11, 2013 Haven't had the time to appreciate this fully but it looks really nice Quote Link to comment Share on other sites More sharing options...
slacky Posted May 12, 2013 Share Posted May 12, 2013 (edited) Now this seems neat! I'm without a doubt impressed by the new design, the removal of the native Windows look is refreshing! Unfortunately I'm without a Windows-installation so I can not test it (yet).. I got a couple of questions to go: - Will you be using the experimental JIT for DWS? - If not using JIT: How is the performance gain given by DWScript then? - Can the GC be turned of, simply to allow for manual handling, and speedup? * In the meanwhile... Installing WinXP in VBox again * Edit: The archive seems to be partially corrupt: - Unexpected end of archive ... Checksum error at <bin\libcef.dll, bin\scar.exe ... many more> - Corrupted files. Edited May 12, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 13, 2013 Author Share Posted May 13, 2013 I will be using the JIT compiler once it's stable. I'm estimating the performance gain to be a factor of 25 at least without JIT, with JIT I'd have to guess 100 or more. GC can't be turned off, but given the performance gain in comparison to PS, it doesn't really seem like an issue to me. Quote Link to comment Share on other sites More sharing options...
slacky Posted May 13, 2013 Share Posted May 13, 2013 I've read about the JIT in a few articles, have not had time to test it my self, but it's definitely fast enough to avoid having to write Delphi extensions in SCAR, and thinking of the set of benchmarks I've seen, it's actually comparable to compiled code. You have mentioned that SCAR is "ready" for multiple script-engines, if you find time, you could implement the experimental JIT as an alternative, just for the heck of it. - Anyways I hope you find time to re-upload the RAR-file containing SCAR Divi 4 (pre-alpha) - WinRAR clams that it's broken. Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 13, 2013 Author Share Posted May 13, 2013 SCAR 4 has a completely new engine infrastructure, it's not built to support multiple engines. I'll upload a new archive when I have another build ready. I'm really busy with schoolstuff atm though. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted May 13, 2013 Share Posted May 13, 2013 - Anyways I hope you find time to re-upload the RAR-file containing SCAR Divi 4 (pre-alpha) - WinRAR clams that it's broken. SLACKEEEEH, just get 7-Zip - it is free and open-source alternative for WinRar / WinZip! I had no problems extracting it using 7-Zip... Quote Link to comment Share on other sites More sharing options...
slacky Posted May 13, 2013 Share Posted May 13, 2013 (edited) SLACKEEEEH, just get 7-Zip - it is free and open-source alternative for WinRar / WinZip!I had no problems extracting it using 7-Zip... Yeah, maybe it would'a worked in a perfect world, but not this day... Same error appeared with 7-zip, same with gzip as well. So there is something going on with that file. U sure you managed to unpack it (was it runnable afterward)? Now that I've got WinXP-BE reinstalled in VBox, maybe I'll find some time to come back to the environment and do some "scaring". @Freddy: Then you got yet another thing to implement - Just for the heck of it! Now isn't that just great, huh? ;P Edited May 13, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
Janilabo Posted May 13, 2013 Share Posted May 13, 2013 Yeah it works just fine, just tested again. Maybe the problem occurs only with XP? ..or something to do with VBoxing? Who knows, hmm.. But yep, everything works just fine under Windows 7. :\ Quote Link to comment Share on other sites More sharing options...
slacky Posted May 13, 2013 Share Posted May 13, 2013 (edited) It's not the VBox, I was unable to unpack it under Linux as well - tested with all my archive managers (4).. The same problem occurs (bin/scar.exe is corrupt). I was able to extract 4 of 16MB of the scar.exe-file [CRC is invalid], everything else went smooth... What ever - I'll wait for a later release, and hope that the problem doesn't show again. Fucking Windows-7-only-extractable-archive-thing - To hell with it. Edited May 13, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
Daniel Posted May 18, 2013 Share Posted May 18, 2013 Same error appeared with 7-zip, same with gzip as well. So there is something going on with that file. U sure you managed to unpack it (was it runnable afterward)? Redownload it? Quote Link to comment Share on other sites More sharing options...
aarontdang Posted May 20, 2013 Share Posted May 20, 2013 I try to download it ... at first it said about 20 MB then when it reach 2.5MB it finished the download. I guess that's why when trying to extract the file it got corrupt. Also, I haven't used Scar in a while...the version 3.12 have Silent Mouse option ... But the new version 3.38 doesn't seem to include the Silent Mouse .... would the 4.0 include the Silent Mouse option. It would be nice just to be able to run the Scar and play with the computer at the same time Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 20, 2013 Author Share Posted May 20, 2013 (edited) The "silent mouse option" will be readopted, but do keep in mind that it does not and never worked for most games. EDIT: I've been sick for a week or 2, I haven't been able to do much during that time. I can't upload a new build at the moment, because I'm working on a large feature, that's currently unfinished and because of that, fairly unstable. I have however repackaged the existing build and reuploaded it. Progress will be slow during the next month, as I'm currently studying for my finals. Edited May 28, 2013 by Freddy Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 4, 2013 Share Posted June 4, 2013 I am offically in love with SCAR 4! Freddy i love it! Along with the overload command! Ive started creating an include for SCAR 4, so far i have a bunch of math, point, and mouse functions! sample: [scar] unit GMRL.Mouse; interface uses Legacy.Mouse, GMRL.Points; procedure GetMousePos(var P: TPoint); overload; function GetMousePos: TPoint; overload; function MMouse(X, Y, RX, RY: Integer): TPoint; overload; function MMouse(P: TPoint; RX, RY: Integer): TPoint; overload; function MMouse(P: TPoint): TPoint; overload; function MMouse(Box: TBox): TPoint; overload; function MMouse(CX, CY, Radius: Integer): TPoint; overload; function MMouse(P: TPoint; Radius: Integer): TPoint; overload; function HoldMouseWait(X, Y, RX, RY, MinTime, MaxTime: Integer; Btn: TMouseButton): TPoint; overload; function HoldMouseWait(P: TPoint; RX, RY, MinTime, MaxTime: Integer; Btn: TMouseButton): TPoint; overload; function HoldMouseWaitBox(X1, Y1, X2, Y2, MinTime, MaxTime: Integer; Btn: TMouseButton): TPoint; overload; function HoldMouseWaitBox(B: TBox; MinTime, MaxTime: Integer; Btn: TMouseButton): TPoint; overload; function Mouse(X, Y, RX, RY: Integer; Btn: TMouseButton): TPoint; overload; function Mouse(P: TPoint; RX, RY: Integer; Btn: TMouseButton): TPoint; overload; function Mouse(P: TPoint; Btn: TMouseButton): TPoint; overload; function Mouse(Box: TBox; Btn: TMouseButton): TPoint; overload; function Mouse(CX, CY, Radius: Integer; Btn: TMouseButton): TPoint; overload; function Mouse(P: TPoint; Radius: Integer; Btn: TMouseButton): TPoint; overload; implementation uses GMRL.Math; ................................................................. [/scar] Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 4, 2013 Share Posted June 4, 2013 (edited) The new API is a bit difficult to get started with but after that its a breeze ive almost created an entire include! Is there any way to store the units another place than the core folder? Heres a bitmap function i created, simple and effective. The new API almost does everything for you about like Delphi, there are a few bugs in code completion that are a bit annoying but and the fact it doesn't let you finish a line of code and before it starts checking for missing attributes is kind of annoying to. Heres my progress so far https://github.com/ShadowRecon/GMRL4 Edited June 4, 2013 by shadowrecon Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 6, 2013 Share Posted June 6, 2013 How is the development going with this version of SCAR? Also how are includes going to work in the final version or have you considered this yet? Ive been working pretty hard with GMRL trying to get enough functions to actually write a script for runescape and try it out, still working on the TFunctions tho, but ive managed to implement alot of them so far. Quote Link to comment Share on other sites More sharing options...
slacky Posted June 7, 2013 Share Posted June 7, 2013 (edited) Is there any way to store the units another place than the core folder?[/url] I don't really remember all that much any more, but have you tried: uses Someunit in 'myunits\Someunit.pas' //this is usually in the dpr-file.. // or: uses myunits.Someunit //never tested, but I think i've seen something like this. Edited June 7, 2013 by slacky Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 7, 2013 Share Posted June 7, 2013 Ive tried that but it hasnt worked. Quote Link to comment Share on other sites More sharing options...
FHannes Posted June 7, 2013 Author Share Posted June 7, 2013 At the moment it's not possible to include files outside of the core library. This will be possible once the entire file system is implemented. I've already started work on that particular aspect, but currently all of my projects are on hold because I'm studying for my finals. When they're over I will finish and release SCAR Divi 3.39, as well as continue development on SCAR 4. Includes will look/work quite different than what people are used to, but I won't go into details until I've actually had a chance to complete that part of the code. That way I'm sure that everything I'd like to do is possible and works. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 7, 2013 Share Posted June 7, 2013 Oh Okay. Am i wasting my time trying to develop a RS07 include using all these units? Thats my main worry. I hate feeling as if i just waster my time. . . which i am sure many feel. But overall i like SCAR 4, it is very fast and i would almost compare its speed with Delphi its self. It seems to compile fast, execute code at an extremely fast speed compared to PS and seems to have as much functionality as Delphi! Quote Link to comment Share on other sites More sharing options...