

SoundPlay, misc\shot.wav Plays this sound when Info button pressedįileAppend, %A_Hour%`:%A_Min% - Displayed Instructions`n, %LogFile% Writes entry to misc\uselog.txt file. (Not to subs they can't receive params)īuttonInfo: Creates button "Info" which opens misc\info.html instructions page So, you should (imo) do one of two things:ĭo things the way described above, changing things like CheckCakeWalkKey() to GoSub CheckCakeWalkKeyĬhange everything to functions. (In AutoHotkey, you can only pass parameters to functions, so we use them also when parameters need to be passed, instead of something like 'Param := false' then 'GoSub, some_sub_which_uses_Param_var') Subroutines change state (e.g., modify variables/modify Gui, etc) and do not return a value. If you want to be a purist, Functions do not change state and return a value.

Your number one inconsistency is functions vs subroutines. However, in a large script, they can be frustrating once a bug pops up. Inconsistencies are fine in small scripts. MANY more lines, all MUCH more readable now that they are all just 'Gui' The above is the same as the below in functionality. MANY more lines all starting with Gui, 2: I will sit down and spend some serious time following the script, and give my advice.

All the low hanging apples have been picked. This script is getting both shorter and better at the same time!
