AutoHotkey Webinar- Spreading AHK Luv & Making $ with AHK

In our first hour of today’s webinar we talked through the below points on how to improve adoption rate of AutoHotkey for users as well as making money with AutoHotkey.

The second hour dove a bit deeper into both topics and discussed other subjects related to these.

Script Highlight:

FindText – Capture Screen Image & Find it

Don’t let the name “FindText” fool you (it isn’t about ‘text’)

 Things to keep in mind:

  • Make sure you keep the same: Screen resolution, magnification, font, zoom
  • Test Grayscale vs Color
  • You can adjust the size of the capture area (but smaller is generally better)
  • Tutorial 1 demonstrating the function and an Example using it
  • Function to help take action on what you find

PowerPoint deck / Resources:

Which best describes your Organization’s current RPA (Robotics Process Automation) adoption level?

Here is the full Slide deck, podcast, and book entitled: Service Automation: Robots and the Future of Work 2016 by Leslie P. Willcocks (Author), Mary Lacity (Author)

Misconceptions of RPA / Desktop Automation

Desktop Automation

  • …is only used to reduce workload & lay-off employees
  • …is mainly driven by cost savings
  • completely replaces the need for a person

Why Don’t More People Automate / Use AutoHotkey?

  • People do notlike change. (correlation with age?)
  • People don’t realize what canbe automated (“think small” – “magic redo” button?)
  • Managers / Decision makers think it is “too expensive
  • No “GUI” to use for creating scripts.  Non-techies get “overwhelmed” with coding.
  • Everyone is “too busy” to learn how to save time. Even though they’re interested in saving time they don’t find time to learn how to automate. (Story of a woodcutteris a great analogy; remember to take time to ‘sharpen the saw’)
  • Some people are too proud to let-on that they really don’t understand what you’re doing. They might try it on their own but get frustrated and give up after 15 minutes.  (Perhaps reviewing 1-1 is better than in groups?)
  • Managers oftendo not encourage their employees to automate. (I’ve had several bosses that told me NOTto automate.)
  • Most people think short-termand not long-term. This can present itself in the following dimensions
  • The job is “too small” to be automated (almost never true)
  • The job is a “1-time” need (rarely, if ever, the case; the “job” might be but the “approach” is bound to come up again)
  • I’m the only one that would use this (rarely the case)
  • It will take too long to write code to automate (I think this is one of the best things about AutoHotkey.  FAST!)
  • It must be “fully automated” (No need to automate the entire process)
  • Not considering “side-effects” of automation (tracking log to examine events, employee / customer satisfaction etc.)

Best Approach to Get Adopters

1.Don’t overwhelm them with all that AutoHotkey can do!

  • Only get them to learn 1 thing!
  • Give them time to learn/adopt that and then come back with additional tips

2.Curtail what you demonstrate to the prospect’s level

  • Luddites- Stick to HotKeys and HotStrings
  • Somewhat Nerdy- Demonstrate some scripts, Input box, Sending keystrokes / Clicks, File manipulation
  • Nerds- Whatever their need! (Dll calls, Image search, API calls, Web Scraping, Objects, RegEx, GUIs, etc.)

3.Get a senior-level advocate (Director or above)

  • Senior people see the cost-savings
  • Your supervisor will think your coding is counting against “their time”
  • Colleagues might be worried you’re “automating” them out of a job
  • IT also might try and road-block you. Get the business to “demand” it

4.Create custom script for their needs

  • Don’t build in all bells-whistles

Making $ Money with AutoHotkey

General Models

  • Selling generic programs / scripts to large audience
  • Selling custom scripts to individuals / company
  • Getting paid to code (they own the intellectual property) & you get paid by hour

Getting Paid

Licensing

Shareware / Freeware / Donations

Rich” Target markets

  • Lots of people doing same job function
  • “Thankless” / mundane jobs with clear logic/ “rules-based” descisions and structured data
  • Lots of, repetitive, transactions
  • Non-programming “business” people
  • People with Money!!!
  • Sales people!
  • Realestate

Incentives / Benefits to Highlight to Potential Clients

  • Employee / man-hour savings resulting in high ROI (Return on Investment)
  • Better quality results than from humans / Higher compliance
  • Faster deployment getting things done (clients / customers are happier)
  • Increased scalability
  • Happier, more productive, employees
  • Have more “Meta-Data” to do analysis on
  • The more you do, the easier it gets
  • The more you automate, the more time you have to automate

AutoHotkey Webinar- Parsing plain text with AutoHotkey

Video Hour 1: High-level overview:AutoHotkey Webinar

In the first hour of our AutoHotkey webinar we demonstrated Quick Access Popup from our guest speaker Jean Lalonde.  It is an amazingly customizable tool that allows you to have what you want at your fingertips!

Here is an abbreviated list of some of the great features:

  1. Create shortcuts to folders, programs, files, links, Snippets, special folders, etc.
  2. Easily create Hotkeys for above shortcuts
  3. Works with most Open/Save dialog boxes
  4. Integrated with most file managers (Windows Explorer, Directory Opus, Total Commander, etc.)
  5. The tool itself is highly customizable
  6. Have “shared” sections as well as individual ones
  7. Organize your menu into folders & sub-folders
  8. Customize Menu/GUI shortcut with an icon (that makes sense to you)
  9. Available in 10 languages

You can watch a short overview video here or get a deeper dive here.  Jean was kind enough to walk me through his tool in this video.

We then talked about what a “text file” is and frequent sources of them (Export from programs, sever logs, emails, etc).  We also briefly discussed what is File / Character Encoding & why are there frequent problems with it (this is a very deep topic which we could have spent days discussing!)

Also discussed  what a “flat file” is and how they are different than:

  • Multi-row files
  • Relational files
  • XML and JSON files

We then shared some of the frequently used built-in commands and functions for parsing text in AutoHotkey.

Then we got into various custom-built in libraries and functions

Then our guest speaker, Jean, took over walking us through some examples of common problems with AutoHotkey LoopParse command

The library is pretty cool and here are some of the main functions available:

  • CSV2Collection() – Transfer the content of a CSV file to a collection of objects.
  • Collection2CSV() – Transfer the selected fields from a collection of objects to a CSV file.
  • Collection2Fixed() – Transfer the selected fields from a collection of objects to a fixed-width file.
  • Collection2HTML() – Builds an HTML file based on a template where variables are replaced with content.
  • Collection2XML() – Builds an XML file from the content of the collection.
  • Collection2ListView() – Transfer the selected fields from a collection of objects to ListView.
  • ListView2Collection() – Transfer the selected lines of the selected columns of a ListView to a collection of objects.

ObjCSV Examples:  Here are the files Jean worked through.

  • SIMPLE CSV FILE – COMA DELIMITED (TheBeatles-coma.txt)
  • SIMPLE CSV FILE – TAB DELIMITED – ISSUE #1 (TheBeatles-tab.txt)
  • MULTI-LINE CSV FILE – COMA DELIMITED – ISSUE #2 (TheBeatles-Lyrics.txt)

Jean then gave us a review of how to use his ObjCSV library

  • Example using ObjCSV_CSV2Collection
  • SIMPLE CSV FILE – COMA DELIMITED (TheBeatles-coma.txt)
  • SIMPLE CSV FILE – TAB DELIMITED – ISSUE #1 SOLVED (TheBeatles-tab.txt)
  • MULTI-LINE CSV FILE – COMA DELIMITED – ISSUE #2 SOLVED (TheBeatles-Lyrics.txt)
  • PROGRESS BAR WITH LARGE CSV FILE – SEMI-COLON DELIMITED (LargeFile-semicolon.txt)
  • CUSTOM HEADER – SIMPLE CSV FILE – COMA DELIMITED (TheBeatles-coma.txt)
  • GUI Example using Collection2ListView
  • SAVING WITH DIFFERENT DELIMITER using ObjCSV_Collection2CSV
  • EXPORT HTML Example using ObjCSV_Collection2HTML

Wrapping up the first section we then saw a peak at CSVBuddy

CSVBuddy Examples

  • Reading large file with auto-detection
  • Editing field names, re-order or select fields
  • Saving options
  • Saving file with multi-line content converted to single-line (Excel-ready)
  • Reverting the single-line file to multi-line (for example, after manipulation in Excel)

Video Hour 2: Q&A:

In the second hour we discussed various issues working with text data as well as took a deeper look into Quick Access Popup.

Near the end of the time Capn Odin shared a Trie script he’s been working on.  You can check out the script on the forum

AutoHotkey Webinar- Intro to Web Scraping

In this AutoHotkey Webinar we cover an Intro to Web Scraping.Intro to Web Scraping

Video Hour 1: High-level:

  • What is an API call
  • Web Scraping vs. WebServices / API
  • Document Object Model (DOM)
  • Structure of a web page
  • Frequently used Methods & properties

Video Hour 2: Coding and Q&A

  • Building code
  • Using AutoHotkey syntax writer
  • IE verse Edge
  • Selenium for Chrome, Firefox, IE , etc.

Script Highlight: Long-pressing Hotkey to Exit a script

The below script is more of an example of how you can have more than one hotkey for a given key by tying it to how long you press the key.  In the below script, if you hold down Escape longer than 1/2 a second it will close the active program.

 

PowerPoint Deck presented in Intro to Web Scraping

Q) What is an API? (Application Programming Interface?)

A) Basically it is how devices (computers, tablets, phones, servers, etc) talk to each other.

Q) What are examples of common API calls

A) Below are a list of some examples (but the list is limitless)

  • Web Browser pulling up products on Amazon.com
  • Application / Software querying products for sale on Amazon.com
  • App on your phone getting latest Weather
  • Database pulling updated sales report
  • Using your Tablet to Select movies to watch on Netflix
  • DropBox application syncing files between your computer & cloud
  • Using Web browser to access files in DropBox

Q) What are the Main Differences between Webservice / API call & Web Browser

Q) What is the HTML DOM: Document Object Model

A) Think of the DOM as the “road map” for a webpage.  Depending on what you are trying to get/set, you’ll rely on the DOM to get the exact element you’re looking for.   Below is an image which stresses the more-frequently-used parts.

Q) How does a Family Tree similar to the DOM?

A) Both are “hierarchical” and, depending on what elements are populated, you can reliably “talk” to the correct node.  The first tree below shows how some nodes have all elements populated while some are missing some (like Name and ID)

Q) What happens if a new Node is inserted in the Tree?

A) It depends on which element you are looking at.  Names and IDs probably will not change however Tagnames often will.  This is why it is recommended to first use IDs, then Names, then ClassNames.  Use Tagname last (or go up the tree a bit and grab an ID/Name then use that “branch”)

Q) What are the frequently used methods for selecting an Element?

A) The methods below are sorted by the most reliable/stable (not presence).  When ID is present- use it!  If no ID, Name is another great one…  Classname is also becoming more reliable

  1. getElementByID– Great because if it is present it is should always unique
  2. getElementsByName– While not required to be unique, it often is so very reliable
  3. getElementsByClassName– Often unique and present
  4. getElementsByTagName– Check if there is an ID/name above it, then jump “down” to it first then use TagName)
  5. querySelector/querySelectorAll- Most flexible but is the most complicated- (If you know CSS, this is much not hard to adapt)

Q) What are Frequently used Get/Set/Trigger HTML Elements?

A) The below are the most frequently used however this is highly tied to what your goal is.

Methods:
.click() – Clicks the element
.fireEvent(“onclick”) – Fires the click event (sometimes needed to trigger the event)
.focus() – Place the cursor in the element/edit field (set cursor)
.selectedIndex() – Dropdown box selection
.checked() – Radio / Checkbox selection

Properties (Get & Set):
innerText – the plain-text for the element
.value – the plain-text for the element
.outerHTML – the HTML for the element

Additional Resources

AHK specific:

Learning the DOM (If you spend time on this you’ll thank us later!):

AutoHotkey Webinar- Working session demonstrating ways to automate programs

AutoHotkey webinar– Working Session

This webinar was mostly working sessions and not a lot of resources.  It is a follow-up to our last webinar which discussed many different ways to automate windows programs using AutoHotkey.  Please the resources on this page, and watch the videos, if you want to review in depth.  We had links to the various tools that were used in the below webinar.

Script highlight: Use Google to Search for help

Thanks for attending the AutoHotkey webinar!  If you’re not currently registered for future ones, you can do so here