 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
kakarukeys
Joined: 28 Sep 2009 Posts: 85
|
Posted: Fri Feb 05, 2010 8:50 pm Post subject: |
|
|
| hugov wrote: | | kakarukeys wrote: | | AHK uses win32 api's GetCaretPos to obtain caret position, before using the function, it attaches input between the script thread and the foreground window's thread. Check the AHK source code for more details. | Not likely as I don't know C++ nor care to learn about it. | kakarukeys wrote: | possible solution for Firefox:
(1) XPCOM
(2) ACC
(3) ImageSearch
(4) using Last-mouse-click position + helper window | ACC would be the only method as there is acc.ahk noone will develop XPCOM or something else. If you find a solution post it, I'm sure I won't be able to find it ... |
Me too. I'm a Python programmer, not so skilled in C++. I stopped tackling this problem after realizing my limitation. Post a message here, hopefully someone else can find it from the Search.
forgot to add
(5) I noticed Firefox uses WM_PAINT to draw/redraw its window, perhaps when the caret is blinking , it's possible to hook BeginPaint function, and check the rcPaint parameter in the output. It may reveal the caret coordinates. _________________ TypingAid autocompletion program made with AHK. |
|
| Back to top |
|
 |
lehenryjr
Joined: 08 Apr 2009 Posts: 16 Location: Technology Guru
|
Posted: Fri Feb 05, 2010 10:08 pm Post subject: |
|
|
@maniac
Your right, the correct syntax is 'setkeydelay, 20' is correct. I just typed it wrong.
Interesting, the change that I made shouldn't be doing anything...
I'm not in your league of development, but after I made the change I received better results.
I appreciate it... |
|
| Back to top |
|
 |
kakarukeys
Joined: 28 Sep 2009 Posts: 85
|
Posted: Sun Feb 07, 2010 2:28 pm Post subject: |
|
|
testing and writing a quick guide now. The intro on the first post is meant for geeks, I'm writing one for laymen. I have also released TypingAid 1.3 (the final update for 1.x with the helper window feature) while testing and packaging TypingAid 2.06
AutoHotKey_L works, but still has an issue, same as AutoHotKey_U which I shall avoid mentioning at this moment so as not to confuse.
missed key bug is rarer now, at an acceptable level. but Ctrl + Shift + C is problematic again.
Could you clarify, is it supposed to learn any phrase (within the length limit) which is true in 1.x or just word?
below are the phrases that cannot be learned:
| Quote: |
wordlist.txt", save it
window, tooltip
|
I didn't put anything in
ForceNewWordCharacters=
also you mentioned in one of the updates, that ForceNewWordCharacters won't affect Ctrl + Shift + C. The intro hasn't been updated to reflect this, it still says if a word has chars in ForceNewWordCharacters it cannot be added to wordlist with Ctrl + Shift + C _________________ TypingAid autocompletion program made with AHK. |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 136
|
Posted: Mon Feb 08, 2010 1:30 pm Post subject: |
|
|
OHHH, I see the issue. As I said, when I designed this it was never intended for phrases. There is a list that is stored that keeps track of learned words. This list just happens to use a comma delimiter! Maybe I should change the character to something less common, such as |, ||, or something.
Thanks, I'll fix the first post. |
|
| Back to top |
|
 |
kakarukeys
Joined: 28 Sep 2009 Posts: 85
|
Posted: Mon Feb 08, 2010 1:45 pm Post subject: |
|
|
| maniac wrote: | OHHH, I see the issue. As I said, when I designed this it was never intended for phrases. There is a list that is stored that keeps track of learned words. This list just happens to use a comma delimiter! Maybe I should change the character to something less common, such as |, ||, or something.
Thanks, I'll fix the first post. |
I see. Is it possible to use character not on the keyboard? it's good to pick one obsolete ascii characters from 0~31 in the table as the delimiter. _________________ TypingAid autocompletion program made with AHK. |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 136
|
Posted: Mon Feb 08, 2010 2:31 pm Post subject: |
|
|
| kakarukeys wrote: | | maniac wrote: | OHHH, I see the issue. As I said, when I designed this it was never intended for phrases. There is a list that is stored that keeps track of learned words. This list just happens to use a comma delimiter! Maybe I should change the character to something less common, such as |, ||, or something.
Thanks, I'll fix the first post. |
I see. Is it possible to use character not on the keyboard? it's good to pick one obsolete ascii characters from 0~31 in the table as the delimiter. |
Yep, I was able to use Ascii 2 (STX - Start of Text), thanks for the suggestion.
*2.07 02/08/2010
** Fixed a bug which prevented phrases with commas from being learned when hitting Ctrl-Shift-C or when comma was not a terminating character. |
|
| Back to top |
|
 |
kakarukeys
Joined: 28 Sep 2009 Posts: 85
|
Posted: Tue Feb 09, 2010 8:48 am Post subject: |
|
|
on-going testing:
A list of all bugs in descending order of criticality
1. length limit no exception handling when LearnMode = Off (critical)
I just checked the length limit exists when LearnMode = Off. There is no exception handling, so an error message pops up when trying to autocomplete a over-long phrase.
2. whitespace after phrase is ignored during autocompletion. (critical)
3. Old bug existed since 1.x: in certain keyboard layouts where dead keys like `" are used to type accented characters. User might encounter problems typing the dead key itself by typing [dead key] followed by [space], an extra character could be sent out which might affect the next character.
4. tooltip displays above caret even if there is enough room below, though outside of the active window.
5. on native Spanish keyboard, can't type áéíóú when program is running - anyone who has native Spanish keyboard to try out?
6. Occasionally the program might fail to delete one or two characters during autocompletion (missed key problem, at acceptable level).
7. Can't read wordlist.txt in Vista64bits - work in Win7-64bits (UAC Off) - this is doubtful, anyone has Vista64bits to try out? _________________ TypingAid autocompletion program made with AHK.
Last edited by kakarukeys on Tue Feb 09, 2010 8:55 am; edited 1 time in total |
|
| Back to top |
|
 |
kakarukeys
Joined: 28 Sep 2009 Posts: 85
|
Posted: Tue Feb 09, 2010 8:55 am Post subject: |
|
|
A list of all bugs in descending order of criticality affecting Unicode version only
1. ForceLearn will cause wordlist to be converted to ANSI format, and lose chars (critical)
2. AutoLearn will cause wordlist to be converted to ANSI format, and lose chars (critical)
3. Can't detect Chinese characters (HARD)
4. chars are garbled when sending out Chinese characters.
5. extra chars are sent out when sending out Chinese characters
It's probably not possible to fix all in one or two months, so let's fix the most critical fews and I shall make a release on my site. _________________ TypingAid autocompletion program made with AHK. |
|
| Back to top |
|
 |
hugov
Joined: 27 May 2007 Posts: 2477
|
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 136
|
Posted: Tue Feb 09, 2010 11:30 am Post subject: |
|
|
OK, for non-unicode:
1. Interesting, I don't think there should be a max length. I'll figure out why this is happening.
2. Could you clarify this? Do you mean if you put in a phrase that has spaces after it in the wordlist file?
If so, sorry, I don't think that one is going to change. That's a side-effect of AutoTrim, On and works like that in 1.X as well.
3. So are you saying that when ` and " are not in your TerminatingCharacters list, and you type either of them and then hit space, the program is sending an extra character?
4. That's mainly due to the possibility of multiple monitors. The Caret function returns the caret's position within the current window. To make it take into account desktop size I'd have to figure out which monitor they are typing on, and where within each monitor they are typing. Then there is the question of what happens if they are between two monitors. I think most Windows users are going to have their programs maximized. If this were for a Mac it might be an issue, but I don't think it's a problem on Windows.
6. I'm not sure if this is due to the script not registering keystrokes or due to AHK not sending all the backspaces I'm telling it to send. I've seen both issues.
7. I have a Vista 64 bit machine, I'll have to try it later today. IIRC this worked fine on my current machine on Vista 64 before I reformatted to Win 7 64.
Re Unicode:
I'll check out the FileFormat thing, I thought Unicode AHK was supposed to set it automatically but maybe not. |
|
| Back to top |
|
 |
kakarukeys
Joined: 28 Sep 2009 Posts: 85
|
Posted: Tue Feb 09, 2010 1:51 pm Post subject: |
|
|
| maniac wrote: | OK, for non-unicode:
2. Could you clarify this? Do you mean if you put in a phrase that has spaces after it in the wordlist file?
If so, sorry, I don't think that one is going to change. That's a side-effect of AutoTrim, On and works like that in 1.X as well.
|
Yes. phrase like "Curiosity killed the cat. ". That's strange, 1.x does output the spaces.
| maniac wrote: |
3. So are you saying that when ` and " are not in your TerminatingCharacters list, and you type either of them and then hit space, the program is sending an extra character?
|
clarification:
here's what happen:
without TypingAid (correct behaviour):
'a=á
'{SPACE}a=´a
with TypingAid, when ' is in TerminatingCharacters:
'a=a
'{SPACE}a=´a
with TypingAid, when ' is not in TerminatingCharacters:
'a=á
'{SPACE}a=´á _________________ TypingAid autocompletion program made with AHK. |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 136
|
Posted: Tue Feb 09, 2010 2:04 pm Post subject: |
|
|
1. I have a fix for this, I'll upload it soon.
2. You are right, it does work in 1.X, but it's working for me in 2.X as well. Your example "Curiosity killed the cat. " works fine (in fact I just autocompleted it ).
3. I'll check this out, it may have to do with the sendmethod.
4. I thought up some logic for this:
If Window is Maximized
{
Use Current Method
} else {
If Window is fully contained in a single monitor, show tooltip if there is room in that one monitor (requires some math to get caret position relative to monitor rather than window)
} else {
Use Current Method
} |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 136
|
Posted: Tue Feb 09, 2010 2:31 pm Post subject: |
|
|
3. OK, when ' is in terminatingcharacters this appears to be an AHK bug. Input has "V" set so the character should be printing back. I am getting an ASCII 233 è from the Input when `e is hit, but the Input command is sending e to the program. It should properly bring up words for auto-completion, but if you don't auto-complete the word the regular e only will show up.
I have no idea what's happening when ` is not in terminating characters. The only thing reaching the Input command is the letter I type.
I have zero motivation to fix or address said issues for #3, so I'll leave that to someone else to deal with if they want to. |
|
| Back to top |
|
 |
kakarukeys
Joined: 28 Sep 2009 Posts: 85
|
Posted: Tue Feb 09, 2010 2:40 pm Post subject: |
|
|
| maniac wrote: |
2. You are right, it does work in 1.X, but it's working for me in 2.X as well. Your example "Curiosity killed the cat. " works fine (in fact I just autocompleted it ).
|
It was me, I added some custom code.
| maniac wrote: |
4. I thought up some logic for this:
If Window is Maximized
{
Use Current Method
} else {
If Window is fully contained in a single monitor, show tooltip if there is room in that one monitor (requires some math to get caret position relative to monitor rather than window)
} else {
Use Current Method
} |
Sounds complicated, not a critical issue, if too difficult to do, can leave as is...
issue #3, ya, probably an AHK bug, I think I will isolate the problematic statement and send a bug report some time. _________________ TypingAid autocompletion program made with AHK. |
|
| Back to top |
|
 |
maniac
Joined: 28 Aug 2009 Posts: 136
|
Posted: Tue Feb 09, 2010 2:59 pm Post subject: |
|
|
OK, 2.08 is up. Fixes 1 For non-unicode issues, fixes 1 & 2 for unicode issues.
*2.08
** Fixed a bug which caused the script to error when a word was too long when LearnMode=Off.
** Fixed a bug which caused the script to remove unicode characters from learned words when saving the wordlist in unicode mode.
Why can't the script detect chinese characters? Do they hit multiple characters to print a single one like in Japanese (like how it converts hiragana to kanji)? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|