AutoHotkey Community

It is currently May 27th, 2012, 12:48 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: June 18th, 2011, 1:29 am 
Offline

Joined: August 5th, 2010, 10:30 pm
Posts: 30
I posted this on the Ask for Help forum but got no solution to this problem. I'd be interested to see if the following error can be reproduced.

I'm building a keyboard buffer with #UseHook, but it seems that when typing fast, keys are occasionally sent without triggering their associated hotkeys, as if AHK were off.

The problem occurs with the following script file, which I am including in full:

Code:
^+e::Edit
#r::Reload
#s::Suspend

~LWin Up::Return

doKeypress( key )
{
  SendInput %key%
  Return
}

#UseHook

j::doKeypress( "a" )
k::doKeypress( "b" )
l::doKeypress( "c" )
`;::doKeypress( "d" )

#UseHook, Off


When I open a blank Notepad document and strum the J, K, L, and ; keys, I should get only a, b, c, and d, but I am also seeing l's and ;'s appear in the typed text. This is strange to me, because nowhere in the script do I include an instruction to type l or ;.

Now, for some reason, the problem disappears when I comment out the #UseHook directives. I get only a, b, c, and d when strumming J, K, L, and ;, as expected.

What could be the cause of this? Is this a bug?

I am using AutoHotkey_L v1.1.00.00 with Windows 7 Starter on a newly-purchased Toshiba netbook.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 17th, 2011, 1:40 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
I was unable to produce any problems using the script and instructions provided, with v1.1.00.00 on Windows 7 x64. Perhaps it is a matter of timing - my system is somewhat faster than the average netbook.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: April 9th, 2012, 10:05 pm 
Offline

Joined: August 5th, 2010, 10:30 pm
Posts: 30
I did some retesting on my computer at work, and the problem still seems to occur. I found this bug while trying to implement a keyboard buffer and typing at ultra-high speed.

Work computer:
Windows XP
AutoHotkey 1.0.48.05 (not L this time)

I also tried using a 'keylog' variable, which seemed to work much better. However, every now and then a missed keystroke turns up, as if AHK isn't recognizing it.


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: Google Feedfetcher and 3 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:
cron
Powered by phpBB® Forum Software © phpBB Group