AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: sending a|a
PostPosted: November 24th, 2005, 11:18 am 
Offline

Joined: June 16th, 2005, 12:23 pm
Posts: 92
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2005, 9:02 pm 
Offline

Joined: December 12th, 2004, 1:34 pm
Posts: 51
Nope, works fine here.

Sometimes such behaviour is caused by the editor you are using.
Try sending the keys to Notepad to verify this.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2005, 12:40 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
If you use multiple languages or keyboard layouts, it could also be due to the corresponding item in the FAQ.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2005, 3:14 pm 
Offline

Joined: June 16th, 2005, 12:23 pm
Posts: 92
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 26th, 2005, 10:16 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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, \


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 26 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