| View previous topic :: View next topic |
| Author |
Message |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Thu May 19, 2005 8:22 am Post subject: BlockInput, Mouse doesn't work as expected |
|
|
HI,
I did the script for a newbee and can across this problem.
He wanted a button that temporarely disables the mouse.
I used "Shift" as the key to block mouse input.
But the mouse isn't block. Did I made a mistake?
| Code: | BlockStatus := False
#m:: SetTimer, DisableMouse, 1 ;turn on the mechanism
#n:: SetTimer, DisableMouse, Off ;turn off the mechanism
DisableMouse:
GetKeyState, OutputVar, Shift
If (OutputVar = "D" and not BlockStatus)
{
BlockInput, Mouse
BlockStatus := True
}
Else If (OutputVar <> "D" and BlockStatus)
{
BlockInput, Off
BlockStatus := False
}
return |
_________________ Ciao
toralf  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Thu May 19, 2005 12:52 pm Post subject: |
|
|
The special "Mouse" mode of BlockInput does not actually block the mouse except during a MouseMove/Click/Drag command.
Also, BlockInput cannot selectively block the mouse without blocking the keyboard. I've clarified this in the help file: "When BlockInput is in effect, both the mouse and keyboard are disabled. This is a limitation of the system feature used to implement this command."
See BlockInput for details. |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2436
|
Posted: Sat May 21, 2005 3:43 pm Post subject: |
|
|
| nomousy |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sat May 21, 2005 3:57 pm Post subject: |
|
|
| Thanks; I forgot about that method. |
|
| Back to top |
|
 |
|