ON 0x01 (left mouse) click pull mouse down

Posts 1–15 of 17 · Page 1 of 2
ON 0x01 (left mouse) click pull mouse down
i have tried to make it but i have failed too many times
maybe you guys could help me up?
i dont wanna paste my fail code here its super shitty
i tried mouseevents that thingy didnt work for me for some reason

im making the pull mouse down to use on
recoil control


edit: got something done
but pulls super fast ;D
to check if the mouse is being held down check for 0x8000
Sooo, is this solved or are you still needing assistance?
not solved im kinda newb to these mouse control coding
so anyone could help bit more than that shigure said
if (GetAsyncKeyState(1) & 0X8000) {
move the mouse down.
}
this will check if you press left click . or you can try with while
well i need new pull mouse down code
mine just goes boom and watching ground
tried changing it but still
Quote Originally Posted by fwsefwsgrgwhergr View Post
well i need new pull mouse down code
mine just goes boom and watching ground
tried changing it but still
Why don't you try showing us your code.
Code:
int x, y;
		POINT pt;
		GetCursorPos(&pt); 
		Width = int(65536.0 / 1920 * pt.Width + 5); 
		Height = int(65536.0 / 1080 * pt.Height + 5); 
		mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, x, y, 0, 0)
Quote Originally Posted by fwsefwsgrgwhergr View Post
Code:
int x, y;
		POINT pt;
		GetCursorPos(&pt); 
		Width = int(65536.0 / 1920 * pt.Width + 5); 
		Height = int(65536.0 / 1080 * pt.Height + 5); 
		mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, x, y, 0, 0)
Try using float not int, I don't know if is this the problem, but u should test, and anyway with that part of code there is not much too help

And u are not even reading punch and angles? So why don't u use a AHK script??...
because then i would have two hacks (kinda)
Quote Originally Posted by fwsefwsgrgwhergr View Post
because then i would have two hacks (kinda)
So at least make a pseudo code else no one can help with your "secret code"

With that part you showed we just see the mouse movement, but for? Where u get x y? Memory reading? How u are reading...

No one can help if u first don't help
UFF SORRY FOR CAPSLOCK BUT DONT YOU UNDERSTAND IT DOESNT READ MEMORY? i just need new code that pulls mouse down.
i already got that when VK_LBUTTON down code
but now i need the pull down mouse code
and it doesnt read memory or anything to do with memory
just basic c++ that pulls mouse down
also sorry my code failed bit heres new one:
Code:
int Width, Height;
		POINT pt;
		GetCursorPos(&pt); 
		Width = int(65536.0 / 1920 * pt.Width + 5); 
		Height = int(65536.0 / 1080 * pt.Height + 5); 
		mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, x, y, 0, 0)
Quote Originally Posted by fwsefwsgrgwhergr View Post
UFF SORRY FOR CAPSLOCK BUT DONT YOU UNDERSTAND IT DOESNT READ MEMORY? i just need new code that pulls mouse down.
i already got that when VK_LBUTTON down code
but now i need the pull down mouse code
and it doesnt read memory or anything to do with memory
just basic c++ that pulls mouse down
also sorry my code failed bit heres new one:
Code:
int Width, Height;
		POINT pt;
		GetCursorPos(&pt); 
		Width = int(65536.0 / 1920 * pt.Width + 5); 
		Height = int(65536.0 / 1080 * pt.Height + 5); 
		mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, x, y, 0, 0)
Oh sorry if is not specified, so the only thing that I gonna say is that you are doing this:
MOUSE middle screen suppose that is x and y
After press mouse click
MOUSE position = w, z

You are setting them not making it down, try something with loops, like for(i=0,i<10,i++) mouse_event... i... Sleep(100)

And i been the angle to go down, so every 100 sec it will add something to i (angle) and set it

So it will "smooth" and set them slowly, I can't explain better since I'm on phone, maybe if I have time I try to explain

I think is this the reason that is happening, didn't tested, just a speculation
Like this let me draw a bit to make a little easy to understand the way:



So your code is telling that, you get the screen dimensions and set it down but it don't go as the objective, it jumps from A to B as in draw, it show be like this:



So you go setting the position from point A to B like A A¹ A² A³ a³ a² a¹ ab b¹ b² b³ B³ B² B¹ B

More clear:
* What you are doing:
A -> B

* What should be done:
A A¹ A² A³ a³ a² a¹ ab b¹ b² b³ B³ B² B¹ B

But how could that be done?
-> Looping

Just a pseudo-code

Code:
Code:
int posX = 0; //You have to set it to middle of screen where your Crosshair is... This one will not move since it will only move in X (sides)
int posY = 0; //You have to set it to middle of screen where your Crosshair is up/down (you don't want it to go up, so you just gonna set it down

if (GetAsyncKeyState(1) & 0x8000) {
   for(int i = 0; i < 255 /* A Number that you want to stop it going down ( You have to test by Yourself ) */; i++) { //Why not a WHILE? Think... You don't need to go forever down, so with a FOR LOOP, you can limit the amount
      if (posY <= MIDDLE_SCREEN_Y) {
           posY -= 10; //Any ammount you want to go down ( You have to test by Yourself )
           mouseEvent_Down(posX /* We don't need to move X */, posY);
           Sleep(100 /*Amount of time/ms you want ms*/);
      }     
   }
}
...
So that is what you should do...

At least HIT THANKS... And next time try to read what you are doing and explain better what you want, any question post here or add me on skype, i will be back coding now...

-------------------------
Edit:
Just a new idea in code that may work better...
Code:
int posX = 0; //You have to set it to middle of screen where your Crosshair is... This one will not move since it will only move in X (sides)
int posY = 0; //You have to set it to middle of screen where your Crosshair is up/down (you don't want it to go up, so you just gonna set it down

if (GetAsyncKeyState(1) & 0x8000) {
   for(int i = 0; i < 255 /* A Number that you want to stop it going down ( You have to test by Yourself ) */; i++) { //Why not a WHILE? Think... You don't need to go forever down, so with a FOR LOOP, you can limit the amount
      if (posY <= MIDDLE_SCREEN_Y && /* AND */ posY > 0) {
           posY -= 10; //Any ammount you want to go down ( You have to test by Yourself )    
      }
      else {  //WILL happen if 0 reachs and is in loop
           posY = MIDDLE_SCREEN_Y; //WILL hard set back to middle screen
      }
      mouseEvent_Down(posX /* We don't need to move X */, posY);
      Sleep(100 /*Amount of time/ms you want ms*/);
   }
}
Posts 1–15 of 17 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?