This little script, which is from an AHK script I use a lot, shows there's more than one way to show a menu for selections. Here, from the "Text Expander" tab on the menu, I use Insert->New for a new entry. I use "Command" as the Type for the Substitute, and "Trigger immediately" in Options.
The string I use to trigger it is ;fractions, the first reason being obvious and the second just because I like to start my strings with a semicolon (reason being that in normal typing there will always be a space after the semicolon).
Please note I've changed my "Separator" in Settings from the default to "|".
As you'll notice, you can get a completely different menu by replacing or adding entries, between the "|" separators or after the last "|" separator of course, in line:
TextMenu("¼|½|¾|⅓|⅔|⅕|⅖|⅗|⅘|⅙|⅚|⅛|⅜|⅝|⅞")
Code: Select all
TextMenu("¼|½|¾|⅓|⅔|⅕|⅖|⅗|⅘|⅙|⅚|⅛|⅜|⅝|⅞")
Return
TextMenu(TextOptions)
{
StringSplit, MenuItems, TextOptions , `|
Loop %MenuItems0%
{
Item := MenuItems%A_Index%
Menu, MyMenu, add, %Item%, MenuAction
}
Menu, MyMenu, Show
Menu, MyMenu, DeleteAll
}
MenuAction:
SendInput %A_ThisMenuItem%{Raw}%A_EndChar%
Return
Thanks for the program, Marko, I'll register soon unless I come across some deal-breaker.