AutoHotkey Community

It is currently May 24th, 2012, 2:44 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: January 17th, 2007, 1:09 pm 
Offline

Joined: November 14th, 2006, 4:40 pm
Posts: 16
Im a greenie on this and Im trying to a script that disable mouseinput (actually a touchpad) when you are typing.

I think the pseudocode will look something like this:

Code:
loop
{
    If keyboard_interaction
    {
    disable mouse
    }
    If No keyboard_interaction in 500ms
    {
    enable_mouse
    }
}


thx

/FabianBengtsson


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2007, 3:57 pm 
Offline

Joined: September 2nd, 2006, 6:39 am
Posts: 279
Location: Scotland
There are probably nicer ways to do it but this is the first thing that came to mind.
Code:
loop,
{
Input, KeyVar, T0.5 L1 V
If ErrorLevel != TimeOut
BlockInput, MouseMove
Else
BlockInput, MouseMoveOff
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2007, 4:28 pm 
Offline

Joined: November 14th, 2006, 4:40 pm
Posts: 16
thx.. I found a way on my own as well:

Code:
loop {
Input, SingleKey,I V L1
BlockInput, MouseMove
SetTimer, MouseOn, 500 ; Set mouselock timeout. Eg. the time it takes to move your hand from the keyboard to touchpad
}

MouseOn:
    BlockInput, MouseMoveOff
    SetTimer, MouseOn, Off
Return
                   

I don't know which one is the better.

_________________
Don't capture me again!!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: azure, engunneer, jyloup, KenC, Sambo and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group