Hotstrings.ahk, application for learning / managing of hotstrings

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Hotstrings.ahk, application for learning / managing of hotstrings

20 Oct 2020, 13:33

[Mod edit: This topic was split from Jack Dunning's Hotstrings topic here]

Hello,

Description: Advanced, configurable, text replacement tool written in AutoHotkey language.
Image

Hotstrings.ahk (GitHub link to source code and 64-bit executable); SourceForge link to executable (64-bit).
Current free edition (MIT license): 3.6.22 (@ 2023-12-05).
Current commercial edition (EULA license): 3.6.22, available at Hotstrings.technology.

Source code:

Code: Select all

Disclaimer: code isn't published here as its size is much over forum limit (> 448 KiB). If you wish to see the source code anyway, please visit above GitHub address.
The main window of Hotstrings application:
Image
Image
Image
Image
Image

Promotional YouTube videos:





Some of the key features:
  • text replacement: abbreviations (aka triggerstrings) are replaced with expansions (aka hotstrings); this mechanism in original AutoHotkey documentation is called "auto-replace hotstrings";
  • definitions (triggerstring, hotstring) are stored for future reference within .csv files called libraries;
  • libraries can be dynamically enabled / disabled;
  • thanks to .csv files you can group your favorite definition libraries, e.g. emojis, physical symbols, first and second names etc.;
  • import of existing collections of (triggerstring, hotstring) definitions from within .ahk files; example: famous AutoCorrect.ahk with over 4 800 definitions can be easily imported.;
  • export of libraries (.csv) files to .ahk files;
  • one triggerstring can be used to trigger multiple hotstrings displayed in form of shorthand list (aka. tooltip);
  • entering of actual hotstring into edited text is configurable with plenty of available options: Clipboard, SendInput, SendEvent, SendRaw, SendPlay;
  • GUI (Graphical User Interface) for easy definition and/or edition of hotstrings; graphical overview of existing hotstrings with search capability;
  • All events (triggerstring tips, active triggerstring tips, basic hotstring is triggered, menu hotstring is triggered, undo) configurable via GUI including sound emitting;
  • syntax of definitions is compatible with AutoHotkey options (B0, C, ? etc.);
  • new hotstring definitions can be pasted into application directly from clipboard;
  • undoing of last hotstring with user defined shortcut (Ctrl + F12 by default);
  • written entirely in AutoHotkey script language, single file, great for learning;
  • can be installed and run as standalone application thanks to .exe file
  • "active triggerstring tips": shorthand list of triggerstring tips (tooltips) is now mouse clickable or keyboard selectable; you don't have to enter complete triggerstring definition; enabled or disabled upon liking;
  • enabled basic logging of triggerstring / hotstring definitions within user data folder (c:\Users\<UserName>\AppData\Roaming\Hotstrings\);
  • "static" triggierstring / menu hotstring window;
  • improved / reworked tabbed events configuration window ("Signalling of events");
and many, many others.

Additional repositiories:
  • separated GitHub repository dedicated to Libraries.
  • separated GitHub repository dedicated to Help.
  • additional conversion scripts and miscellaneous other files: Hotstrings-Tools.

Installation / use:

1. Recommended: installer file (HotstringsInstaller.exe).

Just download installer file and run it.

Caveat: many anti-virus software may warn you about virus threat or threat related to installation of software from unknown source.
Advantages:
  • installer installs not only Hotstrings application, but also set of libraries and other files (license, icon, etc.).
  • Installer can be run in silent mode. To do so run it from command line wit /S switch (capital letter is mandatory).
  • Default location of all the files: c:\users\<user>\AppData\Local\Hotstrings.
  • Installer source code is available here.
2. Script (Hotstrings.ahk)

Just download this file. To run it, you will need so called AutoHotkey interpreter. You can easily install it as standalone application. Just visit the AutoHotkey webpage, download and install it.

Advantages:
  • You will be able to run any *AutoHotkey* script, not only *Hotstrings*.
  • No virus warnings.
  • Full access to source code (happy hacking!).
The script is prepared to create / prepare all necessary files and folders upon the first run. I strongly recommend you to install it in default folder (c:\users\<user>\AppData\Local\Hotstrings).

Caveat: Libraries are not installed by script itself. You will need to download them manually from here) or from application menu.


3. Executable (Hotstrings.exe)

Just download and run this file.

Caveat: many anti-virus software may warn you about virus threat or threat related to installation of software from unknown source.

Advantages:
  • You don't need to install any other executable, as the AutoHotkey interpreter is bundled with script in this executable.
  • The executable will create / prepare all necessary files and folders upon the first run. I strongly recommend you to install it in default folder (c:\users\<user>\AppData\Local\Hotstrings).

Issues (bugs, feature requests)
Please add them here (GitHub).

Inspiration for this application and special thanks go to Jack Dunning who published original script InstantHotstrings.ahk.

Thanks to all people from this forum who supported me.

Kind regards, mslonik (🐘)

PS.
Please buy me a coffee ☕ or support me 💪 in any other meaningful way.
Please 😌 spread the word about Hotstrings, write ✍ review.
If you wish to be informed about news 🆕, please join newsletter.
My dream is to read one day in official AutoHotkey help about it in section "Script Showcase".
Last edited by mslonik on 08 Dec 2023, 07:13, edited 20 times in total.

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
r2997790
Posts: 71
Joined: 02 Feb 2017, 02:46

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

20 Oct 2020, 21:10

Czesc Maciej,

This is a work of art. Loved your walkthrough on Joe's webinar too. Quite brilliant. I have about 2000 hotstrings I'll need to migrate now ;)

I love in particular the menu item and the cleverness of your working in the clipboard option too.

Wonderful work!

Dziękuję Ci
Ryan
lawnmowerobot
Posts: 9
Joined: 21 Oct 2020, 04:04

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

21 Oct 2020, 04:12

Thanks for this tool which I found via the recent Joe Glines YouTube

When I try the script, I get the two error messages below and wonder if there are some simple tweaks (not an advanced user) I can make to get it to work?

Thanks
image.png
(44.73 KiB) Downloaded 101 times
image.png
(37.08 KiB) Downloaded 101 times
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

21 Oct 2020, 07:35

There's also an issue with @mslonik Hotstring3, It provides an error. Once I resolve the error by editing the code, the script still won't allow me to build a new hotstring library.

Image

EDIT The error was on my end only, wasn't the code.
Last edited by SirSocks on 26 Oct 2020, 07:36, edited 1 time in total.
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

21 Oct 2020, 12:19

Hi @SirSocks,

help me to reproduce your problem. What exactly do you do when this problem occurres?

Kind regards, mslonik

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

21 Oct 2020, 12:27

Hi @lawnmowerobot,

Please note that pictures you've published show a problem with Autorun.ahk and not with Hotstrings3.ahk. So to me it seems to be a problem with SciTE. The rule of the thumb: check your version of AutoHotkey environment, if it is the latest one, check SciTE if you've the latest version. Other suggestions: try to run Hotstrings3.ahk without SciTE editor. And finally: try to run Hotstrings3.exe instead of Hotstrings3.ahk.

Hopefully it helps.

Kind regards, mslonik

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

21 Oct 2020, 12:40

Hi @r2997790 ,

thank you for your kind words.
I have about 2000 hotstrings I'll need to migrate now ;)
Please note that we're working on this subject: in future there will be an import tool which supports format conversion. You could support us as well. For example you can send me your hotstrings library and we will try to import it.

By the way here at the bottom you can see our plans for future.

Kind regards, mslonik

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
gregster
Posts: 9014
Joined: 30 Sep 2013, 06:48

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

21 Oct 2020, 12:53

I guess it would make sense to split this topic after all.
It would make it easier to keep apart support requests for the different versions by different maintainers.

Edit: Done, after PM exchange with mslonik.
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

21 Oct 2020, 12:58

Hi,

yesterday it was my great honor and privilege to announce release of Hotstrings.ahk on AutoHotkey webinar of Joe Glines. Please take a look into it as I receive also suggestions for future development.

Next, today I've released "nightly build" with few bug fixes, including problem with "Add library" button reported earlier. From now on we're working on "sandbox" functionality. It's available for download here.

Kind regards, mslonik

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

22 Oct 2020, 16:12

Hi @SirSocks,

I suppose your problem is that you haven't downloaded Config.ini file together with Hotstrings.ahk. At the moment download of Config.ini is mandatory. Soon I plan to create the default one if there is no Config.ini. I strongly recommend downloading of Libraries folder as well.

Kind regards, mslonik
Last edited by mslonik on 22 Oct 2020, 16:18, edited 1 time in total.

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Hotstrings.ahk, application for learning / managing of hotstrings

22 Oct 2020, 16:16

Next release is ready for download. Added functionality: "sandbox", which is optional (available from menu → Configure → Launch Sandbox) small Edit area where one can test / play with newly created or existing hotstrings. By the way few bugs have been corrected including hotstring undo. Enjoy.

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: Instantly Create and Save Hotstrings with the Hotstring() Function

26 Oct 2020, 07:01

mslonik wrote:
22 Oct 2020, 16:12
I suppose your problem is that you haven't downloaded Config.ini file together with Hotstrings.ahk.
@mslonik You're right! Thanks for sharing your amazing script! :thumbup:
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Re: Hotstrings.ahk, application for learning / managing of hotstrings

26 Oct 2020, 07:32

@mslonik, thank you for your hard work on this script. I look forward to experimenting with it.
It's worth mentioning that this code in config.ini is liable to cause some consternation, as it will place the GUI off-screen on a single monitor setup (maybe elsewhere, I don't have any way to test).
Might it be better to ship the script with positive integers for X and Y?

Code: Select all

[Configuration]
SizeOfHotstringsWindow_Width=904
SizeOfHotstringsWindow_Height=551
SizeOfHotstringsWindow_X=-2229
SizeOfHotstringsWindow_Y=-1288
Regards,
burque505
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Hotstrings.ahk, application for learning / managing of hotstrings

27 Oct 2020, 10:48

Hi @SirSocks and @burque505,

I'm sorry for the confusion :oops: . My plan is for future (probably next week) to add some user oriented messages if Config.ini is missing and... automatically create the default one. Then also coordinates of the default computer monitor will be taken into account. For time being unfortunately user have to keep in mind that Config.ini is necessary to run this application.

@burgue505, today's build contain updated Config.ini prepared for default computer monitor. Sorry again... The negative coordinates are normal if somebody works in multi monitor environment, as I do. I should take it into account.

On Github I publish new revisions each day, sometimes also on weekends. To be honest I don't know if I should inform about every new release each day? I decided not to add too much messages to this thread.

Yesterday I decided to implement important change:

Changed library format. In order to migrate existing libraries to the new file format, the ChangeFunctions.ahk script is ready. Just exit Hotstrings.ahk and then start ChangeFunctions.ahk. Format of existing files will be then altered.

Also yesterday I've finished quite extensive task of preparing README.md file (Github).

This week in general is dedicated to "code review": better definitions of variables, comments etc. Next week I'll continue development.

Kind regards, mslonik (🐘)

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: Hotstrings.ahk, application for learning / managing of hotstrings

27 Oct 2020, 12:51

You're doing an excellent job @mslonik. I'd suggest changing the "menu & sendInput (MSI)" to pop up at the location of the caret. Currently this menu pops up at the cursor location. This menu is titled as the "hotstring listbox".
I'm using large dual screen monitors and I have to search my screen to find the "hotstring listbox".
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Hotstrings.ahk, application for learning / managing of hotstrings

31 Oct 2020, 07:56

This week (week 44) update.

Code review: unified indentation, also majority of variables and labels have now unified names.

Fixed bugs:
- if after start of the app the very first chosen hotstring definition was chosen, app have been showing error message,
- if there was no Libraries folder then Add function wasn't working correctly and no new file was created,
- without Config.ini app wasn't starting and error message has been shown,
- Clear button was not clearing all of edit fields, especially library name,
- Library name is now kept between restarts,
- windows About/Help and Clipboard Delay are now opened on the same monitor where main window of Hotstrings is located,

Added new functions:
- menu: Configure, choose triggerstring tips location: Caret or mouse Cursor,
- menu: Configure, number of characters for tips, how many characters have to be entered by user to show a triggerstring tip.

Added new definitions to Libraries (.csv files).

Polished help file.

Updated source and executable as always at Github.

Any support / comments are welcomed.

@SirSocks @gregster
App will now start even without Config.ini or without any library or even without Libraries folder. Your last suggestion about hotstring menu to be shown at caret location will be taken into account and implemented, probably next week, so stay tuned.

Next week new functionalities will be added, probably export of libraries. If you see some bugs or have requests for changes, feel free to contact me.

Kind regards, mslonik

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Hotstrings.ahk, application for learning / managing of hotstrings

06 Nov 2020, 13:19

This week (week 45) update.

✍ Code review:
- few places found with unused code, which was commented out,
- reduced amount of FileAppend lines.

🐛 Fixed bugs:
- main bug (dissapearing triggerstring tips) finally solved!!! (it was caused by timers),
- wrongly displayed triggerstring tips (too many or too less or at wrong moments) have been fixed.

🆕 Added new functions:
- menu of hotstrings (MSI, MCL) with numbers, so now to enter any hotstring it's enough to press number 1 ... 8, or press <↑> <↓> as before or <Enter> for default hotstring (top of the list),
- menu: Configure → Hotstring menu (MSI, MCL) → Choose menu position: caret or mouse cursor.

≝ Added new definitions to Libraries (.csv files).

Updated source and executable as always at Github.
Config.ini file has been removed from Github as it's now automatically created if necessary / not existent.

Next week:
- polishing of interaction between Search and Hotstring windows,
- import of existing libraries in native format of AutoHotkey (from .ahk files).

🗫 Any support / comments are welcomed.

Kind regards, mslonik

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Hotstrings.ahk, application for learning / managing of hotstrings

14 Nov 2020, 13:46

↻ This week update (week 46 of 2020).

🐛 Fixed bugs:
 - yes 🙂 but nothing spectacular this week, just small issues have been corrected.

🆕 Added new functions:
 - polished interaction between Search and Hotstring windows,

 - if multiple hotstrings are available for the same triggerstring, then small GUI is displayed; from now on its shape (color, font size etc.) is similar to triggerstring tip,

 - if hotstring menu is displayed, now by default short sound is produced; the sound is also produced if user presses keys, but hotstring menu is already visible; sound can be enabled or displayed from menu: Configure → Hotstring menu (MSI, MCL) → Enable sound if overrun,

 - command line options:
    Hotstrings.ahk(exe) s ← s stands for simple, application is run without GUI, so shortcut <#> + <Ctrl> + h does nothing,
    Hotstrings.ahk(exe) d ← d stands for debug, application is run but additional folder is created, called Log, with special content,

 - if there is no Config.ini, default one is created and then the first GUI is created in maximized mode at default computer monitor,

 - added import of native hotstrings from existing .ahk files/libraries (e.g. AutoCorrect.ahk).

Warning! This functionality isn't yet fully ready / tested! This week it should be considered as experimental. For sure there are bugs involved.

≝ Added new definitions to Libraries (.csv files).

Updated source and executable as always at Github.

Help file (README.md)
 Not updated this week.

⟳ Next week:
 - polishing of importing hotstrings in native format of AutoHotkey (from .ahk files),
 - export of hotstrings into native format of AutoHotkey (to .ahk files).

🗫 Any support / comments are welcomed.

Kind regards, mslonik (🐘)

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: Hotstrings.ahk, application for learning / managing of hotstrings

15 Nov 2020, 22:14

Thank you for the excellent bug fixes and new features! Keep it up!
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: Hotstrings.ahk, application for learning / managing of hotstrings

23 Nov 2020, 13:47

↻ This week update (week 47 of 2020).

🐛 Fixed bugs:
 - yes 🙂 but nothing spectacular this week, just small issues have been corrected.

🆕 Added new functions:
  Polished import and export .ahk files:
    - added menu: Libraries configuration, which enable
        Import from .ahk (native format of AutoHotkey) to .csv (specific format of Hotstrings application).
        Export from .csv (specific format of Hotstrings application) to .ahk (native format of AutoHotkey):
            Static hotstrings ← auto-replace "static" hotstrings.
            Dynamic hotstrings ← auto-replace hotstrings created with Hotstring() function.
        Enable/disable triggerstring tips ← for each library individually it's possible to disable triggerstring tips.

  Added new position to Configuration menu:
    - Triggerstring tips →
        Sort tips alphabetically ← triggerstring tips are at first sorted alphabetically.
        Sort tips by length ← triggerstring tips are at first sorted by length of triggerstring tips.

Added new definitions to Libraries (.csv files).
  AutoCorrect.csv imported from AutoCorrect.ahk (> 4 800 definitions (triggerstring, hotstring)).

Updated source and executable as always at Github.

Help file (README.md)
 Not updated this week.

Next week:
 - import of AutoCorrect (or AutoText) definitions from Libre Office .dat files,
 - import of Microsoft Word AutoText files.

🗫 Any support / comments are welcomed.

My comments: Application is... finished. At the moment I don't plan to add any new functionality. The project related to development of Hotstrings application is approaching to the end, which is planned on 30th of November (Monday ahead). That was a huge effort over last weeks and application very quickly was expanded.

Of course is car without a fuel is just a piece of junk, the same is with Hotstrings application: it is nothing without libraries. Some example libraries are available together with script itself, but more files are welcomed. I have some ideas how to provide already existing libraries, but more suggestions are welcomed.

One of my ideas is to import counterparts of AutoCorrect.ahk, which is great for English speakers, valid for native speakers of other languages, e.g. Polish. I've found that one of the great sources of such libraries is [url=https://github.com/LibreOffice/dictionaries]Libre Office[/url project.

Future
Belongs to you, dear users. Will the Hotstrings application be maintained? Hard to say at the moment. It's not yet planned. As mentioned above: the project is finished. The same is with libraries, which also will not be actively maintained. I'm occupied with other projects, to name at least O T A G L E...

The other idea is to commercialize Hotstrings application. Stay tuned, I'll inform about at in separate post.

At the moment this script serves it's practical purpose at medium size company. The main purpose is to align vocabulary used to name specific products and definitions of abbreviations at least in written form.

Kind regards, mslonik (🐘)

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 130 guests