Sign in to follow this  
Followers 0
Nova

Blocking the mouse

13 posts in this topic

Is there anyway to just disable the mouse input and leave the keyboard input enabled ?

The following blocks both keyboard and mouse input

BlockInput (1)

Share this post


Link to post
Share on other sites



You can force the mouse in the beginning of the script to stay in one place...

While 1

MouseClick("left", x, y, 1, 0)

WEnd

Share this post


Link to post
Share on other sites

that wouldn't work while a script is running because you would be stuck in the while statement. However, you could make a file with the name of your script. (myscript.exe):

Run("myrealscript.exe")
While 1
MouseMove(1, 1, 1)
Wend

And make myrealscript.exe your real script. Then when you want to run it open myscript.exe.


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites

AdlibEnable( "_blockmouse" ,50 )
;Script

Func _blockmouse()
MouseMove( @DesktopWidth, @DesktopHeight, 0)
EndFunc

:idiot:

Share this post


Link to post
Share on other sites

Or if you want to have some fun...

AdlibEnable( "_BlockMouse" ,50 )
;Script

Func _BlockMouse()
   MouseMove( Int(Random(0,@DesktopWidth+1)), Int(Random(0,@DesktopHeight+1)), 0)
EndFunc

Share this post


Link to post
Share on other sites

Na that no use really,it looks really cheep u cna still drag the mouse on screen for a few seconds with a quick slide of the mouse !

I need the mouse to be disabled not partially hidden off screen with a flickering madness :idiot:

Share this post


Link to post
Share on other sites

Does not MouseTrap need a struct as parameter? Do AutoIt (as is) manage it?

Share this post


Link to post
Share on other sites

Excellent simple excellent

Tnx once again Lar :idiot:

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Does not MouseTrap need a struct as parameter? Do AutoIt (as is) manage it?

Its in here somewhere, 8th post down I think !

http://www.autoitscript.com/forum/index.ph...lite=mouse+trap

Im a bit confussed doI have to specify the location of the dllwhen running ti or put it in the same folder as teh script calling it ?

Edited by nova

Share this post


Link to post
Share on other sites

DLLCall("AU3Xtra.dll", "int", "MouseTrap", "int", 0, "int", 0, "int", 0, "int", 0 )
Sleep(5000)
DLLCall( "AU3Xtra.dll", "int", "MouseTrap", "int", -1, "int", -1, "int", -1, "int", -1 )

The above code traps the mouse in the topleft corner of my screen

I cant seem to force the mouse off screen with minus cordinates or off screen with huge plus coridinates.

My screen res is 800x600

ive tryed

DLLCall("AU3Xtra.dll", "int", "MouseTrap", "int", -100, "int", 0, "int", 0, "int", 0 )
Sleep(5000)
DLLCall( "AU3Xtra.dll", "int", "MouseTrap", "int", -1, "int", -1, "int", -1, "int", -1 )

and

DLLCall("AU3Xtra.dll", "int", "MouseTrap", "int", 900, "int", 0, "int", 0, "int", 0 )
Sleep(5000)
DLLCall( "AU3Xtra.dll", "int", "MouseTrap", "int", -1, "int", -1, "int", -1, "int", -1 )

I know ur function is called mouse trap but can I use it to trap the mouse off screen <hidden> ?

Share this post


Link to post
Share on other sites

Try using @DesktopWidth and @DesktopHeight as position.

Share this post


Link to post
Share on other sites

Try using @DesktopWidth and @DesktopHeight as position.

Dosent that trap the mouse inside a box the size of the desktop ?

Thus doing nothing ?

Share this post


Link to post
Share on other sites

A rite like that,sry ezzetabi I miss understood you !

Thats really cool,tnx a million LAr

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0