Results 1 to 9 of 9
  1. #1
    imzyphon's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    31
    Reputation
    10
    Thanks
    0

    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

  2. #2
    Sazor98's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    X:13 Y:3 Z:7
    Posts
    151
    Reputation
    10
    Thanks
    40
    does it work in window mode?

  3. #3
    imzyphon's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    31
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Sazor98 View Post
    does it work in window mode?
    Nope. It just works outside of the game

  4. #4
    Dab1996426's Avatar
    Join Date
    Jun 2015
    Gender
    female
    Posts
    2,626
    Reputation
    410
    Thanks
    3,429
    My source can do this: https://github.com/DetreRaison/GameP...aster/Form1.vb



    This is fairly simple, (pseudo code)

    if Cursor.position =+ X then
    Cursor.Position = Y
    end if


    Just move the cursor back to center screen everytime it goes off a certain amount.

  5. #5
    Mrtm4n's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    22
    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.

  6. #6
    imzyphon's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    31
    Reputation
    10
    Thanks
    0
    I messed around with topmost however it doesn't seem to help, mind sharing your src?

  7. #7
    Mrtm4n's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    22
    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

  8. #8
    lagzs's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    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?

  9. #9
    SimpleAOB's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    151
    My Mood
    Amused
    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)

Similar Threads

  1. [Solved] Everytime I move my mouse I lag
    By MLX in forum Realm of the Mad God Help & Requests
    Replies: 0
    Last Post: 04-17-2015, 07:21 AM
  2. [Release] Bloody V Series Mouse - AK 5C - No Recoil macro
    By Matt-One in forum Battlefield 4 Hacks & Cheats
    Replies: 30
    Last Post: 11-18-2013, 02:23 PM
  3. [Release] Bloody V Series Mouse - Type88 LMG - No Recoil macro
    By Matt-One in forum Battlefield 4 Hacks & Cheats
    Replies: 4
    Last Post: 11-13-2013, 05:16 AM
  4. [Help Request] Crossfire lags when I move my mouse.
    By Cemenela in forum CrossFire Help
    Replies: 6
    Last Post: 08-03-2013, 07:46 PM
  5. Replies: 21
    Last Post: 07-03-2013, 01:11 PM