Office Automation | Page 2

Use AutoHotkey to push clipboard to the Internet for rapid sharing

clipboard to the InternetI work with people around the planet on a daily basis. ¬†ūüôā ¬†Being able to quickly share my code with my collaborators is super-easy with this AutoHotkey script that allows me to push my clipboard to the Internet.

Here is a short video demonstrating the script

Use AutoHotkey to push clipboard to the Internet for rapid sharing

Code showing how I push my clipboard to the Internet

 

Office Automation | Page 2

AutoHotkey Webinar: 01/17/2017: Troubleshooting and Debugging

AutoHotkeyAutoHotkey webinar 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

  1. Message box / Tooltips ‚Äď Display values / pause script
  2. Error Level ‚Äď Success / failure of a command
  3. Try / Catch / Throw
  4. ListVarsDisplays the script’s¬†variables: their names and current contents.
  5. ListLines ‚Äď View Lines most recently executed
  6. ListHotKeysDisplays the hotkeys in use by the current script
  7. KeyHistory ‚Äď This shows history of most recent keystrokes & mouse clicks
  8. IsObject()This function returns 1 if Object Value is an object; otherwise 0.
  9. OutPutDebug ‚Äď For use in debugging- sends strings to display

Additional Tools

  1. dmp, Disp ‚Äď Functions for peaking inside objects
  2. Debug Clients ‚Äď tools you can tie to AHK & debugging
  3. AHK Studio ‚Äď Built-in debugging
  4. SciTE4AutoHotkey Videos & scripts demonstrating debugging with SciTE

Tips on General Approach

  1. Restart script & Computer (come on its windows…)
  2. Isolate the issue
    1. look immediately before and after where the issue is
      1. Use Message Box, ListVars, etc.
      2. Double-click icon & access ListVars, Key History, etc.
  3. Are you sure the error is where you think it is?
  4. Are you sure the variable is unique?
  5. Check scope issues (global vs. local)
  6. Data type / structure (String vs. Integer, Object, etc.)
Office Automation | Page 2

AutoHotkey Webinar: 12/20/2016: Intro to Classes in AHK

webinar

AutoHotkey Webinar Videos and Links Here is a link to video of the First hour Video of Second hour where we chit-chat about how to best solve some problems. Link to AutoHotkey Webinar resources: Jackie Sztuk: Admin@jszapp.com        jszapp.com                       Connect on LinkedIn      YouTube …

Continue reading

Office Automation | Page 2

Extract email address from text with Regular Expression in AutoHotkey

Extract email addressRegular Expressions are incredibly helpful for day-to-day tasks!  In this short video I demonstrate how easy it is to use a Regular Expression (RegEx) in AutoHotkey to extract email addresses from text.  The first half of the video shows how I use it to parse the haystack listed in the script.  The second half of the video I make a minor tweak and adapt it to work with any program that you can copy text to the clipboard.

Below is the code I demonstrate in the video

 

Extract email addresses via Regular Expression in AutoHotkey

Extract email addresses with Regular Expression in AutoHotkey