Jump to content
bosshunts

Ghost Mouse

Recommended Posts

Hello. I was wondering if there was anyway to make this program click the screen somewhere then go back to the position it was in before the click?

I know I explain that weird so I'll give an example.

 

I have this program set up to click on the screen when I move. I am wondering if there is a way to keep the mouse in the same position and still click the designated spot on the screen.

Link to comment
Share on other sites

GetMousePos(P.X, P.Y);

ClickMouse(100, 100...

SetMousePos(P.X, P.Y);

I don't understand what this is going to do?

 

- - - Updated - - -

 

This is the code I am using at the moment.

begin
 Int :=0;
repeat      
 if GetHPPercent() < 80 then
 ClickMouse(591, 52, mbLeft);
 if GetManaPercent() < 80 then
 ClickMouse(982, 422, mbRight);
 Wait(900);   
   inc(Int);
 until Int = 9999;
end.

Everytime I click, my mouse goes to the positions. I am wondering how I can make the mouse stay in the same spot but still Click on the positions.

Is this possible?

Link to comment
Share on other sites

This is exactly the kind of thing I want. Do you have a script for it?

The only option is to do what Wanted mentioned, but that won't work without a call to "Wait"-function due to the latency between you and the game, and the softwares response-time.

 

procedure MouseClickReturn(X,Y: Integer; Btn:TMouseButton; WaitMS:Integer);
var
 P:TPoint;
begin
 GetMousePos(P.X, P.Y);
 ClickMouse(x,y, Btn);
 Wait(WaitMS);
 SetMousePos(P.X, P.Y);
end;

begin
 MouseClickReturn(100,100, mbRight, 150);
end.

The last number "150" is the wait-time (in millisec) before it moves back to it's original position. If the game has low response-time you can decrease the value, in worst case you will have to increase the value.

This will not be as ghosty as you may want. and it will interrupt what ever else you are doing.

Edited by slacky
Link to comment
Share on other sites

The only option is to do what Wanted mentioned, but that won't work without a call to "Wait"-function due to the latency between you and the game, and the softwares response-time.

 

procedure MouseClickReturn(X,Y: Integer; Btn:TMouseButton; WaitMS:Integer);
var
 P:TPoint;
begin
 GetMousePos(P.X, P.Y);
 ClickMouse(x,y, Btn);
 Wait(WaitMS);
 SetMousePos(P.X, P.Y);
end;

begin
 MouseClickReturn(100,100, mbRight, 150);
end.

The last number "150" is the wait-time (in millisec) before it moves back to it's original position. If the game has low response-time you can decrease the value, in worst case you will have to increase the value.

This will not be as ghosty as you may want. and it will interrupt what ever else you are doing.

Although a TOTAL ghost mouse would be Fantastic. This method worked great. You really seem like you know what you are doing :D Ty

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