Hi Sup Forums, i wonder if you can help me find a piece of software. i'm not sure if it even exists

hi Sup Forums, i wonder if you can help me find a piece of software. i'm not sure if it even exists.

basically, it would let you draw the dimensions of a box and it would then force the mouse to stay within that box. you'd have to use a hotkey to make the program quit.

it seems simple enough but i can't find the right search terms for google to give me anything usable.

thanks!

Other urls found in this thread:

rtsoftwares.com/MouseLock/MouseLock.htm
msdn.microsoft.com/en-us/library/windows/desktop/ms648383.aspx
snakebytestudios.com/projects/apps/cursor-lock/
autohotkey.com/board/topic/61753-confining-mouse-to-a-window/
twitter.com/SFWRedditGifs

Here's a program that does exactly what you need:
[ONLY REGISTERED USERS CAN VIEW LINKS]

I don't know of any pre-made software that can do this, but it would be piss easy to do with an AutoIt script.

i have something similar, it's a software that will keep the mouse inside an opened window

i can get you a link for a few bucks, we can do bitcoin if u want

rtsoftwares.com/MouseLock/MouseLock.htm

how can I register on Sup Forums? Cheers

fucking make it yourself you nipwit

Followup post: If you want to do this in C++ then you would just use the ClipCursor function.

msdn.microsoft.com/en-us/library/windows/desktop/ms648383.aspx

that's a really nice find, thanks user.
5bux ain't a big deal, i'll keep the thread open tho in case anyone can find a FOSS alt.
my kung-fu isn't strong enough, i can barely manage powershell.

This program is literally just calling this function.

i think i found something.
snakebytestudios.com/projects/apps/cursor-lock/

almost, almost, tempted to make it for you

well that'd be very nice of you. with an interface and everything? i'd seriously appreciate it.
my email's fun [at] penis [dot] house.

the window in question is VMWare workstation, so keeping it within there is pointless - it needs to be within a pre-defined area.

also i'm well aware this is a troll post

autohotkey.com/board/topic/61753-confining-mouse-to-a-window/

Install AutoHotkey an this should be in an .ahk file:
ClipCursor( Confine=True, x1=0 , y1=0, x2=1, y2=1 ) {
VarSetCapacity(R,16,0), NumPut(x1,&R+0),NumPut(y1,&R+4),NumPut(x2,&R+8),NumPut(y2,&R+12)
Return Confine ? DllCall( "ClipCursor", UInt,&R ) : DllCall( "ClipCursor" )
}

f1::
WinGetPos, VarX, VarY, Width, Height, A
VarX2 := VarX + Width
VarY2 := VarY + Height
ClipCursor( True, VarX, VarY, VarX2, VarY2)
Return

f2::ClipCursor( False,0,0,0,0)


F1 enables mouse lock on current window, F2 disables. Modify ClipCursor function calls if you need a specific rect position

oh wow, thank you so much! i'll definitely use this.

just so i don't fuck up immediately: which line am i modifying to use a specific rectangle?

Looks to me like the first line. x1 and y1 are the top left point, x2 and y2 are the bottom right.

why does a function like that even exist?

The last one. The 0,0,0,0 arguments are x1,y1,x2,y2, so if you want a box rectangle from (5,5) to (50,60) you enter (5,5,50,60)
Those are the default arguments

Whoops, yeah, ignore me. I just woke up and apparently can't read yet.

Multimonitor and windowed games

You know about computers? That sounds hot. Wanna cum over to my place later and fuck? Here's my email:
[ONLY REGISTERED USERS CAN VIEW LINKS]

you're a gem, user. cheers.
thanks everyone!

Buy a Sup Forums pass ;)

he's right you know