AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BlockInput, Mouse doesn't work as expected

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Thu May 19, 2005 8:22 am    Post subject: BlockInput, Mouse doesn't work as expected Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Thu May 19, 2005 12:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
corrupt



Joined: 29 Dec 2004
Posts: 2436

PostPosted: Sat May 21, 2005 3:43 pm    Post subject: Reply with quote

nomousy
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat May 21, 2005 3:57 pm    Post subject: Reply with quote

Thanks; I forgot about that method.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group