How to use optional parameters in AutoHotkey Functions

optional parameters in AutoHotkey FunctionsA white stress ball with the green AutoHotkey logo being held in a hand, with a laptop keyboard blurred in the backgroundFunctions in AutoHotkey rock!  Some functions though have items that either 99% of the time are the same value or are things that you rarely use.  In this case using optional parameters in AutoHotkey Functions is a great way to simplify your code!  Just remember that the optional parameters have to be listed after all of the required parameters.

In the below video I demonstrate how to set defaults and pass optional params to an AutoHotkey function.

Optional parameters in AutoHotkey functions

Four colleagues seated at a meeting table, with a green AutoHotkey water bottle in the center