AutoHotkey Webinar Videos and Links
- Here is a link to video of the First hour
- Video of Second hour where we chit-chat about troubleshooting and other items.
Link to AutoHotkey Webinar resources:
Resources covered during AutoHotkey webinar
Script highlight Lintalist – Searchable interactive lists to copy & paste text with plugins. GitHub
General Advice
1.Annotate -Document / Add Comments for later review (Very helpful in long-run)
2.Modularization – Compartmentalize – Design code smartly so each “section” does one thing
3.Test Frequently
- Depending on your skill level, don’t make too many changes before re-running your script (the more experienced you are, the more changes you can make)
- ; Comment out old lines so you have backups of what was close
4.Take a break – Similar to proof-reading, taking a break can help you spot your own errors
5.Bobble-Head doll / Teddy Bear / Rubber Duck
- Clearly Explain the issue out loud to inanimate object
- Ask friend for help (preferably some programming experience but not necessary)
6.Search the AHK forum & StackOverflow
7.Post question to forum:
- Isolate issue & give example code / data / needed functions
- Explain circumstances in graphic detail causes of issue & what you experience
- Include Screenshots / Animated gif / Video if possible (this can help a lot)
Provide as much relevant data as possible (ver & bitness of AHK, Windows, other software, Hardware, etc.)
Troubleshooting Tools
Built-in Commands
- Message box / Tooltips – Display values / pause script
- Error Level – Success / failure of a command
- Try / Catch / Throw
- ListVars – Displays the script’s variables: their names and current contents.
- ListLines – View Lines most recently executed
- ListHotKeys – Displays the hotkeys in use by the current script
- KeyHistory – This shows history of most recent keystrokes & mouse clicks
- IsObject() – This function returns 1 if Object Value is an object; otherwise 0.
- OutPutDebug – For use in debugging- sends strings to display
Additional Tools
- dmp, Disp – Functions for peaking inside objects
- Debug Clients – tools you can tie to AHK & debugging
- AHK Studio – Built-in debugging
- SciTE4AutoHotkey – Videos & scripts demonstrating debugging with SciTE
Tips on General Approach
- Restart script & Computer (come on its windows…)
- Isolate the issue
- look immediately before and after where the issue is
- Use Message Box, ListVars, etc.
- Double-click icon & access ListVars, Key History, etc.
- look immediately before and after where the issue is
- Are you sure the error is where you think it is?
- Are you sure the variable is unique?
- Check scope issues (global vs. local)
- Data type / structure (String vs. Integer, Object, etc.)