Jump to content
FHannes

SCAR Divi 3.35 Pre-Alpha (Unstable!!!)

Recommended Posts

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

Edited by Freddy
Link to comment
Share on other sites

Never seen Freddy type that much in a while. Nice work, now as I try to understand this "client" generalization again.

So, nothing has changed in how the targeting works GUI wise I would say, and you can still store the handle in a variable, and set the handle, etc.

 

On the coding side, you made a totally new object, and class, etc w/e they are. Now Input Area, Client Area, and then there's one for like Full Area or something. This is nice. Also being able to clone the data. So really all this clienting stuff does it gets the clients handle, box's, and bout it so far?

 

So I'm guessing we can now change exactly what SCAR reads image data from? Like the client box on the window or something?

 

 

 

Am I getting most of this down right lol?

 

EDIT: Also, @ShadowRecon, I think Freddy's coding standards are even better than mine. :P

Edited by LordJashin
Link to comment
Share on other sites

Well, this system allows you to do a lot you could already do before. However, it's easier now to manage clients, before if you wanted to switch clients and switch back afterwards for example, it was a bit tricky. Also, there's a specific reason for difference between Input and Image areas. If a window is selected, the system targets it's device context, while the input area requires you to click on the screen, with coordinates relative to the desktop, the device context will only contain the image of the window, so the image area would effectively start at 0,0 for the window. The Input area also allows you to effectively get the coordinates of the window on the screen, which is something you couldn't do before either.

Link to comment
Share on other sites

I've uploaded a new copy.

 

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;
- procedure KeyDown(const Key: Char);
- procedure KeyUp(const Key: Char);

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

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);

 

As you'll notice, I've started messing with the keyboard API as well now. I've also fixed some bugs, leaks and stabilized some stuff. Obviously still not recommended for daily usage of course.

Edited by Freddy
Link to comment
Share on other sites

Nice changes Freddy, very smart tweaks!

 

Just 1 thing I am wondering about..

Those debug box functions/procedures that were removed - are you planning to add any alternative functions/objects in future?

 

No, I'm not, the debug and report boxes are intended for output, a script shouldn't have access to it's contents.

Link to comment
Share on other sites

I wish SCAR could have a button that would automatically make a script meet standards.

 

I think I will make a script for that eventually.

 

Make all bold words lowercase, correct spacing, etc. A challenge.

 

A formatter is very low priority...

Link to comment
Share on other sites

I've committed a new copy. I've been ravaging through the mouse API some more, the mouse API should be finished now.

 

Current 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;
- procedure KeyDown(const Key: Char);
- procedure KeyUp(const Key: Char);
- procedure MoveMouseSmoothEx(const X, Y, Gravity, Wind, MinWait, MaxWait, MaxStep, TargetArea: Extended); {WindMouse by Benjamin Land}
- procedure MoveMouseSmooth(const X, Y, MouseSpeed: Integer); {WindMouse by Benjamin Land} {Default speed = 25}
- procedure ClickMouseEx(const X, Y: Integer; const Btn: TMouseButton; const Interval: Integer);

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

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);

 

Note that I added ClickMouseEx after I compiled the current build, so it's not in there yet. I've done away with MoveMouseSmooth as the algorithm had some issues and I've replaced it completely with Benland's WindMouse algorithm now, which is actually a better implementation of MoveMouseSmooth, seeing as MoveMouseSmooth was actually based on pretty much the same principles.

Link to comment
Share on other sites

I have 2 questions: Why did you remove MouseBox? and what about making the MoveMouseSmooth with the cost x, y, rx, ry instead of only x, y. The other way it would take up a lot of space writing the random in the x and y's if ur using it many times in you script:

Now:

MoveMouseSmooth(x - 5 + random(10), y - 5 + random(10)...)

After:

MoveMouseSmooth(x, y, 5, 5....)

Link to comment
Share on other sites

As long as Freddy brain storms before changing anything we should be good. He can rename everything, but it has to be logical. I for one would change hold mouse button to like MouseBtnDown ( I think he actually did this! ) just because it is logically better.

 

GL Freddy, I seriously think that formatter could save us a lot of time though because then we could do code drafts, first hand type everything real fast. Then run it through the formatter then go do the final changes. Sounds like something a regex could be useful for?

Link to comment
Share on other sites

I have 2 questions: Why did you remove MouseBox? and what about making the MoveMouseSmooth with the cost x, y, rx, ry instead of only x, y. The other way it would take up a lot of space writing the random in the x and y's if ur using it many times in you script:

Now:

MoveMouseSmooth(x - 5 + random(10), y - 5 + random(10)...)

After:

MoveMouseSmooth(x, y, 5, 5....)

 

I thought I'd remove it and see if anyone objected, I wasn't sure if it was actually being used, but I guess I can add it back in. As for the RX and RY parameters, I personally prefer to know where my cursor is going to go, but I suppose there's no harm in adding them back in. Also note that the old WindMouse functions did not select a random coordinate in 4 directions, only forward and downward from the given coordinates: X + Random(RX) and Y + Random(RY).

 

Here's an updated changelog, I haven't uploaded a new copy though:

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;
- 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);

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

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);

 

I have renamed MoveMouse to SetMousePos, it seemed more logical. MoveMouseSmooth is now MoveMouse. I've created an additional routine now called MoveMouse which just takes X and Y parameters and calls WindMouse with a default speed of 25. I feel there should be a no-fuss-routine in there to move the mouse smoothly. The MoveMouseEx function now takes X, Y, RX, RY and MouseSpeed. The final one is MoveMouseExpert which gives you access to the full range of parameters. Note that MoveMouseEx processes the coordinates as "X + Random(RX), Y + Random(RY)".

 

I've also added new MouseBox routines, now called MoveMouseBox(Ex). I'm still contemplating whether or not I should add a new ClickMouseBox.

Edited by Freddy
Link to comment
Share on other sites

Well, SetMousePos. I like idea that we can prefix everything with Move or Mouse. But this makes sense, there is nothing else you can really name it. It makes sense because that is essentially what is happening the mouse is being set to a position it isnt being moved there ( it is but super fast maybe? ).

 

I don't see why we cant have classes for this/ or types. Put everything in a Mouse class?

I think the pascal script limitations are in the way? At this point Freddy I think you should replace Pascal script. But that is my opinion. Maybe you want to optimize the api b4 replacing that.

Edited by LordJashin
Link to comment
Share on other sites

H

Well, SetMousePos. I like idea that we can prefix everything with Move or Mouse. But this makes sense, there is nothing else you can really name it. It makes sense because that is essentially what is happening the mouse is being set to a position it isnt being moved there ( it is but super fast maybe? ).

 

I don't see why we cant have classes for this/ or types. Put everything ia Mouse class?

I think the pascal script limitations are in the way? At this point Freddy I think you should replace Pascal script. But that is my opinion. Maybe you want to optimize the api b4 replacing that.

 

if he changes to much every include and plugin will not work with scar. I agree I liked how scar Titan was setup with mouse and color uses etc. but the point is there is no since in fussing over naming and formatting. I'm just happy to see changes and work toward the new script processor ;) looks good freddy! Can't wait to try it out! Few more days :/

Link to comment
Share on other sites

I intend to keep plugins compatible, as the plugin system allows for multiple types of plugins, however, I'll be releasing a new plugin format as for obvious reasons it will be better to have plugins created for the new system.

 

As for more OOP... PascalScript and OOP aren't exactly the best of friends, I can however add more, but people have gotten very much used to not using it, so for SCAR 3.xx I will certainly be limiting the amount of OOP I use.

Link to comment
Share on other sites

How about "new" (Click)MouseBox(Ex) procedures, that use TBox instead of Integers (even name says box, so at least it would make some sense..)?

 

That may indeed not be such a bad idea... I've also just uploaded a new copy:

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;
- 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;

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
- Performance tweak for GetCursorType

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;

 

I've finished up the keyboard API now. Functions like IsCapsLockEnabled were removed, but you can now easily use GetToggleKeyState(VK_CAPITAL). GetKeyState will return True if the given key is pressed or was pressed since the last time GetKeyState was called for that key. GetCurrentKeyState will only return True if the key is currently being pressed. Note that IsKeyDown and all other key detection functions used to work like GetKeyState.

Link to comment
Share on other sites

H

 

if he changes to much every include and plugin will not work with scar. I agree I liked how scar Titan was setup with mouse and color uses etc. but the point is there is no since in fussing over naming and formatting. I'm just happy to see changes and work toward the new script processor ;) looks good freddy! Can't wait to try it out! Few more days :/

 

You have a point, but still this is going to break tons of crap probably. So why still work on SCAR Divi? If we can implement most of this into SCAR Titan?

 

Does Totan support multi threading? If SCAR Divi supported that I think I could stick with it.

 

Or maybe you want to finish all the changes in SCAR Divi then port a lot of it to SCAR titan? I just really want multi threading eventually...

 

Also, dang Freddy, your colors are showing, pumpin out so many functions. This is Epic.!

Edited by LordJashin
Link to comment
Share on other sites

You have a point, but still this is going to break tons of crap probably. So why still work on SCAR Divi? If we can implement most of this into SCAR Titan?

 

Does Totan support multi threading? If SCAR Divi supported that I think I could stick with it.

 

Or maybe you want to finish all the changes in SCAR Divi then port a lot of it to SCAR titan? I just really want multi threading eventually...

 

Also, dang Freddy, your colors are showing, pumpin out so many functions. This is Epic.!

 

SCAR 4 is still far off, there's no point in abandoning Divi before I have a product to replace it...

Link to comment
Share on other sites

Just make sure this isnt 3.34>3.35. And please don't remove something cool unless you can replace it. multithreading nomnomnom.......

 

As I've explained plenty of times in the past, it's not possible to add multithreading support to SCAR Divi. Personally I also do not believe SCAR would benefit much from multi-threading.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
  • Create New...