Page 1 of 1

[TOOL] Warcraft III Mouse Clipper

Posted: Wed Oct 28, 2015 10:26 pm
by B4rt0
Image

Info
This tiny C++ console application automatically locks mouse inside Warcraft III window everytime it is active.
By default it hides the console window and closes itself after you close W3.
It supports both RoC and TFT, and should work on all Windows OS, both 32 and 64-bit.
It will not open if Warcraft III window is not present and will prevent from running multiple instances.

How to use
Open Warcraft III, then open the application to lock mouse inside the window.
To deactivate it you have to ALT+TAB from W3 window.
To activate it again you have switch back to W3 window by selecting it from taskbar or ALT+TAB back to it.
To close it, you have to close the game or End Task in Task Manager (Ctrl+Shift+ESC). Currently there is no other way. I forgot - you can set silent mode to 0 and then you can close it by closing console window.

Settings
You can customize settings such as clipping area offset, frequency of checking and console window hiding in INI file.
Spoiler!

Code: Select all

[ClipAreaOffset]
; If your cursor is too far from edges you should lower the values, otherwise you should increase them.
offsetTop=31
offsetLeft=8
offsetRight=-8
offsetBottom=-8

[GeneralSettings]
; Frequency [ms] in which program checks window state; default value is 500
refreshRate=500
; If set to 1, console window will not show. If set to 0 console window will be displayed.
silentMode=1


Source Code
Code licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/)
Source Code

Download
Direct download
Dropbox

Re: [TOOL] Warcraft III Mouse Clipper

Posted: Thu Oct 29, 2015 4:26 am
by Lee-XIII
This only works windows mode?

Re: [TOOL] Warcraft III Mouse Clipper

Posted: Thu Oct 29, 2015 4:55 am
by Halibel
Lee-XIII wrote:This only works windows mode?


Yes of course.

I play WC3 on window mode only so it's helpful, thanks :).

Re: [TOOL] Warcraft III Mouse Clipper

Posted: Thu Oct 29, 2015 11:02 am
by B4rt0
Lee-XIII wrote:This only works windows mode?

What's the use of locking mouse in fullscreen mode while it's already been locked by the game.It only makes sense for windowed mode.

Re: [TOOL] Warcraft III Mouse Clipper

Posted: Fri Oct 30, 2015 9:55 am
by Lee-XIII
cursor lock still better than this, it navigate the mouse.