Changes hotstring options or ending characters.
#Hotstring NoMouse #Hotstring EndChars NewChars #Hotstring NewOptions
Type: String
Prevents mouse clicks from resetting the hotstring recognizer as described here. As a side-effect, this also prevents the mouse hook from being required by hotstrings (though it will still be installed if the script requires it for other purposes, such as mouse hotkeys). The presence of #Hotstring NoMouse anywhere in the script affects all hotstrings, not just those physically beneath it.
Type: String
Specify the word EndChars followed by a single space and then the new ending characters. For example:
#Hotstring EndChars -()[]{}':;"/\,.?!`n`s`t
Since the new ending characters are in effect globally for the entire script -- regardless of where the EndChars directive appears -- there is no need to specify EndChars more than once.
The maximum number of ending characters is 100. Characters beyond this length are ignored.
To make tab or space an ending character, include `t or `s in the list.
Type: String
Specify new options as described in Hotstring Options. For example: #Hotstring r s k0 c0.
The Keysharp-specific In option sets the default input level for subsequent hotstrings, without changing the hotkey default. For example, #Hotstring I1 selects level 1. An individual hotstring can override this with an option such as I0. This default takes precedence over #InputLevel, including a later #InputLevel directive. If no hotstring input-level default has been set, #InputLevel supplies the fallback.
Unlike EndChars above, the #Hotstring directive is positional when used this way. In other words, entire sections of hotstrings can have different default options as in this example:
::btw::by the way #Hotstring r c ; All the below hotstrings will use "send raw" and will be case-sensitive by default. ::al::airline ::CEO::Chief Executive Officer #Hotstring c0 ; Make all hotstrings below this point case-insensitive.
Like other directives, #Hotstring cannot be executed conditionally.
Unknown options or malformed values throw a ValueError. K, P, and I require decimal integer suffixes; I must be from 0 through 100. Failed option strings leave the defaults unchanged.
Sets a hotstring input-level default and overrides one hotstring. A later #InputLevel leaves the explicit hotstring default in effect.
#InputLevel 0 #Hotstring I2 ::btw::by the way ; Input level 2. :I1:omw::on my way ; Input level 1. #InputLevel 3 ::fyi::for your information ; Input level 2.
The Hotstring function can be used to change hotstring options while the script is running.