============================================================
EDIT: Forgot to mention the latest addition to the format for the List_*.txt files. You may see certain characters at the end of each keyword in the list files. These are to identify the keyword type for usage in the CallTipsForAll script below. This will change soon to be more intuitive. These extra characters have no effect on this script and are automatically removed.
Just run the script to process the files. You will get a MsgBox saying
Done when it's complete, and new
KW_*.txt files will appear, as well as
AutoHotkey.xml. Make sure all the source files are in the same folder. Right now the file names for
List_*.txt are hard coded in the script. But modifying it isn't too hard.
All created
KW_*.txt files are deleted first before being recreated.
The
List_*.txt files are where the magic happens. Here's the format:
Code: Select all
Keyword
AHK1 <--- use AHK1, AHK2, or AHK1/2
Desc line 1
/Desc line 2 <--- (/) inserts blank line above
| <--- use this to separate AHK versions in the desc if desired
AHK2
Desc line 1
Desc line 2
next entry ...
Note the 2 blank lines between the entries, this is required. Descriptions can be as big/long as you want. For the AutoComplete XML, everything below the
Keyword is is considered as one description. The
| is filtered out, but the new line is kept in the XML file. This is because this format will also be used in a script I am writing to use custom call tips in any text editor, and to filter between AHK v1 / v2 keywords/descriptions.
If you selected a monospace font in Notepad++ then you can design the descriptions in the call tips to include columns/tables/etc. You can have single blank lines in your description, but it's better to use
/ because this will insert a blank line and helps for better visual grouping while composing / modifying the
List_*.txt files. Using
< and
> in the descriptions won't cause issues in the XML. New lines and quotes
" are converted to HTML, ie.

 and ".
Edit the
List_*.txt files as you wish. Remove, add, or modify entries in these files:
List_Cmd.txt, List_Func.txt, List_Meth.txt, List_Object.txt, List_Prop.txt, then run the script.
In case it wasn't obvious, this script does not actually acquire or generate any other keywords. I acquired lists of variables, keys, flow control, etc., by other means. The main point of this script is only to generate an AutoComplete / call tips (function hints) XML file and keyword lists for Commands, Functions, Methods, Properties, and Objects.
The tricky part about AutoComplete files is that all the keywords have to be in alphabetical order (according to the Notepad++ documentation). So this script makes that easy, and you don't have to worry about alphabetizing it yourself. Just be careful about accidentally putting in duplicates.
A "debug" file of sorts is
test.txt. This file is a "half way point" that shows you the internal list used in memory, and it is alphabetized. So spotting duplicates is easy in this file. #Directives can't exist with
# in the XML file, so they
# is filtered out, but the terms remain. Multiple
<Overload> nodes are used for each keyword when duplicates are found, so if duplicates are intentional, this isn't a problem. Use can use duplicates to give full examples of one keyword in multiple contexts.
In Notepad++, if duplicates exist in the call tips (function hints) it shows as "1 of X" and up/down arrows you have to click on. I recommend minimizing duplicates, since for me it really slows down my workflow.
That's about it. Enjoy!