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 

"Input" - unexpected behavior

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



Joined: 23 Mar 2006
Posts: 41

PostPosted: Fri Nov 02, 2007 7:36 pm    Post subject: "Input" - unexpected behavior Reply with quote

Code:
Loop
    Input, var, L1


Quote:
Normally, the user's input is blocked.


However, when holding down a key long enough, the keystroke is sent (repeatedly) to the active window.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Fri Nov 02, 2007 7:41 pm    Post subject: Reply with quote

this is a duplicate of http://www.autohotkey.com/forum/viewtopic.php?t=25157 (which is in Ask for help)

it is a side effect of the repeat rate hitting keys before the loop loops again to start catching input. if you intend to block typing, this is not an efficient way of doing it.

What is your goal?
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
rousni



Joined: 23 Mar 2006
Posts: 41

PostPosted: Fri Nov 02, 2007 8:00 pm    Post subject: Reply with quote

my goal is to create a keyboard launcher like the Windows Run edit box, but using aliases and a tooltip displaying pressed keys
Back to top
View user's profile Send private message
Superfraggle



Joined: 02 Nov 2004
Posts: 848
Location: London, UK

PostPosted: Fri Nov 02, 2007 10:21 pm    Post subject: Reply with quote

Code:
setbatchlines -1

might help
_________________
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle
Back to top
View user's profile Send private message MSN Messenger
rousni



Joined: 23 Mar 2006
Posts: 41

PostPosted: Mon Nov 05, 2007 9:53 am    Post subject: Reply with quote

Code:
setbatchlines -1


doesn't help

Quote:
it is a side effect of the repeat rate hitting keys


Is it possible to change this rate temporarily (DllCall, SendMessage,...)?
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Mon Nov 05, 2007 5:27 pm    Post subject: Reply with quote

it is a keyboard setting on control panel
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Ian



Joined: 15 Jul 2007
Posts: 1157
Location: Enterprise, Alabama

PostPosted: Tue Nov 06, 2007 1:22 am    Post subject: Reply with quote

Code:
Input, var, L1 ; Same as the loop, always waits 1 char.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Nov 06, 2007 7:00 pm    Post subject: Reply with quote

dieom, he is not just waiting for one char. he is trying to blockinput without the blockinput command
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Laszlo



Joined: 14 Feb 2005
Posts: 4016
Location: Pittsburgh

PostPosted: Wed Nov 07, 2007 7:35 pm    Post subject: Reply with quote

Input in a Loop will often fail at fast typing, too. It was discussed a few times in the Forum. Input was not designed to be called rapidly. Consider using EndKeys in a single Input command, or access directly the keyboard buffer. Defining all the keyboard keys as HotKeys works, too. Sometimes HotStrings provide an even better solution.
Back to top
View user's profile Send private message
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