Page 1 of 1

Beginner's Guide to Writing AutoHotkey User-Defined Functions

Posted: 07 Mar 2020, 16:07
by jackdunning
User-defined functions are one of the most important tools in AutoHotkey, yet beginners with no programming experience can have difficulty with the concepts. Functions save time by storing repetitive code in modules for use in numerous situations.

A number of years ago, I wrote a blog in response to a reader's question which took his code and turned it into a function. In that blog, I addressed many of the nuances of functions that a beginner may miss.

I just reviewed and updated that blog "Writing AutoHotkey Functions to Make Life Easier" and thought I would offer it as a tutorial in this forum.

The blog addresses:
  • User-Defined Function Format
  • Creating an AutoHotkey Function to Replace Repetitious Code
  • Assigning Names to the Parameters
  • Calling the Function
  • Alternative Method for Calling a Function
  • Plus, a couple of extra AutoHotkey tips for beginners
March 30, 2020: To add more AutoHotkey function information for beginners to that listed above, I've written a new blog "Guidelines for AutoHotkey Function Libraries."

Re: Beginner's Guide to Writing AutoHotkey User-Defined Functions

Posted: 08 Mar 2020, 06:25
by SOTE
Great post.

Re: Beginner's Guide to Writing AutoHotkey User-Defined Functions

Posted: 23 Mar 2020, 09:33
by locas2018
it's great