Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 10, 2016, 02:28:09 PM
  • Proudly celebrating 10 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 50231 times)

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #50 on: April 10, 2006, 07:21:03 PM »
You most definitely need a page for your apps, jgpaiva.   :Thmbsup: :Thmbsup:

Well, being late as usual (but I have bloody taxes to blame that on), I've checked it out.  It's beautiful, lovely!  It's all working for caps now, it's expanding fast, and it took a huge file without a hitch.  It's very usable.  Now there is one last thing I notice, and I just know I did not specify this, despite you thanking me for my testing.  Got the caps just right for words, but if you have a phrase, like "tpw" for "the patient was," and you want "The patient was," you get this: The Patient Was.  I have booked a flight to Jupiter on the chance you want to come and get me now, and do me in.   :o  But I might cancel it on the idea that you programmers are always endlessly improving, changing, and otherwise meddling with your codes.  <grin> 

Thanks for your input, Carol.  I wouldn't have noticed it, not choosing space for my trigger, but in fact the majority of people do use space.  I really love that you can choose from so many triggers with this program. 

Kind of fun to watch it grow! 

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #51 on: April 10, 2006, 07:25:57 PM »
Got the caps just right for words, but if you have a phrase, like "tpw" for "the patient was," and you want "The patient was," you get this: The Patient Was. 
That's true, i made it like that because i understood you thought it should work like that. No problem, i'll fix it and post again ;)

Yes I am using the space trigger
Well.. Since i'll be updating this script, i guess i'll fix that problem too ;)

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #52 on: April 10, 2006, 07:49:45 PM »
I hope it is an easy fix, jgpaiva, and I apologize for being unclear.  I should know better, an excellent VBA programmer/friend of mine has repeatedly told me to be clear and concise and exact when expressing what I want.....eek! 

Thanks, I appreciate it.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #53 on: April 10, 2006, 07:58:29 PM »
Yes I am using the space trigger
Well.. Since i'll be updating this script, i guess i'll fix that problem too ;)

Keeps you out of mischief  :Thmbsup:

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #54 on: April 11, 2006, 04:49:45 PM »
Ok.. The new version is uploaded.
It now features:
  • Version naming ;)
  • Space trigger problem solved
  • Capitalization of only the first letter in the hotstring

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

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #55 on: April 11, 2006, 05:00:55 PM »
Neat - well done

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #56 on: April 11, 2006, 07:32:29 PM »
Jgpaiva, it's absolutely perfect.    Just perfect!  This is a beautiful piece of work.  Thank you a million times over for a job well done.  Wow! 

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #57 on: April 12, 2006, 01:07:11 AM »
I'm a little late to the party.

I have a couple of suggestions (based on my use of a macro program) that others may find useful :

1. Spaces allowed after phrases
Just wondering if it's possible to have spaces following the phrases in the textfile.txt

tqb=the quick brown fox
jo=jumps over
tld=the lazy dog.

ie there's a space after "fox" and "over"

Currently, the space after "fox" and "over" is not recognized.

As most people will use space as a trigger, they basically would be typing
tqb<space><space>jo<space><space>tld<space>

If the space after "fox" and "over" is recognized, then it becomes quite natural as they would be typing
tqb<space>jo<space>tld<space>

2. Repeat shortcuts
Most of us probably remember shortcuts based on a system of nemonics, so invariably, they would end up with many repeats somewhere along the way. Allowing repeat makes the process of creating shortcuts easy because you can then do it intuitively.

Right now, I use a macro program that allows repeats except that when you press the trigger (<space>) there's a popup that gives you the possible choices.

ap=approach
ap=appraise

The popup in this case would be
1. approach
2. appraise

To select appraise, all You have to do is press 2 and appraise would be inserted where the cursor is.

3. Tooltip location, font and color
An option to choose where the tooltip appears would be useful, ie either next to the cursor or next to the mouse pointer.

Right now, the tooltip appears close to where the mouse pointer is.
However, most of us would be looking where the cursor is rather than where the mouse pointer is.

By having the tooltip appear close to the cursor will ensure that you can keep your focus on what you are typing.

It would be nice too if one can set the size of the tooltip font (or even the color to help it stand out) so that a quick glance can do the trick for those of us who are a little over the hill.

4. Cancelling a shortcut
Right now, if I key a shortcut such as "ap" and realised that I made a mistake and want to cancel it, intuitively I press ESC, but that suspends the HotstringsScript.

Is there a Hotkey to somehow renable the HotstringsScript without having to Right Click the Icon in the system tray ?

Perhaps I'm asking too much.

jgpaiva, even without the above, as it is, it's already a work or art.
« Last Edit: April 12, 2006, 01:15:24 AM by patteo »

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,927
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #58 on: April 12, 2006, 03:44:33 AM »
patteo,

Which macro program are you using?

Would you get more mileage out of IntelliComplete or Instant Text (reviewed on DC by Harrie?)


patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #59 on: April 12, 2006, 03:49:41 AM »
I'm using Perfect Keyboard from www.softwareutilities.com

It's been around for many years now. At least 10+ years if I remember correctly.

Apart from shortcuts to replace text, it does a lot of other things like allow you to record keystrokes, and for the more adventurous, it has a lot of other functions in it and even a VBA like scripting language depending on which version.

It is very powerful indeed provided one taps the power.

Of course there are many such programs around.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #60 on: April 12, 2006, 03:59:46 AM »
1. Spaces allowed after phrases
Just wondering if it's possible to have spaces following the phrases in the textfil
I can see your point, i'll try to see what can be done.

2. Repeat shortcuts
Most of us probably remember shortcuts based on a system of nemonics, so invariably, they would end up with many repeats somewhere along the way. Allowing repeat makes the process of creating shortcuts easy because you can then do it intuitively.
I'm sorry but that goes a bit beyond my ahk cappacities. (although it'd be great.. anybody cares to adapt my code? :D)

3. Tooltip location, font and color
An option to choose where the tooltip appears would be useful, ie either next to the cursor or next to the mouse pointer.
At the beggining it had that option, but ahk doesn't recognize very well the position of the point of insertion of text, and sometimes, the tooltip would appear at a strange place. I'll add it back as an option.

4. Cancelling a shortcut
Right now, if I key a shortcut such as "ap" and realised that I made a mistake and want to cancel it, intuitively I press ESC, but that suspends the HotstringsScript.

Is there a Hotkey to somehow renable the HotstringsScript without having to Right Click the Icon in the system tray ?
This script works like that, it's supposed to be always suspended. When you type some shortcut, the tooltip labels (which are not suspended) go active and enable the rest of the hotstrings.
I don't think I understand veinry well what you mean.

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #61 on: April 12, 2006, 06:55:07 AM »
4. Cancelling a shortcut
Right now, if I key a shortcut such as "ap" and realised that I made a mistake and want to cancel it, intuitively I press ESC, but that suspends the HotstringsScript.

Is there a Hotkey to somehow renable the HotstringsScript without having to Right Click the Icon in the system tray ?
This script works like that, it's supposed to be always suspended. When you type some shortcut, the tooltip labels (which are not suspended) go active and enable the rest of the hotstrings.
I don't think I understand veinry well what you mean.

OK, I guess I am the one who misunderstood how it's supposed to work. I thought it went into suspended mode when I hit Esc. My mistake.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #62 on: April 12, 2006, 06:57:57 AM »
Right now, I use a macro program that allows repeats except that when you press the trigger (<space>) there's a popup that gives you the possible choices.

ap=approach
ap=appraise

The popup in this case would be
1. approach
2. appraise

To select appraise, all You have to do is press 2 and appraise would be inserted where the cursor is.

Try http://www.clasohm.com/lmt/en/ which does exactly this as you type. It learns your vocabulary as you type documents or you can feed it text documents to train it to your vocab. Don't go mad though if the dictionary gets too big it slows down. It doesn't expand abbreviations though (as far as I remember) just gives choices from the first few letters. IIRC you can include phrases though.

It has been a while since I used it but it worked pretty well.


Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #63 on: April 12, 2006, 07:04:42 AM »
I'm using Perfect Keyboard from www.softwareutilities.com

It's been around for many years now. At least 10+ years if I remember correctly.

Apart from shortcuts to replace text, it does a lot of other things like allow you to record keystrokes, and for the more adventurous, it has a lot of other functions in it and even a VBA like scripting language depending on which version.

It is very powerful indeed provided one taps the power.

Of course there are many such programs around.

Actually it orginates from http://www.pitrinec.com/ (I presume he must also have aquired the new domain name too - which was a good buy I guess!).

If you want a good Macro program MacroToolWorks (http://www.softwareu...s.com/toolsworks.htm) is not cheap but includes everything you could ever want out of a macro  apps, also PerfectMenu allows you to enhance all right click menus in Windows and add macro buttons to them etc. They work well together.

MTW Advanced Scripting Edition also includes Visual Basic scripting style support.

If you are going to buy any of these utilities it is worth considering Macro tool works as it includes the functionality of pretty much all the other utilities (except Perfect Menu).
« Last Edit: April 12, 2006, 07:07:35 AM by Carol Haynes »

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #64 on: April 12, 2006, 07:24:01 AM »
Try http://www.clasohm.com/lmt/en/ which does exactly this as you type. It learns your vocabulary as you type documents or you can feed it text documents to train it to your vocab. Don't go mad though if the dictionary gets too big it slows down. It doesn't expand abbreviations though (as far as I remember) just gives choices from the first few letters. IIRC you can include phrases though.

It has been a while since I used it but it worked pretty well.

Funny, thanks Carol for the heads-up. When I was downloading it, I realised that I had already downloaded this before in Oct 2005. But I just did not get to try it.

It just shows how important reinforcement is. And that's how this forum can really help one another. I mean it's so easy to do "Drive-by" downloading and never get to try them and forget why you even downloaded them in the 1st place.

Thanks again Carol and of course wr975 who mentioned this in another thread, http://www.donationc...78.msg22134#msg22134
And not to forget Mouser who started it all.  :Thmbsup:

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #65 on: April 12, 2006, 07:32:47 AM »
If you are going to buy any of these utilities it is worth considering Macro tool works as it includes the functionality of pretty much all the other utilities (except Perfect Menu).

Yes I agree with you Carol, Macro Toolworks is the "Mother of All Macros" for all the utilities at his site.

Frankly, it had a lot of power and unless you are committed to using it all, it may be an overkill to buy the Advanced Scripting edition. He has a support forum.

But of course there are also freeware alternatives though I have not tried them.

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #66 on: April 12, 2006, 07:37:23 AM »
One more thing.

There's a freeware at his site for those who like a machine to speedread for you, so you have more time to relax and have more time to surf www.donationcoder.com  ;)

Quote from http://www.softwareu...ies.com/pkwindex.htm
Keywords Seeker
"KeyWords Seeker helps you to decide if the e-mail you got or web page you entered might be interesting for you.  The main idea is very simple: Within KeyWords Seeker, that silently runs showing just an icon in the system tray,   you create a file of keywords that are interesting for you (keywords can be divided to several groups called vocabularies).  When you enter a web page or open an e-mail and want to know if it is worthy to read just drag the KeyWords Seeker icon from the system tray and drop it on the document you have open on the screen.  The KeyWords Seeker will "read" the document and searches it through for defined keywords. If some keywords are found then they are listed in a window for you.  Depending on keywords found (or no keyword found) you can decide if the document is worthy further reading.  Using KeyWords Seeker you never miss important information but save great volume of time not having to read everything you get."
http://www.softwareu...ies.com/pkwindex.htm
« Last Edit: April 12, 2006, 08:15:38 AM by patteo »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #67 on: May 01, 2006, 04:51:31 AM »
I'm just checking with the users of this coding snack that recent versions of autohotkey provide much better behaviour to this script, namelly in terms of speed in the hotstrings, since new,faster methods of "send" were implemented in latest versions. (v1.0.43+)

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #68 on: May 01, 2006, 06:34:37 AM »
Sorry to be the one to ask the dumb question but... I can't really make it work. Running the script, I can see the popups, but it never does any replacement. I wonder why. I have tried different triggers, and no trigger. Nothing works. I have deactivated my other ahk scripts just in case. I don't think I have any remapping to the spacebar at all (too obvious= I would not be able to write spaces).

Any ideas?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #69 on: May 01, 2006, 06:40:46 AM »
Sorry to be the one to ask the dumb question but... I can't really make it work. Running the script, I can see the popups, but it never does any replacement. I wonder why. I have tried different triggers, and no trigger. Nothing works. I have deactivated my other ahk scripts just in case. I don't think I have any remapping to the spacebar at all (too obvious= I would not be able to write spaces).

Any ideas?
Sorry, urlwolf, i really should have something explaining exactlly how it works. The script itself does not do any replacements, it creates another script that does replacements. In the main window, there's a "file to write" parameter. That's the output script. After you configure everything, you run the "HosttringScriptCreator", and it creates a new file in the same directory as the HostringScriptCreator (which has as default name "HotStringsScript.ahk"). That's the one you should run (after you create it).


Maybe i should add a messagebox in the end asking the user if he'd like to immediatelly execute the generated script.
Again, sorry for not being very explicit..  :(

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #70 on: May 01, 2006, 10:15:59 AM »
yes, yes, I know that. I'm a long-time ahk user.
It's just that the trigger key doesn't trigger anything.
Here is an example of the code that gets generated:

abbreviations file
404=I don't know
A3=Anytime, anywhere, anyplace
AAP=Always a pleasure

.ini file:
[Settings]
FileToRead=abbreviations.txt
FileToWrite=hotstringsScript.ahk
Trigger=
ToolTipTime=1000
TriggerTimeout=3000
Repeated=1

shortcuts file:
SetKeyDelay ,-1
return

:*C:404::
Tooltip,I don't know
send,I don't know
Sleep,1000
Tooltip
return

:*C:404::
Tooltip,I don't know
send,I don't know
Sleep,1000
Tooltip
return

:*C:404::
Tooltip,I DON'T KNOW
send,I DON'T KNOW
Sleep,1000
Tooltip
return

:*C:A3::
Tooltip,Anytime`, anywhere`, anyplace
send,Anytime`, anywhere`, anyplace
Sleep,1000
Tooltip
return

:*C:A3::
Tooltip,Anytime`, anywhere`, anyplace
send,Anytime`, anywhere`, anyplace
Sleep,1000
Tooltip
return

:*C:A3::
Tooltip,ANYTIME`, ANYWHERE`, ANYPLACE
send,ANYTIME`, ANYWHERE`, ANYPLACE
Sleep,1000
Tooltip
return

:*C:AAP::
Tooltip,Always a pleasure
send,Always a pleasure
Sleep,1000
Tooltip
return

:*C:AAP::
Tooltip,Always a pleasure
send,Always a pleasure
Sleep,1000
Tooltip
return

:*C:AAP::
Tooltip,ALWAYS A PLEASURE
send,ALWAYS A PLEASURE
Sleep,1000
Tooltip
return

By, th e way (!) it works!!!
argh! I know! it's the capitalization! I had the shortcuts in all capitals!!

Disregard my post! :D

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #71 on: May 01, 2006, 10:25:47 AM »
Congrats, urlwolf, you've found a bug!
When you submit a file in all caps, the script should create 3 hotstrings for each: all caps, first letter caps, and nothing in caps. Right now, with a file like that, it creates a script with 3 similar hotstrings, all of them in caps. Thanks!  :Thmbsup:

[edit] Just added a sticky note with it. I'll fix it asap. [/edit]
« Last Edit: May 01, 2006, 10:27:37 AM by jgpaiva »

urlwolf

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,797
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #72 on: May 01, 2006, 10:49:33 AM »
If trigger=Space, I get the popup after I type space, e.g.: _foo _. but it never autocompletes.
You actually have to enter a space, not the Space keyword. (hmm) to get it to work. That was confusing me.

Nice work!

A few ideas/feature requests if I may. As far as I know <- using the nice autocompletion here :D, you have to edit the shorcuts file to add a new one. There is a nice script that lets you select a block, hit a shortcut, and have the selection added to the file and the script reloaded. Here:

http://www.autohotke.../docs/Hotstrings.htm
(Hotstring helper)

It could be handy to add that to the end of the hotkeyScript.

Another idea would be to have a key to undo the expanded expresion quickly.

What do you think?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #73 on: May 01, 2006, 10:56:48 AM »
If trigger=Space, I get the popup after I type space, e.g.: _foo _. but it never autocompletes.
You actually have to enter a space, not the Space keyword. (hmm) to get it to work. That was confusing me.
Sorry, that's confusing to me too  :tellme:
I didn't quite get what you mean.

A few ideas/feature requests if I may. As far as I know <- using the nice autocompletion here :D, you have to edit the shorcuts file to add a new one. There is a nice script that lets you select a block, hit a shortcut, and have the selection added to the file and the script reloaded. Here:

http://www.autohotke.../docs/Hotstrings.htm
(Hotstring helper)

It could be handy to add that to the end of the hotkeyScript.
Hum.. True, that's a very needed feature, one of the most important. I'll add it to the sticky ;)
(This will make the script quite powerfull. Good idea ;) )

Another idea would be to have a key to undo the expanded expresion quickly.
Yes, also important (specially if you don't use a trigger ;) ). I'll add it to!

(bear in mind that i'm adding to te todo list, unfortunatelly i still have a few stuff to do before.)

Harrie

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 83
    • View Profile
    • Productivity Talk
    • Donate to Member
Re: DONE: abbreviations importer
« Reply #74 on: May 18, 2006, 04:27:57 AM »
That feature would be completely awesome!