VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Mouse HotKeys (Updated)

Aidman  (1 Submission)   Windows API Call/Explanation   Visual Basic 3.0   Advanced   Wed 3rd February 2021

An easy, very fast and well explained program that let’s you control your mouse courser actions by custom keyboard keys and custom movements speed. Showing the easiest way of hotkeys and controlling your mouse cursor movements and button actions. It has been tested and works in all Windows platforms (95, 98, ME, NT, 2000, XP) and the most games like Half-life (Counter-Strike).
There are many functions including:
* Moving at all directions
* Left, right and middle buttons
* Single clicking
* Double clicking
* Drag and drop
* Several keys down and up at once
All in just one single small and very fast module sub, the main sub. Whit out anything else like form, dll or ocx. Read "Assumes" in the Source Code for updated using instructions and notes.

Assumes
See the new Numpad Keys! When using the program in games, increase the AddSpeed and MaxSpeed, remove also the Doevents function.

API Declarations
Option Explicit ' Of course
' Position variable type for api
Private Type POINTAPI
X As Long
Y As Long
End Type

' Windows api declartions
Private Declare Sub Sleep Lib "Kernel32" (ByVal milliseconds As Long)
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwExtraInfo As Long)
' Mouse event messages
Const MOUSEEVENTF_ABSOLUTE = 32768 ' not used in this program
Const MOUSEEVENTF_LEFTDOWN = 2
Const MOUSEEVENTF_LEFTUP = 4
Const MOUSEEVENTF_MIDDLEDOWN = 32
Const MOUSEEVENTF_MIDDLEUP = 64
Const MOUSEEVENTF_MOVE = 1
Const MOUSEEVENTF_RIGHTDOWN = 8
Const MOUSEEVENTF_RIGHTUP = 16

Rate Mouse HotKeys (Updated) (3(3 Vote))
Mouse HotKeys (Updated).bas

Mouse HotKeys (Updated) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters