Delphi 7
Hi everyone, i'm tying (remember) to make a norecoil/nospread program in Delphi7. It works in all the windows and inside the game (lody,server list) but when you'r playing it does nothing. if someone could give me a hand on this i realy appreciate your help.
here is the code:
-------------------------------------//------------------------------
unit mouseUnit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, RGBPickMain;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
ScreenDC: HDC;
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function IsBtnPressed(ABtn: integer): boolean;
begin
result := (GetAsyncKeyState(ABtn) and $8000) = $8000;
end;
procedure TForm1.FormCreate(Sender: TObject);
label inicio;
var
MausPos: TPoint;
CursorPos: TPoint;
x,y,mx,my:integer;
begin
inicio:
Application.ProcessMessages;
if isbtnpressed(VK_SHIFT) then
begin
GetCursorPos(MausPos);
while isbtnpressed(VK_SHIFT) do
begin
x:=mauspos.x;y:=mauspos.y;
if isbtnpressed(VK_LBUTTON) then
begin
GetCursorPos(CursorPos);
mx:=CursorPos.X;my:=CursorPos.y;
if mx<x then mx:=mx+(x-mx);
if mx>x then mx:=mx-(mx-x);
if my<y then my:=my+(y-my);
if my>y then my:=my-(my-y);
//SetCursorPos(round(Screen.Width/2),round(Screen.Height/2));
SetCursorPos(mx,my);
end;
end;
end;
sleep (10);
goto inicio;
end;
end.
---------------------------------//---------------------------------
note: tryed with CAEU,XP
i ask a moderator to create a Delphi topic, since delphi and c have the same power (don't tell me they don't because i started (in 1994) with pascal 3 and borland c at the same time and both grow the same). It's not finished, if you noticed the "ScreenDC: HDC;" i was about to add a colorpik (r,g,b).