ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: abbreviations importer

<< < (4/16) > >>

jgpaiva:
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:
I hope it doesn't have errors now ;)
-jgpaiva (March 02, 2006, 09:11 AM)
--- End quote ---

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:
Alternative suggestion for finding duplicate triggers: maybe something like a simple AWK script
-rjbull (March 02, 2006, 10:00 AM)
--- End quote ---
**Error: Problem Found: AWK not found under "knowledge" database ;)
But if you can do it, please do! :)

Next suggestion - documentation  :D
-rjbull (March 02, 2006, 10:00 AM)
--- End quote ---
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:
**Error: Problem Found: AWK not found under "knowledge" database ;)
But if you can do it, please do! :)
-jgpaiva (March 02, 2006, 10:16 AM)
--- End quote ---

A good place to start is Eric Pement's Web site  http://www.student.northpark.edu/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/faqs/computer-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:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version