AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 494 posts ]  Go to page Previous  1 ... 27, 28, 29, 30, 31, 32, 33  Next
Author Message
 Post subject:
PostPosted: December 7th, 2011, 12:41 pm 
Offline

Joined: October 8th, 2011, 2:07 pm
Posts: 27
Continuing:

Yes, i will fiddle with the Learn and see which number works best, now i have kept it in on and set both as 5 and 5. Let me see.

Assuming that the phrase expansion works, i only will have a last querry here ( i suppose)

Every time i start typingaid.ahk or reload it one pop up window comes:

"Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.

022: Suspend,On
024: ListLines

Press [F5] to refresh."

Can this be avoided?

Thank you very much.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 12:45 pm 
Third question: which version of AutoHotkey are you running, basic or one of the AutoHotkey_l versions.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:00 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
dev wrote:
Every time i start typingaid.ahk or reload it one pop up window comes:

"Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.

022: Suspend,On
024: ListLines

Press [F5] to refresh."

Can this be avoided?


Are you doing a ListVars combined with a Pause anywhere?

The reason all you are seeing is ListLines and then nothing following it is that that line of code turns off history lines (for improved performance). Comment out that line in the main TypingAid*.ahk script to see why your window is actually popping up.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:13 pm 
Offline

Joined: October 8th, 2011, 2:07 pm
Posts: 27
Guest:

****ABOUT THE PHRASE EXPANSION******, let me now clearly tell you what happened since i experimented with it:

abbr: asswith (6 characters) so when it expands to "associated with", it wipes off the earlier 6 characters in the sentence and types associated with.

Now if the abbr is :corartbypass (12 characters), when it expands it wipes off the earlier 12 characters in the running sentence and expands to "coronary artery bypass"

I am wondering - though i do not know much about this- whether the code is written such that when invoke the choice that appears in the pop up window.... in the first case "asswith|associated with", it backspaces/deletes the number of characters in the abbreviation before the "|".

or is it any other problem?

Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:16 pm 
@dev: please answer my three questions, no answer no help :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:17 pm 
Offline

Joined: October 8th, 2011, 2:07 pm
Posts: 27
Guest and Maniac: were you actually sitting next to me when i sent my original query?! such quick responses!!

Maniac: which is the line that i have to query out? I am not doing anything. I simply downloaded the script TypingAid v2.16b and running it.

Guest:

i am using TypingAid v2.16b and the autohotkey version that i am using is:
Version 1.0.47.06

Thanks!


Last edited by dev on December 7th, 2011, 1:23 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:19 pm 
Offline

Joined: October 8th, 2011, 2:07 pm
Posts: 27
Guest: Hey i never expected you to respond so fast, so went to the kitchen to make a cup of coffee! :roll:


Last edited by dev on December 7th, 2011, 1:22 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:20 pm 
Offline

Joined: October 8th, 2011, 2:07 pm
Posts: 27
Guest: by the way what were your first TWO questions? I think i responded to that. I removed the original Sendfull() totally and i did that because i did not understand your response

"and change SendFull into _SendFull (you rename the function to something you won't use) "

and replaced with the code that you provided. Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:27 pm 
See previous page:

@dev: two questions
1) which sendmethod are you using (you'll find it in preferences.ini) it says SendMethod=X somewhere I need the X value
2) how did/do you auto-complete, via number, ^enter or tab? (shouldn't matter but might be helpful to know)
3) which version of AutoHotkey are you running basic or _l


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:33 pm 
Offline

Joined: October 8th, 2011, 2:07 pm
Posts: 27
Guest:

Now i understood your queries:

1) the send method is SendMethod=2
( I chose 2 since I type very fast and i found the expansion speed very, very slow otherwise...before the ahk expanded i was overriding that with my typing.)
2. I used the numbers 1, 2, 3, 4 to choose.
3) i did not understand this query of yours, but as i stated above i use Autohotkey Version 1.0.47.06

Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:39 pm 
Thank you, I'll do some testing and get back to you (tomorrow probably)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 1:44 pm 
Offline

Joined: October 8th, 2011, 2:07 pm
Posts: 27
Guest: Please do take your time. I immensely appreciate the time taken by you.

Maniac: I queried out those lines it does not happen anymore. I hope, this won't affect the overall working of the script however.

Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 3:12 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
dev wrote:
Maniac: I queried out those lines it does not happen anymore. I hope, this won't affect the overall working of the script however.


ListLines,Off should not cause a window to pop open. You are saying that commenting out those lines caused it to stop opening?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 5:11 pm 
maniac wrote:
ListLines,Off should not cause a window to pop open. You are saying that commenting out those lines caused it to stop opening?
Dev is seeing that because is using quite an old version of AutoHotkey, try it with http://www.autohotkey.net/programs/AutoHotkey104706.zip if you want to see it.
@dev: it might be best if you upgrade to the most recent basic version, http://www.autohotkey.com/download/ or even Autohotkey_L. You can try basic 1.0.48.05 first so your other scripts won't break (if you have any other scripts that is) (testing your bug report with sendmethod=2)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2011, 9:16 pm 
@dev: I think this new SendFull() will work for you. Just do the same as before, open includes\sending.ahk and replace the entire SendFull() function with the one below. Save, and of course reload TA. I tried with all 7 sendmethods, for me only 2c seemed to fail, the others worked.
Code:
SendFull(SendValue,BackSpaceLen)
{
   ; Modified SendFull() function for dev @ autohotkey forum Typing Aid 2.16b
   ; version: 2, date: 7-12-2011 8:16pm, author: that guy who also made the preferences Gui ;-)
   ; NOTE: Does not seem to work with SendMethod=2C, tested successfully with all the other 6 SendMethods, but ymmv
   ; "Install": by editing includes\sending.ahk and replace the SendFull() function you see there with this one
   ; Purpose:
   ; With this mod you can store words in your wordlist.txt including an abbreviation by using a | char like so
   ;
   ; abbrev|Full Text
   ; abbr|LengthyWord
   ; NormalWord
   ; OtherNormalWord
   ; short|longversion
   ; etc
   
   global SendMethod
   global A_id
   global NoBackSpace
   global AutoSpace
   StoreNoBackSpace:=NoBackSpace
 
   If (InStr(SendValue, "|") > 0)
      {
       Cut:=InStr(SendValue,"|")+1
      SendValue:=SubStr(SendValue,Cut)
      sending .= "{BS " . BackSpaceLen . "}"     
      NoBackSpace=Off
     }

      IfNotEqual, NoBackSpace, Off
            StringTrimLeft, SendValue, SendValue, %BackSpaceLen%
 
   ; if autospace is on, add a space to the string to send
   IfEqual, AutoSpace, On
      SendValue .= A_Space
   
   IfEqual, SendMethod, 1
   {
      ; Shift key hits are here to account for an occassional bug which misses the first keys in SendPlay
      sending = {Shift Down}{Shift Up}{Shift Down}{Shift Up}     
      IfEqual, NoBackSpace, Off
         sending .= "{BS " . BackSpaceLen . "}"     
      sending .= "{Raw}" . SendValue
         
      SendPlay, %sending% ; First do the backspaces, Then send word (Raw because we want the string exactly as in wordlist.txt)
      NoBackSpace:=StoreNoBackSpace
      Return
   }

   IfEqual, NoBackSpace, Off
      sending = {BS %BackSpaceLen%}{Raw}%SendValue%
   Else sending = {Raw}%SendValue%
   
   IfEqual, SendMethod, 2
   {
      SendInput, %sending% ; First do the backspaces, Then send word (Raw because we want the string exactly as in wordlist.txt)     
      NoBackSpace:=StoreNoBackSpace
      Return
   }

   IfEqual, SendMethod, 3
   {
      SendEvent, %sending% ; First do the backspaces, Then send word (Raw because we want the string exactly as in wordlist.txt)
      NoBackSpace:=StoreNoBackSpace
      Return
   }
   
   ClipboardSave := ClipboardAll
   Clipboard =
   Clipboard := SendValue
   ClipWait, 0
   
   IfEqual, NoBackSpace, Off
      sending = {BS %BackSpaceLen%}{Ctrl Down}v{Ctrl Up}
   Else sending = {Ctrl Down}v{Ctrl Up}
   
   IfEqual, SendMethod, 1C
   {
      sending := "{Shift Down}{Shift Up}{Shift Down}{Shift Up}" . sending
      SendPlay, %sending% ; First do the backspaces, Then send word via clipboard
   } else {
            IfEqual, SendMethod, 2C
            {
               SendInput, %sending% ; First do the backspaces, Then send word via clipboard
            } else {
                     IfEqual, SendMethod, 3C
                     {
                        SendEvent, %sending% ; First do the backspaces, Then send word via clipboard
                     } Else {                     
                              ControlGetFocus, ActiveControl, ahk_id %A_id%
                              IfNotEqual, ActiveControl,
                                 ControlSend, %ActiveControl%, %sending%, ahk_id %A_id%
                           }
                  }
         }
         
   Clipboard := ClipboardSave
   NoBackSpace:=StoreNoBackSpace
   Return
}

Let me know how the above goes. And do upgrade your ahk to the latest basic version, that will solve your listlines problem as well.

(If you wish it should be possible to remove the abbreviation from the words you see, although that might be a bit counter intuitive because the abbreviation might have different letters as to what you are seeing in the list.)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 494 posts ]  Go to page Previous  1 ... 27, 28, 29, 30, 31, 32, 33  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon, maul.esel and 10 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