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 

sending a|a

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



Joined: 16 Jun 2005
Posts: 92

PostPosted: Thu Nov 24, 2005 10:18 am    Post subject: sending a|a Reply with quote

Sending the sequence a|a produces aa\. (The character between the a's is ASCII 124.)

This happens with both hotstrings and the Send command.

thomasl

PS: Win2K SP4, 1.40.08
Back to top
View user's profile Send private message
mario_a



Joined: 12 Dec 2004
Posts: 51

PostPosted: Thu Nov 24, 2005 8:02 pm    Post subject: Reply with quote

Nope, works fine here.

Sometimes such behaviour is caused by the editor you are using.
Try sending the keys to Notepad to verify this.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Fri Nov 25, 2005 11:40 am    Post subject: Reply with quote

If you use multiple languages or keyboard layouts, it could also be due to the corresponding item in the FAQ.
Back to top
View user's profile Send private message Send e-mail
thomasl



Joined: 16 Jun 2005
Posts: 92

PostPosted: Fri Nov 25, 2005 2:14 pm    Post subject: Reply with quote

No, single language.

But I have found the problem. I have this:

+\:: Send, \

and this:

^+\:: Send, |

What happens (not entirely illogical but also not entirely what I would have expected) is that the sent | triggers the first hotkey (ie +\).

Nevertheless, something fishy must be going on because once I changed the second definition to

^+\:: Send, a|a

I received aa\. I now understand why there is a \ but I do not understand why it comes up *after* the second a.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Sat Nov 26, 2005 9:16 pm    Post subject: Reply with quote

That happens due to the following sequence:
1) Pressing the hotkey causes the Send command to trigger another hotkey (as you know).
2) The Send command is designed to be uninterruptible, so its triggering of another hotkey waits until the Send finishes.
3) The second hotkey runs and sends its character.

This issue can be solved by putting a $ prefix before any hotkey you don't want triggerable by the Send command. This makes it into a hook hotkey. For example: $+\:: Send, \
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