topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 2:04 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE: abbreviations importer  (Read 85756 times)

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
DONE: abbreviations importer
« on: March 01, 2006, 10:20 AM »
How feasible is this scenario:

I am a medical transcriptionist.  Many of us have thousands of word and phrase abbreviations in the expanders we use. 

Example: 
hthym = hypothyroidism
tpptth = the patient presented to the hospital

The request is - if the above format is put into a plain text file, and/or the same format but no spaces before or after the equal sign, can someone make a script that would put them all into an AHK hotstrings file?  I would like it so that somehow, before importing the list, the user could specify whether they want the trigger key to be the spacebar, the semicolon key, or whatever other key they choose. 

Thanks for letting me ask.  Thanks for this forum.
« Last Edit: March 03, 2006, 04:01 AM by brotherS »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: An "importer" for abbreviations into AHK
« Reply #1 on: March 01, 2006, 10:51 AM »
I think the following code should solve your problem.
I've tested it and it seems to be working :D
It only has one limitation.
The text to be replaced cannot end with a space, and the text to replace cannot start with a space, or you'll need to add that space to trigger the hotstring.
i.e. the text file accepts the following format:
hthym=hypothyroidism
tpptth=the patient presented to the hospital

Oh, and another thing: the hotstrings cannot have '=' in it ;)
These two issues can be solved if you really need them.
Here's the code:

#SingleInstance,Force
;filetoread contains the name of the file to read
filetoread=textfile.txt
;file to write contains the name of the file to write
filetowrite=hotstringsScript.ahk
;to add a trigger, put it after the '='.please notice that colons have to be added like this: `, 
trigger=

loop,Read,%filetoread%,
{
string=%A_LoopReadLine%
StringSplit,result,string,=,
replaceable:=result1
replaced:=result2
FileAppend,:o*:%trigger%%replaceable%::%replaced%`n,%filetowrite%
}
return

Only one doubt:
Do you want an executable or the ahk script?

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: An "importer" for abbreviations into AHK
« Reply #2 on: March 01, 2006, 11:20 AM »
That is incredible!  I'm awe-struck.  This is just tremendous for me!  I suspected it might be easy for some of you and fast, but wow, you whipped it up immediately!

Not being able to have the equal sign in a hotstring should not be any problem at all.  None.  Nor the space issue.   

I tried it on a very large text file (35 pages worth of phrases when I opened it with MS Word), and it took them beautifully.  And fast.  If a person has duplicate short forms, the resulting Hotstrings file won't run until they are taken out or changed.  I think, right now, that is fine.  Let the person deal with those.  Maybe I'll think on that.

I don't need an executable, this is fine.  This is okay to share with other MTs? 

Wow, can't get over it.  Is it terribly much a whole 'nuther ballgame (difficulty-wise) to make them have tooltips, such that when you hit your short form keys (tpptth) you'd get a tooltip showing you the matching phrase?  I'm just asking here, I know it wasn't in my original request.  I may make a new post with such a request!   :D

Well, I have more playing to do.  I feel really appreciative.  You probably can have no idea, LOL.  Thank you, jgpaiva!  Great job!

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: An "importer" for abbreviations into AHK
« Reply #3 on: March 01, 2006, 11:42 AM »
I hope i understood your post correctly. (I have a few problems with understanding English :()

If a person has duplicate short forms, the resulting Hotstrings file won't run until they are taken out or changed. 
Sorry, didn't get what you mean.

This is okay to share with other MTs?
No problem with sharing, please do. (But some publicity for DC would be nice ;) )

Wow, can't get over it.  Is it terribly much a whole 'nuther ballgame (difficulty-wise) to make them have tooltips, such that when you hit your short form keys (tpptth) you'd get a tooltip showing you the matching phrase?
Do you mean if you have this defined:
tpptth=the patient presented to the hospital
if you type tpptth, the hotstring would not be replaced but there would appear a tooltip?
or do you mean if you type tpp, the possible completions would appear?
The first one is easy to do. The second one, could be impossible (at least with my knowledge ;) )

Thank you, jgpaiva!
:D No problem, it's good to know i contribute to the community ;)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: An "importer" for abbreviations into AHK
« Reply #4 on: March 01, 2006, 11:50 AM »
BTW, this other script might intrest you: http://www.autohotke...viewtopic.php?t=2066
It's a hotstring manager, gui-like.
It is defined to look in a file named "HotString_Defs.ahk" for hotstrings, and then add them to a gui. When you press ctrl + alt + A, it opens a manager where you can delete hotstrings and add new hotstrings.
Looks good ;)

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: An "importer" for abbreviations into AHK
« Reply #5 on: March 01, 2006, 11:56 AM »
Believe me, DC will definitely be getting publicity.  As a matter of fact, they would have been anyway.  I'm so taken away with this place, it is a wonderful site.  I'm only waiting until I'm a bit more familiar here, so that when I say what I have to say, I do it well.  Your programming this for me only shoots my opinion up about 90% higher!  

About the duplicate short forms, I meant if someone has:

mar25=March 25
mar25=0.25% Marcaine

Then, when you click on the Hotstrings script, it tells you there is a duplicate, the program won't run, and will exit.  As I said, that's really no big deal.  They can take them out manually.

If, for example, with tpptth=the patient presented to the hospital, one types tpptth, I would want it still to replace the hotstring, but show a tooltip of the phrase.  Your second example of possible completions would be incredible, beautiful.  That is what some popular expanders do now.  However, I am very happy at the moment.  Very!  Please feel more than free to stop here.  I'm wowed enough for one day.

Again, so many thanks.  

PS:  Just saw your last post.  I will definitely check it out. 


jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: an "importer" for abbreviations into AHK
« Reply #6 on: March 01, 2006, 12:25 PM »
Oh, the tooltip is no problem. Here it is:
#SingleInstance,Force
;filetoread contains the name of the file to read
filetoread=textfile.txt
;file to write contains the name of the file to write
filetowrite=hotstringsScript.ahk
;to add a trigger, put it after the '='.please notice that colons have to be added like this: `, 
trigger=
;the time for the display of the tooltip (in milliseconds)
TooltipTime=1000


loop,Read,%filetoread%,
{
string=%A_LoopReadLine%
StringSplit,result,string,=,
replaceable:=result1
replaced:=result2
FileAppend,:o*:%trigger%%replaceable%::`nSend`,%replaced%`nTooltip`,%replaced%`nSleep`,%tooltiptime%`nTooltip`,`nreturn`n`n,%filetowrite%
}
return
(notice you can change the tooltip display time)
The repeated entries checker can be done, but possibly it'd make more sense as another script.
The tooltip with the completions of the hotstring would have to be presented at autohotkey.com or to DC's ahk expert, Skrommel ;)

I'm so taken away with this place, it is a wonderful site.  
My feelings exactlly ;)

I'm only waiting until I'm a bit more familiar here, so that when I say what I have to say, I do it well.
:Thmbsup: :Thmbsup:

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: an "importer" for abbreviations into AHK
« Reply #7 on: March 01, 2006, 03:07 PM »
This is yet another version of the script, now with a gui.
Hope you like it!
#singleinstance,force
;filetoread contains the name of the file to read
filetoread=textfile.txt
;file to write contains the name of the file to write
filetowrite=hotstringsScript.ahk
;to add a trigger, put it after the '='.please notice that colons have to be added like this: `, 
trigger=
;the time for the display of the tooltip (in milliseconds)
TooltipTime=1000

MsgBox,4,Show Gui?,Do you want to use the gui interface?,30000
IfMsgBox,Yes
  GoSub,MostraGui
IfMsgBox,No
  GoSub,SemGui
return

MostraGui:
  Gui, Add, ListView,gLstView x9 y5 w240 h230 , Trigger String|Result String
  GoSub,UpdateListView
  Gui, Add, Button,gCreateFile +default x259 y-1 w65 h23 , &Create File!
  Gui, Add, Text, x259 y28 w36 h13 , Trigger:
  Gui, Add, Edit,vtrigger x259 y47 w120 h21 , %trigger%
  Gui, Add, Text, x259 y74 w90 h13 , Time for the tooltip:
  Gui, Add, Edit,vtooltiptime x259 y93 w33 h21 ,%tooltiptime%
  Gui, Add, Text, x259 y120 w59 h13 , File to Write:
  Gui, Add, Edit, x259 y139 w102 h21 vfiletowrite,%filetowrite%
  Gui, Add, Text, x259 y166 w60 h13 , File to Read:
  Gui, Add, Edit, x259 y185 w53 h21 vfiletoread,%filetoread%
  Gui, Add, Button,gReadFile x259 y212 w63 h23 , &Reload
  Gui, Show,,
  Return
 
ReadFile:
  Gui,Submit
  Gui,Destroy
  GoSub,MostraGui
  return
 
SemGui:
  loop,Read,%filetoread%,
  {
  string=%A_LoopReadLine%
  StringSplit,result,string,=,
  replaceable:=result1
  replaced:=result2
  FileAppend,:o*:%trigger%%replaceable%::`nSend`,%replaced%`nTooltip`,%replaced%`nSleep`,%tooltiptime%`nTooltip`,`nreturn`n`n,%filetowrite%
  }
  return
 
CreateFile:
  Gui,Submit
  loop,Read,%filetoread%,
  {
  string=%A_LoopReadLine%
  StringSplit,result,string,=,
  replaceable:=result1
  replaced:=result2
  FileAppend,:o*:%trigger%%replaceable%::`nSend`,%replaced%`nTooltip`,%replaced%`nSleep`,%tooltiptime%`nTooltip`,`nreturn`n`n,%filetowrite%
  }
  exitapp
  return 

LstView:

  return
 
 
UpdateListView:
  loop,Read,%filetoread%,
  {
  string=%A_LoopReadLine%
  StringSplit,result,string,=,
  LV_Add("",result1,result2)
  }
  return
 
GuiClose:
  Gui,Destroy
  Tooltip,File Creation Canceled
  sleep,%TooltipTime%
  Tooltip
  ExitApp
You can change all the paramters and hit [enter] (or the create file! button), and it will generate the hotstrings file.
If you change the file to read, you might want to reload the hotstrings list, that's what the "reload" button is for.
(notice that to disable the tooltip, you can just set the time to '0', and it won't appear ;))
« Last Edit: March 01, 2006, 03:29 PM by jgpaiva »

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: IDEA: an "importer" for abbreviations into AHK
« Reply #8 on: March 01, 2006, 04:52 PM »
What can I say about the GUI, I love it!  We all love them so, don't we?  <grin>  Thank you, this is near perfect now. 

One thing....the two later scripts put the trigger before the actual short form.  So for instance, with the latest one with the great place for putting in your trigger key and the create file button, if I put in a semicolon for the trigger and hit create file, then the hotstrings come out with the trigger before the short form.  For instance:

It creates this:

:o*:;aaor::
Send,ascending aorta
Tooltip,ascending aorta
Sleep,1000
Tooltip,
return

Rather than what I desire, which is this:

:o*:aaor;::
Send,ascending aorta
Tooltip,ascending aorta
Sleep,1000
Tooltip,
return

Oh, I can change it so easily with a find and replace that it's no biggee, but I would like to change it in the script itself.  I'm not sure how to do this, can you help me?

Lastly, I adore the tool tip!  I've even seen in the past how to do certain things with tooltips, such as center them, etc.  But, is it feasible to have the tool tip show before you hit the trigger key (the semicolon)?   

Thank you!  No rush at all - whenever.  Cheers.
« Last Edit: March 01, 2006, 04:54 PM by Harrie »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: an "importer" for abbreviations into AHK
« Reply #9 on: March 01, 2006, 06:55 PM »
Oops.. Sorry, I understood that trigger key would be the key before the hotstring.
No problems.
It is now modified, with the Trigger key at the end, and the tooltip appears before you hit the trigger. If you don't hit it for 3 seconds, or don't hit it at all, it isn't replaced. :D

Instructions:
This is the new gui:
screenshot.png
On the left, there is the list of the several hotstrings located on the file listed under "file to read".
This uses a listview, which means you can list the hotstrings by name if you think there are some repeated ones (although probably tomorrow i'll do a version that checks for that ;)).

"Create File!" button, immediatelly creates the new hotstrings file, using the options that are displayed.

Trigger editbox let's you choose which trigger to use. Leaving it blank means there is no trigger and the hotstrings are used right after you write them.

Time for the tooltip edit box lets you choose the time you want the tooltip to be displayed, for every hotstring.

File to write editbox has the name of the file to write. This can be either a relative to the location of the script path, or an absolute path.

File to read editbox has the name of the file to read. This can be either a relative to the location of the script path, or an absolute path.

The "Reload" button makes the gui be reloaded with the new options, which basically means that the listview will display the hotstrings from the "file to read" edit box, in case you've changed it.
You don't have to reload to apply the "file to read" option, you can change it and click "create file!", but the listview will only be updated if the reload button is pressed.

If the trigger method is used, the generated hotsrings script will be case-sensitive. Please check this post for more information!

All the default configurations can be changed in the source file, in the variables at the beggining of the code, as in prior versions.

Selecting the non-gui version will use the default values, and closing the gui will cancel the creation of the new file.

Hope you like it! :D

.ahk file: http://jgpaiva.dcmem...ingScriptCreator.ahk
.exe file: http://jgpaiva.dcmem...ingScriptCreator.exe
« Last Edit: May 02, 2006, 04:12 PM by jgpaiva »

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: IDEA: an "importer" for abbreviations into AHK
« Reply #10 on: March 02, 2006, 06:31 AM »
Pure fun is right! 

I don't know how to thank you, jgpaiva.  This is so beautiful.  The tooltip works perfectly now, just perfectly.  The GUI is great.  The whole importer action, though, that's so fantastic. 

Have a beer on me.  It's a lot more than I really expected when I first started this thread.  A great script!   :Thmbsup:


brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #11 on: March 02, 2006, 06:39 AM »
I don't know how to thank you, jgpaiva.
Only 2 of 152 ideas here:
- you could donate a few bucks to jgpaiva - just click the $ below his nick
- and you could donate money to the AutoHotkey project (click here) - which made this all possible

:Thmbsup:

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #12 on: March 02, 2006, 06:42 AM »
Thanks, brotherS.  Excellent suggestions!

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #13 on: March 02, 2006, 07:54 AM »
Well, Harrie.. In attachment is what looks like the last funcional and complete version of this script.
Notice that it's more recent than the one I sent you through e-mail for testing. Now, I fixed the gui (the listview didn't come all the way down, and some buttons weren't aligned) and reused some code to reduce the file size (and general confusion ;)).
I also made another script, that allows you to check a file for repeated entries of a string.
This other script, although functional, doesn't tell you how many times the string is repeated and might preform *very* slowly with big files

35 pages worth of phrases when I opened it with MS Word
(so, better leave that one out ;) )

.ahk file: http://jgpaiva.dcmem...ingScriptCreator.ahk
.exe file: http://jgpaiva.dcmem...ingScriptCreator.exe
« Last Edit: May 02, 2006, 04:12 PM by jgpaiva »

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #14 on: March 02, 2006, 08:28 AM »
A duplicate checker - great!  jgpaiva, with this one I get an error at line 59, right here:

(Line 59 here) >CreateFile:
  Gui,Submit
  GoSub CreateFile
  return 

Says it is a duplicate label. 

Just tell me what to do and I'll do it.  Edit:  Will probably be checking here again this evening.  The world calls for a few outside errands.
« Last Edit: March 02, 2006, 08:31 AM by Harrie »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #15 on: March 02, 2006, 09:11 AM »
Grr.. Why? But oh why??
I'm so inattentive, it's unbelievable.
I've updated the post above with the functioning version.
(Now it prevents the overwrite of the "filetowrite", and prompts you before deleting it for writing.)
I hope it doesn't have errors now ;)

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #16 on: March 02, 2006, 10:00 AM »
I hope it doesn't have errors now ;)

jgpaiva,

Seems to be OK.  Many thanks!

Alternative suggestion for finding duplicate triggers: maybe something like a simple AWK script that takes the first "word," i.e. the trigger, up to but excluding the "=" sign.  Pass output through  SORT and some version of UNIQ/UNIQUE with -d option to show duplicate triggers?  Something like this;

trigger.awk
--------------
BEGIN {
  FS = "="
}
{ print $1 }
---------------

awk -f trigger.awk filetoread.txt | sort | uniq -d

if filetoread.txt is

afmq=aftermarket
avq=available
avq=availability
bawq=black-and-white

the only output you get is

avq


Leaving out the AWK script would show you completely duplicated lines.


Next suggestion - documentation  :D


Harrie;

How do you remember that many shorthand triggers?

Have you looked at freeware Speed Typing and shareware Type Pilot from Two Pilots http://www.colorpilot.com/typepilot.html  ?  In fact you would need the shareware version to import/export phrases, so you might be better off with AHK.


jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #17 on: March 02, 2006, 10:16 AM »
Alternative suggestion for finding duplicate triggers: maybe something like a simple AWK script
**Error: Problem Found: AWK not found under "knowledge" database ;)
But if you can do it, please do! :)

Next suggestion - documentation  :D
Yep, that might be a good idea, but as you can see, this started out only as being a small script. I expect to improve it over time :D

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #18 on: March 02, 2006, 10:33 AM »
**Error: Problem Found: AWK not found under "knowledge" database ;)
But if you can do it, please do! :)

A good place to start is Eric Pement's Web site  http://www.student.n...du/pemente/index.htm
Follow the AWK link (by the way, if you follow his SED link and keep paging down, you get to an excellent summary of text search-and-replace tools, though that's not relevant here)

Mr. Pement has a link to the AWK FAQ  http://www.faqs.org/...mputer-lang/awk/faq/

which has onward links for various places to get AWK.  There are implementations (usually interpreters) for just about every platform, most of them free.




jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #19 on: March 02, 2006, 12:45 PM »
Yet another update.
Today I had some free time, so I tested thoroughlly the script, and found out that the earlier versions didn't behave correctlly. When the person didn't put the trigger after writing the hotstring, the string would still be deleted. That didn't make sense.
So, this is the last version.
I tested it as much as I could, and everything looks right.
Now, it stores the options chosen in the last execution in one ini file, checks for the existance of the file it's about to write, I have fixed one issue with the trigger time, and now if you don't press the trigger key, the string isn't replaced.
I just hope this is the last *fix* update I have to do. Sorry, but please download the latest version from the post above.

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #20 on: March 02, 2006, 06:57 PM »
Ah!  The final version is a lot better, in fact!  I too had noticed, after my last post, that there was a bit of funny behavior.  Actually, I didn't mind the string being deleted so much (it would also disappear before hitting the trigger, so to speak), but if there was atl=at this level , then, when trying to type something like atlanta, you couldn't actually do it without hitting the end key or something, there was interference.  That's gone now.  I am very happy.  Please consider this the last "fix."  I ended up asking for (and getting!) more than I had originally intended.  This looks really, really good.  I'm deeply grateful for the work put into it, jgpaiva. 

rjbull, thanks for your input.  (Not to claim that I understand the language part, you understand).  Do I actually remember them all?  No way.  That's why I use what to me, is the best expander out there.  It's called Instant Text.  It has incredible abilities, such as coming up with continuations of your phrases, and a whole lot more.  Maybe I'll talk about it in a separate post at some time, since this is a place for software talk.  But I'm not that sure I know all the rules and ins and outs of DC yet.  Anyway, I don't have to remember.  It has visuals.  Different from tooltips, but visuals.  Also, we try to have "systems" for our phrases.  That's a huge help, too.  Might be more than you want to know, though!   :D

Anyway, I and others I know have had a large interest in AHK for a long time, and the issue of importing so many abbreviations is so big to us, and this script is just so fantastic.  There are features galore transcriptionists like to have, but I personally would never have gotten anywhere near this point, no way.  And it's just very exciting to me.  Having the tooltips thrown in is a joy, pure joy. 

I have not looked at Type Pilot, but of course I will.

Big thanks - again!
« Last Edit: March 02, 2006, 07:00 PM by Harrie »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #21 on: March 02, 2006, 07:25 PM »
Yep, everything seems to be right now. Good to know that! ;)
Just a few notes about the "trigger" field:
- to have the word be immediatelly replaced after you write it, add no trigger.
- to have a space as trigger, put Space in the "trigger" field.
- to have a tab as trigger, put Tab in the "trigger" field.
- to have a comma (,) as trigger, put `, in the "trigger" field.
- tiggers like LWin (for the left windows key) or LCtrl (for the left ctrl), can also be used.  For a complete list of the possible trigger keys, check http://www.autohotke...com/docs/KeyList.htm Most of the keys featured at this list should work as triggers.

(BTW, did you try the repeated entries search on that huge file you have? I'm curious if it works in an acceptable time.)
Oh, and another thing: With the latest version of ahk, you don't get the "repeated hotstrings" error, it simply uses the last hotstring found on the file. So, be carefull as the script might work, but some of the hotstrings can be ignored if you don't check for repeated entries first.

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #22 on: March 02, 2006, 07:41 PM »
Repeated Entries worked like a charm!  On that text file which was 35 pages in MS Word (in small font size, mind you), it found them.  I didn't time it, but I'd say 2 minutes, maybe.  I knew to wait, and then it popped up a message box telling me that the following strings were repeated (and listed them).

It is wonderful to have all those trigger choices!  Tomorrow, I think I'm going to check each one of them out, definitely the most common ones people might choose.  I had it in my mind one couldn't choose space.  I personally wouldn't want to use space, but others might.  These options just make it more cool.   :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #23 on: March 02, 2006, 08:35 PM »
this might be a good chance to remind people that when you see a little green $ next to someone's name (like the one next to jgpaiva's name) you can make a donation to them if you want to thank them for help or for coding something, etc.

by supporting those who help out and contribute to the site, we will make the site a more useful place for everyone, and ensure that it continues to improve.  remember that your donations are not just rewards for work well done, but think of it as funding continued furture work and support.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member
Re: DONE: an "importer" for abbreviations into AHK
« Reply #24 on: March 03, 2006, 03:53 AM »
Harrie,

The first program I ever learnt - I started in late 1988 - was a mid-period version of the best DOS shareware word processor, PC-Write.  I still use a later version today.  PC-Write has what it calls "shorthand expansion," which is very like AHK hotstrings, though naturally limited to the program.  It's easy to remember ones I use frequently, but not so the rare ones, and there were times when I wanted a point-and-shoot means of adding boilerplate text.  In my case, that's normally short phrases, words I often mis-spell, and bibliographic references so I get them in consistent format.  I never found a freeware or shareware one, and didn't discover commercial medical transcription text expanders until far too late.  In retrospect I could probably have used the DOS macro program Newkey in earlier days, but it doesn't work very well in a Windows DOS box.

Recently, I find that under Windows2000 at least, AHK hotstrings work even in a DOS box (which is now an emulation apparently, not "real" DOS).  It isn't perfect if you insist on using DOS programs, but it does mean I can port the relevant bits of my shorthand expansion file into AHK to make it available to other programs, both DOS and Windows.  This is a great convenience, or it will be when I get round to doing it, but I'd still like a point-and-press pop-up so I can access less frequently-used phrases.  Hence, I'd certainly be interested to hear about Instant Text, when you a moment.

As for the "language bit," it seemed a pity for jgpaiva to build a new tool when (with a small amount of augmentation) ones already exist to do the job, and might even be faster on big files.  However, as an old-tyme DOS hand, that's just the way I'm used to working.