VB.NET Move mouse / Mouse drag down - Recoil macro

Posts 1–9 of 9 · Page 1 of 1
VB.NET Move mouse / Mouse drag down - Recoil macro
So I've been looking around and quickly found a simple way of moving the cursor position
Cursor.Position = New Point(X, Y)
I put it in a loop and happy days - The cursor moves perfectly
However, it does not move in game. (doesn't matter the game, csgo, rust etc)
I presume these games are blocking this method or this method simple doesn't work for my intended purpose.
I would like my mouse in game to move downwards along the y axis - Does anyone know of a way of doing this?
Cheers
does it work in window mode?
Quote Originally Posted by Sazor98 View Post
does it work in window mode?
Nope. It just works outside of the game
Try TopMost settings, sometimes in the past I've done a similar project and using TopMost seems to be working, some games it doesn't work as the games detect anything to do with TopMost.
I messed around with topmost however it doesn't seem to help, mind sharing your src?
I don't have it anymore, but give this a shot;


Code:
Private Declare Function SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, Y, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const TOPMOST_FLAGS = SWP_NOMOVE Or SWP_NOSIZE

'call it with this
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS
I've always used Win32Api's to move the cursor. X,Y=0 is topleft of main monitor, of course
Code:
Public Declare Auto Function SetCursorPos Lib "User32.dll" (ByVal X As Integer, ByVal Y As Integer) As Long

SetCursorPos(X,Y)
Quote Originally Posted by imzyphon View Post
So I've been looking around and quickly found a simple way of moving the cursor position
Cursor.Position = New Point(X, Y)
I put it in a loop and happy days - The cursor moves perfectly
However, it does not move in game. (doesn't matter the game, csgo, rust etc)
I presume these games are blocking this method or this method simple doesn't work for my intended purpose.
I would like my mouse in game to move downwards along the y axis - Does anyone know of a way of doing this?
Cheers
Have you enabled "Raw Input" in CSGO?
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?