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 

TypingAid v2.12 - Word AutoCompletion Utility
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Tue Feb 02, 2010 11:21 am    Post subject: Reply with quote

Interesting... 2 works? That's funny because 2 is SendInput, and so is 2C!

No, the Pause simply pauses the script so you can look at variables and things like that, and see where you are in the code; nothing more.
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Wed Feb 03, 2010 2:16 pm    Post subject: Reply with quote

So I think I found out what was causing the script to occasionally revert all numbers to hexadecimal... I think the main thread was getting interrupted by a hotkey or something causing the script to never go back to decimal format. I set the thread to critical during that part of the script so it can't be interrupted (and in the OnExit code I force the script back to decimal).

I realized that keys set as hotkeys weren't working when loading/saving the wordlist. I suspended the hotkeys while loading/saving which also changes the icon to show an S and not an H. I think this also makes a good indicator of when the script is loaded.

2.06 is uploaded.


*2.06 02/03/2010
** Hotkeys are now suspended when loading and saving the wordlist. This lets hotkeys be typed while loading/saving and also shows an S rather than an H in the icon when the script is loading/saving.
** Fixed a bug introduced with 2.04 which made it so the tooltip didn't go away after changing windows.
** Hopefully fixed a bug which caused the script to sometimes convert all numbers to hexadecimal, causing the script to malfunction.
Back to top
View user's profile Send private message
lehenryjr



Joined: 08 Apr 2009
Posts: 16
Location: Technology Guru

PostPosted: Thu Feb 04, 2010 9:58 pm    Post subject: word replacement Reply with quote

I've the latest revision of the AHK script. It's amazing work BTW.

But could someone explain something for me; I'm having a small issue with the word replacement.

I download'd the wordlist.txt and I'm typing in words like 'alabama' and it's replacing/completing the word as 'aalabama'. It has an extra A at the beginning.

I checked the 'wordlist.txt'; it's fine.

It's like it's just not going back far enough to replace the entire word.

Are there any ideas/suggestions?

-------------
Later,
LEHenryJr.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Thu Feb 04, 2010 10:10 pm    Post subject: Reply with quote

Thanks, glad you like it Smile

A. that can happen if you type too fast - it will miss that you typed letters. This would have to happen on the last key you press (or if there are 2 of the same letter in a row). You have to type pretty fast for it to happen.

B. When SciTE4AutoHotkey has been opened and then closed while the script is still open, I've noticed that sometimes not all the backspaces get properly sent (I verified this by creating a variable to track the number of backspaces sent and realized the script was sending the correct number of backspaces, it just was never getting to the program). If you happen to have opened/closed this program while the script is running that could be happening.
Back to top
View user's profile Send private message
lehenryjr



Joined: 08 Apr 2009
Posts: 16
Location: Technology Guru

PostPosted: Thu Feb 04, 2010 11:06 pm    Post subject: Reply with quote

Thanks for the quick reply. I'm continuing my testing and the issue seems to be inconsistent.

a. I'm not typing fast.- wish I could.
b. I'm not doing this while the AHK Script is opening or shutting down.

I'm actually thinking that this could be a symptom of a slow PC?

My experience with AHK and this PC is that the AHK can actually function faster than this PC can deal with it- so of the script is running wide open, perhaps this would explain why some functions/chars are being omitted.

Let me give you another example and let me clarify what I'm doing exactly;
Quote:
Running the script
opening wordpad
going to the text/edit area
type in 'per' - it gives me 10 suggestions.
I press 1 - it completes fine.
I repeat the process to selection #5.
I choose selection #6 and I get 'PPer...' at the front.


I think the issue is with my PC/system; I'll test on some other machines, but regardless, I think it's amazing what you've done with the scripting language. I was thinking about this very thing just the other day.

Very good work and thanks for the reply.

-------------
Later,
LEHenryJr.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
lehenryjr



Joined: 08 Apr 2009
Posts: 16
Location: Technology Guru

PostPosted: Thu Feb 04, 2010 11:25 pm    Post subject: Reply with quote

I've a solution to my [isolated] issue.
In examining the code, and using my idea of the slow PC; I removed your performance section and actually added:

SETKEYDELAY=20

This is proving to provide better results with the script. [on this PC]

My Pc/laptop is a Lenovo and the keyboard drivers are notoriously slow.

Hope this helps.

-------------
Later,
LEHenryJr.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Thu Feb 04, 2010 11:46 pm    Post subject: Reply with quote

Thanks for the info.

What processor does your PC have? I run this on an Atom Z520 @ 1.33 GHz without issue.

Quote:
b. I'm not doing this while the AHK Script is opening or shutting down.

I'm not referring to the AHK script. Did you use the program 'SciTE4AutoHotkey' at all when using the script? Do you have 'SciTE4AutoHotkey' installed on your PC?
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Feb 05, 2010 2:12 am    Post subject: Reply with quote

The laptop is a celeron, but it's running McAfee anti-virus, Microsoft outlook, excel and it has hard drive encryption loaded; it drives like a rock wagon. Wink

No, I don't have the 'SciTE4AutoHotkey' installed, nor using it.

Sorry, just found the article, download'd the script and ran it. It worked; I was impressed- I didn't get much further. Wink

Later,
Larry
Back to top
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Fri Feb 05, 2010 2:20 am    Post subject: Reply with quote

Celeron at what speed? Celeron ranges from 400 mhz to 2+ GHz Smile. Really I can't see a slow system being too bogged down by this if my Atom can handle it. A sub 1 GHz celeron definitely might have problems though.

Just trying to find the root of the problem Smile, thanks for you responses.

Other things you can do is try messing with the send method in the preferences file... see if send method #2 works better for you.

I might look more into SetKeyDelay, I never tried playing with it.
Back to top
View user's profile Send private message
lehenryjr



Joined: 08 Apr 2009
Posts: 16
Location: Technology Guru

PostPosted: Fri Feb 05, 2010 4:56 am    Post subject: Reply with quote

It's a Celeron 2ghz with 1g memory; it's a work machine and it's bogged down with security and hard drive encryption and anti-virus crap; it's a wonder I get anything done.. Wink

On my work machine, and the AHK scripts I've used the pasting whole words method works better than the sending letters one at a time. So, I'll look in to the #2 options.

I've to use SETKEYDELAY to at least 20 or my machine starts dropping chars when it's pasting and moving and doing what I script it to do. I seriously think it's a POS, but it's for work.. so..

Thanks again.

Later,
Larry
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Fri Feb 05, 2010 11:26 am    Post subject: Reply with quote

Hmm, that should still be faster than my Atom. Security and HDD encryption software should mainly only matter when reading/writing to disk.

The paste options (1C-4C) can't send backspaces via the clipboard (they are sent normally) so it may not help.
Back to top
View user's profile Send private message
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Fri Feb 05, 2010 1:37 pm    Post subject: Reply with quote

See this in the help file for SetKeyDelay:

Although this typically causes keystrokes to be sent faster than the active window can process them, the system automatically buffers them. Buffered keystrokes continue to arrive in the target window after the Send command completes (even if the window is no longer active). This is usually harmless because any subsequent keystrokes sent to the same window get queued up behind the ones already in the buffer.

Either that doesn't apply to SendPlay (SendMethod #1), or that's not your underlying issue and just happens to work around whatever is actually causing the issue.

edit -
also interesting, SetKeyDelay should not be doing anything at all for SendMethod=1 as SetKeyDelay needs the Play parameter passed in to do anything at all.

Also, you said you added:
SETKEYDELAY=20
isn't the proper syntax:
SETKEYDELAY,20
Does the "=" operator even work? I've never tried it.
Back to top
View user's profile Send private message
kakarukeys



Joined: 28 Sep 2009
Posts: 83

PostPosted: Fri Feb 05, 2010 7:52 pm    Post subject: Reply with quote

Smile I guess I miss the activities here. Busy with a paper.

@maniac
Good to see the script improved.
I had some issue with Ctrl+Shift+C, but it seems in 2.06 it works fine.
Now testing with Unicode-AHK, the script worked fine with Russian and Bosnian languages, but I'm not on a native keyboard. I've created wordlist in Russian language for testing. After I am done with the paper, I will post everything.

Could you tell me briefly, besides the word/phrase length limit what other limitation is there in 2.x that wasn't in 1.x?

@hugov
I have some suggestions regarding caret detection in firefox and other difficult programs. You seem to be using GetCaretPos that doesn't work.

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.

possible solution for Firefox:
(1) XPCOM automation which works on all Mozilla software.
(2) ACC as you have mentioned.
I doubt COM will work.
(3) ImageSearch: I can get 100% detection accuracy, but it's pointless, since one has to create different image files for different programs on different OS's. Some Microsoft IME might have used similar technique from my observation. Google IME seems different, I have no idea how Google IME could detect caret accurately in Firefox/Openoffice writer. Unfortunately it's not open-source.
(4) using Last-mouse-click position + helper window as a failsafe is by far the best workaround
_________________
TypingAid autocompletion program made with AHK.
Back to top
View user's profile Send private message
hugov



Joined: 27 May 2007
Posts: 2432

PostPosted: Fri Feb 05, 2010 8:03 pm    Post subject: Reply with quote

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 ...
_________________
Tut 4 Newbies
TF : Text file & string lib, TF Forum
Back to top
View user's profile Send private message Visit poster's website
maniac



Joined: 28 Aug 2009
Posts: 134

PostPosted: Fri Feb 05, 2010 8:33 pm    Post subject: Reply with quote

kakarukeys wrote:
Smile I guess I miss the activities here. Busy with a paper.

Good luck with the paper Smile

kakarukeys wrote:

@maniac
Good to see the script improved.
I had some issue with Ctrl+Shift+C, but it seems in 2.06 it works fine.
Now testing with Unicode-AHK, the script worked fine with Russian and Bosnian languages, but I'm not on a native keyboard. I've created wordlist in Russian language for testing. After I am done with the paper, I will post everything.

Could you tell me briefly, besides the word/phrase length limit what other limitation is there in 2.x that wasn't in 1.x?

Interesting... I don't recall changing any code that would affect Ctrl-Shift-C, lol.

Also, as you may have noticed, when using the non-unicode version, the length limit has increased to 123 characters.

Please see this post regarding SendMethod and the various limitations (documentation in the Preferences.ini file):
http://www.autohotkey.com/forum/viewtopic.php?p=328369#328369

Besides that there are no limitations that have changed from 1.x that I am aware of.

Also, Unicode AHK has merged with AutoHotKey_L (http://www.autohotkey.com/forum/viewtopic.php?t=50485&start=0). You may want to check that everything still works.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 4 of 9

 
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