Insert AHK Command/Function Parameters (with Search/Auto-Complete)
Posted: 06 May 2017, 11:43
Intro:
This tool provides automatic insertion of the parameter definitions for AutoHotkey's commands, functions, and directives (will be referred to simply as commands for brevity).
I developed this tool so that it would include auto-complete in a parameter insertion tool (I'm too lazy to type long command names) and because the hotstrings-based tool works very slowly in the main place that I use it: in Notepad++ with auto-complete enabled. This is because a hotstring (and Send command) is basically typing out the text, so Notepad++'s auto-complete tries to suggest words for it as it types, causing it to operate very slowly. This tool pastes the text into your editor, making it immediate and eliminating this issue.
Usage:
Alternate version with ToolTips option
As suggested by BoBo, here is an alternate version that allows the parameters to be displayed as a ToolTip rather than insertion into the editor. Select option from tray icon. Initiate as usual and ToolTip will display instead. Press Esc or Exit to dismiss ToolTip.
Download alternate version:
This tool provides automatic insertion of the parameter definitions for AutoHotkey's commands, functions, and directives (will be referred to simply as commands for brevity).
- It will auto-complete the command name using either of two incremental search modes: match from the beginning of the command name or match anywhere within it.
- A list of available parameter definitions will be displayed. It will insert the parameter list for that command, allowing you to select among the alternatives if multiple are available.
- It currently works with Notepad++, SciTE4AutoHotkey, AHK Studio, and AutoGUI. It should work with any editor that accepts pasted text and returns caret positions by adding the editor's WinTitle to the ahk_group.
I developed this tool so that it would include auto-complete in a parameter insertion tool (I'm too lazy to type long command names) and because the hotstrings-based tool works very slowly in the main place that I use it: in Notepad++ with auto-complete enabled. This is because a hotstring (and Send command) is basically typing out the text, so Notepad++'s auto-complete tries to suggest words for it as it types, causing it to operate very slowly. This tool pastes the text into your editor, making it immediate and eliminating this issue.
Usage:
- Press CapsLock to invoke the command/function search, which will match from the start of the names:
- Alternatively, press Shift + CapsLock so that command/function search will match anywhere:
(You can of course change CapsLock and +CapsLock to any other hotkeys you wish.) - Use up/down arrow keys to navigate the matched entries or keep typing until the desired command is highlighted.
- Press Enter to insert the command function name and to display its parameter definition(s).
- If there is more than one parameter definition available, use the up/down arrow keys to select and press Enter to insert the parameters.
- Press Escape at any time to exit without inserting the selection.
Alternate version with ToolTips option
As suggested by BoBo, here is an alternate version that allows the parameters to be displayed as a ToolTip rather than insertion into the editor. Select option from tray icon. Initiate as usual and ToolTip will display instead. Press Esc or Exit to dismiss ToolTip.
Download alternate version: