I use AHK to help me type Arabic. Works like a charm. But if I type a diacritical in the middle of a word, AHK discards the top of the word, including that little thing, and starts over. If the bottom of the word is an AHK entry, it gets expanded.
I will use English apostrophe to make the point:
If
::re::regards
then
you're => you'regards
However, re'xxx is never expanded, which is OK.
I need to tell AHK, when necessary, that a certain character is legit. How?
Please help - How to tell AHK to treat symbol as legit character? Topic is solved
Re: Please help - How to tell AHK to treat symbol as legit character?
You could just left or right click after typing "you're". A single mouse click resets the hotstring recognizer.
So with the code:
Typing: You're [Left Mouse Click] [space] awesome!
Would return:
So with the code:
Code: Select all
::re::regards
Would return:
From the help file:You're awesome!
Any click of the left or right mouse button will reset the hotstring recognizer. In other words, the script will begin waiting for an entirely new hotstring, eliminating from consideration anything you previously typed (if this is undesirable, specify the line #Hotstring NoMouse anywhere in the script). This "reset upon mouse click" behavior is the default because each click typically moves the text insertion point (caret) or sets keyboard focus to a new control/field. In such cases, it is usually desirable to: 1) fire a hotstring even if it lacks the question mark option; 2) prevent a firing when something you type after clicking the mouse accidentally forms a valid abbreviation with what you typed before.
Re: Please help - How to tell AHK to treat symbol as legit character?
Appreciate the prompt reply.
Actually, I use arrows or {END} to reset recognizer. But it's pointless to think about the effect of upcoming chars.
I 'm wondering if there is a directive for this, like #Hotstring Endchars.
Thanks again.
Actually, I use arrows or {END} to reset recognizer. But it's pointless to think about the effect of upcoming chars.
I 'm wondering if there is a directive for this, like #Hotstring Endchars.
Thanks again.
Re: Please help - How to tell AHK to treat symbol as legit character?
I did a quick forum check for hotstring topics and found https://autohotkey.com/boards/viewtopic ... 14&t=30463 post where lexikos posted on this exact topic, I believe. Unfortunately, it does not look like this was resolved in that thread. Someone mentioned a link to dynamic hotstring as a final reply to the post, though, so maybe that might help you? Beyond that, it would be beyond me as to how to resolve the issue automatically.
Re: Please help - How to tell AHK to treat symbol as legit character?
It most likely is the same issue, although the example (apostrophe) is not, since apostrophe is not a combining/non-spacing mark. Apostrophe (or single-quote) simply isn't a word character, although treating it as one would probably work well enough.
The regex based dynamic hotstring recognisers can work around the issue by doing negative assertions, like (?<![\w']) (not preceded by a word character). You can probably use character classes/ranges to cover non-spacing marks.
I'm pretty sure I can fix the diacritic issue, but;
The regex based dynamic hotstring recognisers can work around the issue by doing negative assertions, like (?<![\w']) (not preceded by a word character). You can probably use character classes/ranges to cover non-spacing marks.
I'm pretty sure I can fix the diacritic issue, but;
I wrote:I'm not really sure whether this change would be correct for all non-spacing marks, or all non-spacing diacritic marks, or neither, as I know very little about the use of non-spacing marks in any language.
Re: Please help - How to tell AHK to treat symbol as legit character?
Please try this test build and let me know in the bug report thread whether it solves the problem (with Arabic, not apostrophe).
Re: Please help - How to tell AHK to treat symbol as legit character?
Sorry lexikos. I got some major things in life and completely forgot the thread. My sincere apology.lexikos wrote:Please try this test build and let me know in the bug report thread whether it solves the problem (with Arabic, not apostrophe).
Please tell me what I do with the zip file. Do I need to install it along with AHK or instead thereof?
Thanks a million for the reply.
Re: Please help - How to tell AHK to treat symbol as legit character?
The zip contains some AHK exe files, you extract them to a folder, and then drag-and-drop ahk files onto them to run your scripts. No installation is necessary.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Please help - How to tell AHK to treat symbol as legit character? Topic is solved
I think the fix was already included in v1.1.26.00.
Re: Please help - How to tell AHK to treat symbol as legit character?
Works great.jeeswg wrote:The zip contains some AHK exe files, you extract them to a folder, and then drag-and-drop ahk files onto them to run your scripts. No installation is necessary.
And better, V1.1.29 seems to take care of the problem.
Thank you. Thanks lexikos.
Who is online
Users browsing this forum: No registered users and 382 guests