ioctl Posted June 30, 2005 Posted June 30, 2005 BlockInput () disables or enables both of them. I want to disable only MOUSE. Anyone knows ? Tnx. P.
oobnuker Posted June 30, 2005 Posted June 30, 2005 (edited) BlockInput () disables or enables both of them.I want to disable only MOUSE. Anyone knows ?Tnx. P.<{POST_SNAPBACK}>I believe you can set Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MouclassValue: StartData: 0x00000004 (Hex)To disable the mouse, but I think it only works after a reboot.Set it back to 0x00000001 for normal operation, again, you would have to reboot. Edited June 30, 2005 by oobnuker - oobnuker-- http://perfectisolation.org
ioctl Posted June 30, 2005 Author Posted June 30, 2005 Thanks oobnuker but i want it without reboot! Any other ideas ? P.
w0uter Posted June 30, 2005 Posted June 30, 2005 larry made a mousetrap function is his au3extra(?).dll (still trying to figure out how he did that ) My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
/dev/null Posted June 30, 2005 Posted June 30, 2005 ClipCursor API<{POST_SNAPBACK}>Hm, so this code should do the trick, but it does not work on my system. Return code looks good. Who knows what's wrong?#include <GUIConstants.au3> msgbox(0,"START","Will block mouse now") block_mouse() sleep(5000) unblock_mouse() msgbox(0,"STOP","Mouse is unblocked now") func unblock_mouse() $rect = DllStructCreate("uint;uint;uint;uint") DllStructSetData($rect,1,0) DllStructSetData($rect,2,0) DllStructSetData($rect,3,@DesktopWidth) DllStructSetData($rect,4,@DesktopHeight) $rect_ptr = DllStructGetPtr($rect) $retval = DllCall("user32.dll","long","ClipCursor","long_ptr",$rect_ptr) msgbox(0,"","Retval: " & $retval[0] & " " & @error) endfunc func block_mouse() $pos = MouseGetPos() $rect = DllStructCreate("uint;uint;uint;uint") DllStructSetData($rect,1,$pos[0]) DllStructSetData($rect,2,$pos[1]) DllStructSetData($rect,3,$pos[0]+1) DllStructSetData($rect,4,$pos[1]+1) $rect_ptr = DllStructGetPtr($rect) $retval = DllCall("user32.dll","long","ClipCursor","long_ptr",$rect_ptr) msgbox(0,"","Retval: " & $retval[0] & " " & @error) endfuncCheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
w0uter Posted June 30, 2005 Posted June 30, 2005 i made this Func _MouseTrap($l_left, $l_top, $l_right, $l_bottom) $v_Rect = DllStructCreate('int;int;int;int') DllStructSetData($v_Rect, 1, $l_left) DllStructSetData($v_Rect, 2, $l_top) DllStructSetData($v_Rect, 3, $l_right) DllStructSetData($v_Rect, 4, $l_bottom) $ai_Ret = DllCall('user32.dll', 'int', 'ClipCursor', 'ptr', DllStructGetPtr($v_Rect)) ConsoleWrite('Error: ' & @ERROR & @LF) DllStructDelete($v_Rect) Return $ai_Ret[0] EndFunc it works but just for a mili-second. WHile 1 ConsoleWrite('Func: ' & _MouseTrap(10, 10, 100, 100) & @LF) WEnd does work. but as soon as the program terminates. the trap is gone. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
ioctl Posted July 1, 2005 Author Posted July 1, 2005 Nice job but not very useful. I need something like /dev/null script that you can block or unblock mouse and in the meantime to run another scripts. P.K.
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