Kindle Notes & Highlights
by
Nick May
Read between
January 31 - February 6, 2020
I like to describe AutoHotkey as the tool you never knew you were missing.
there is also a portable version of the AutoHotkey that doesn’t require administrator rights.
keep trying scripts until they work. In the industry we might call this iterative development, but you can just call impatience.
The first line ^F5::reload tells AutoHotkey that when we press the Control key and the F5 key that we want to reload the current script; re-read the script file from disk and execute all of the code found in that file.
if a change breaks AutoHotkey, the old version of the script will keep running & your customized computer will keep working the way you expect. (However, if you don’t fix the script before you restart the computer it will remain broken.
AutoHotkey isn’t a normal programming language; it’s a series of useful kludges, instead of a cohesively designed system.
One way to work around a hotstring that gets in your way (and the only way I was able to type up this section with all of these hotstrings enabled for testing) is to use the arrow keys while typing to interrupt the flow of characters that AutoHotkey sees.
AppsKey::Capslock ; retain ability to use CapsLock via the key between RAlt and RCtrl,
almost every key that has multiple version on the keyboard can be specified to be the left or the right version of the key - eg the left or right Control key: {LControl} or {LCtrl} or {RControl}
if you’re SENDing a key, you can generally refer to it as {KeyName}, but if you’re using it as a trigger itself, just use KeyName, without the braces.
You almost always want to use the SendInput command rather than the Send command. It is a little slower, but is much more intelligent
Launch your web browser of choice with a new tab Chrome F6::run chrome.exe www.example.com
Launch your web browser with a specific page in a new window Chrome F6::run chrome.exe /new-window www.example.com