Topic: Need more Delphi help :/ sry...

I need help with getting the HWND of a window EXAMPLE: Draging a Crosshair to a game client to get info into a bot...

2 (edited by zaher 2004-11-10 16:00)

Re: Need more Delphi help :/ sry...

inside delphi

Form1.Handle
or if you in Form1 object use handle without name of object
Handle

for another objects
Panel1.Handle 
Edit1.Handle 
etc....

what you mean
>Draging a Crosshair to a game client to get info into a bot

If your people come crazy, you will not need to your mind any more.

Re: Need more Delphi help :/ sry...

zaher wrote:

inside delphi

Form1.Handle
or if you in Form1 object use handle without name of object
Handle

for another objects
Panel1.Handle 
Edit1.Handle 
etc....

what you mean
>Draging a Crosshair to a game client to get info into a bot


What i mean is my program has a picture of a crosshair i want to click and drag it to another window ... so if the game window is selected i can make it click on certain colors like a color clicker

Re: Need more Delphi help :/ sry...

anyone?

5

Re: Need more Delphi help :/ sry...

Oh, i deemed you have the answer, BTW why you need a HWND inside delphi you play with objects not windows, give me more descriptions.

is you drag objects inside your program ?

If your people come crazy, you will not need to your mind any more.

Re: Need more Delphi help :/ sry...

zaher wrote:

Oh, i deemed you have the answer, BTW why you need a HWND inside delphi you play with objects not windows, give me more descriptions.

is you drag objects inside your program ?

Ok ill try and show you so here is a screenshot:

The HWND is supposed to be dragged to the Game Client and the program im making gets the Image of the word from the client and types it in the client in order to wake up..... what this is that i am making is a Ocr im making for some friends who play this game that i used to play and they have auto programs which let them auto for them over night and get them stats and money but awhile ago the game developers cought on and made a sleep system of generated words converted into images...

7 (edited by zaher 2004-11-22 23:28)

Re: Need more Delphi help :/ sry...

i am sorry for lating, my computer have down (problems)  last days,
i think
- You need find a "Client game" Window Handle (HWND)
   FindWindow('', 'TBoT199 - RichyT');     FindWindow(classnamewindow, caption)
you can use
C:\Program Files\Microsoft Visual Studio\Common\Tools\SPYXX.EXE
to find classname of window istead caption

- Get image captured from it

procedure CaptureWindow;
var
  Hwnd:THandle;
  DC:THandle;
  R:TRect;
  Bitmap:TBitmap;
begin
  //Hwnd:=GetDesktopWindow;// desktop
  //Hwnd:=GetForegroundWindow; //by class using Spyxx.exe e.g. capturing task bar
  Hwnd:=FindWindow('Shell_TrayWnd', ''); //by class using Spyxx.exe e.g. capturing task bar
  DC:=GetDC(Hwnd);
  if DC<>0 then
  begin
    Bitmap := TBitmap.Create;
    GetClientRect(Hwnd, R);
    Bitmap.Width := R.Right-R.Left;
    Bitmap.Height := R.Bottom - R.Top;
    bitblt(Bitmap.Canvas.Handle,0,0, Bitmap.Width, Bitmap.Height, DC ,0,0, srcCopy);
    //do somthing with image in Bitmap like
    //Image1.Picture.Bitmap := Bitmap; assiging to image     or save to file
    Bitmap.SaveToFile('c:\1.bmp');
    Bitmap.Free;
  end;
end;

- anlyase the word images
sad i dont
- put a result word in a textbox or edit in the client game
your Client game writen in java so try to get handle of the edit by SpyXX first if it work we can use
sendmessage(hwnd_of_edit, WM_SETTEXT, 0, Longint(AText));
or
SetWindowText(hwnd_of_edit, AText);

If your people come crazy, you will not need to your mind any more.