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 

How to freeze/un-freeze mouse?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
/crystal/



Joined: 28 Aug 2007
Posts: 15

PostPosted: Tue Aug 28, 2007 11:44 pm    Post subject: How to freeze/un-freeze mouse? Reply with quote

I need a simple way to freeze and un-freeze the mouse cursor (not hidden) for an application --- can someone please show me how this can be done?
Back to top
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 552

PostPosted: Tue Aug 28, 2007 11:47 pm    Post subject: Reply with quote

Is this the command your looking for - BlockInput
_________________

HTH...
Back to top
View user's profile Send private message
Z Gecko
Guest





PostPosted: Tue Aug 28, 2007 11:48 pm    Post subject: Reply with quote

check out: BlockInput
Back to top
trik



Joined: 15 Jul 2007
Posts: 1299

PostPosted: Tue Aug 28, 2007 11:48 pm    Post subject: Reply with quote

Code:
MouseGetPos, X, Y
Loop
{
MouseMove, %X, %Y%
}


Hope this works.
_________________
.com / .net
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 7698
Location: Germany (but I only speak English)

PostPosted: Wed Aug 29, 2007 1:44 am    Post subject: Reply with quote

three answers in 4 minutes, and none from me. the forum is hopping today
_________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me.
Back to top
View user's profile Send private message Visit poster's website
TomMerkel
Guest





PostPosted: Fri Sep 04, 2009 10:05 am    Post subject: Reply with quote

Hi!

I am new to AutoHotkey and I tried the code from Trikster, but unfortunately it doesn't work. That's the error:
-----
Error at line4.

Line text: %X
Error: This parameter contains a variable name missing its ending percent sign.
The program will exit.
----------

This is how I tried it:
1. Copy/Paste the code from Trikster into a notepad
2. Save the notepad-file as "mousefreeze.ahk"
3. Executed the file.

Was that correct?
Could you please help me with script getting it working, that would be great!
By the way, how can i unfreeze the mouse again? It would be good to have an extra script for that.

Thanks for your help! Smile

Best regards,
Tom
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 7698
Location: Germany (but I only speak English)

PostPosted: Fri Sep 04, 2009 10:32 am    Post subject: Reply with quote

that's because the parameter contains a variable name missing its ending percent sign.

Change %X to %X% to restore it's missing percent sign.
_________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me.
Back to top
View user's profile Send private message Visit poster's website
TomMerkel
Guest





PostPosted: Fri Sep 04, 2009 10:42 am    Post subject: Reply with quote

Thank you for your quick reply:)

And how can I unfreeze the mouse again?
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 7698
Location: Germany (but I only speak English)

PostPosted: Fri Sep 04, 2009 10:48 am    Post subject: Reply with quote

Esc::Exitapp

Please also dig around on the forums there are quite a few interesting scripts that are related.

Alternate plan:
read the link in my sig (Loops) but instead of looping a keypress, you are looping a mousemove.
_________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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