Nova Posted December 5, 2004 Share Posted December 5, 2004 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) Link to comment Share on other sites More sharing options...
Guest Py7|-|[]/\/ Posted December 5, 2004 Share Posted December 5, 2004 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 Link to comment Share on other sites More sharing options...
the_lord_mephy Posted December 5, 2004 Share Posted December 5, 2004 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] Link to comment Share on other sites More sharing options...
upnorth Posted December 5, 2004 Share Posted December 5, 2004 AdlibEnable( "_blockmouse" ,50 ) ;Script Func _blockmouse() MouseMove( @DesktopWidth, @DesktopHeight, 0) EndFunc Link to comment Share on other sites More sharing options...
ezzetabi Posted December 5, 2004 Share Posted December 5, 2004 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 Link to comment Share on other sites More sharing options...
Nova Posted December 6, 2004 Author Share Posted December 6, 2004 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 Link to comment Share on other sites More sharing options...
ezzetabi Posted December 6, 2004 Share Posted December 6, 2004 Does not MouseTrap need a struct as parameter? Do AutoIt (as is) manage it? Link to comment Share on other sites More sharing options...
Nova Posted December 6, 2004 Author Share Posted December 6, 2004 Excellent simple excellent Tnx once again Lar Link to comment Share on other sites More sharing options...
Nova Posted December 6, 2004 Author Share Posted December 6, 2004 (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+trapIm 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 December 6, 2004 by nova Link to comment Share on other sites More sharing options...
Nova Posted December 6, 2004 Author Share Posted December 6, 2004 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> ? Link to comment Share on other sites More sharing options...
ezzetabi Posted December 6, 2004 Share Posted December 6, 2004 Try using @DesktopWidth and @DesktopHeight as position. Link to comment Share on other sites More sharing options...
Nova Posted December 6, 2004 Author Share Posted December 6, 2004 Try using @DesktopWidth and @DesktopHeight as position.Dosent that trap the mouse inside a box the size of the desktop ?Thus doing nothing ? Link to comment Share on other sites More sharing options...
Nova Posted December 6, 2004 Author Share Posted December 6, 2004 A rite like that,sry ezzetabi I miss understood you ! Thats really cool,tnx a million LAr Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now