AutoHotkey News – I Almost Burned Down My House! Here’s How It Happened!

AutoHotkey NewsletterHowdy,

This weekend I worked on replacing a ceiling fan in the master bedroom.

My son asked if we should throw the circuit at the main breaker.  I told him we turned the switch off on the wall and, as long as nobody messed with it, we’d be fine.

Boy was I wrong !

While taking down the old fan, “spark’s flew” ⚡ which (thankfully) through the circuit breaker.

I was shocked!  (no not literally)

After further inspection I realized some one had left a bare “always hot” wire exposed in the box with nothing covering it.  It’s a miracle we never had an issue before!

Thankfully the circuit breaker helped prevent anything catastrophic from happening.

This reminds me of how some people are “afraid” of AutoHotkey / Automation.

Many of my managers used to think I might “break something”.

They didn’t understand 99% of the time, AutoHotkey operates at the “surface level”.

And, while it can give the impression it is, it’s not “magical”

The magic of AutoHotkey

Most of the time AutoHotkey can only do what a human can do.  Granted, it can do it much, much faster without errors but usually you’re not going to “break something.”

If you’re not understanding how AutoHotkey “works” or want to learn more about the 19 ways we use AutoHotkey to automate programs, Reply to this email and we can plan a call.

We’re the world’s best AutoHotkey shop and I guarantee we can save you time and

Now on with the show…

Learn how to Master VSCode Make the switch to v2 Intro to AutoHotkey Intermediate AutoHotkey Intermediate ObjectsGUIs are Easy w/AutoHotkey Access all our Courses; Quit when you want

Major news: Claude announces Automating your Computer

I was amazed to hear that Claude just announced you can use their API to automate your PC. 

While it is in beta, and relying on image search, it’s still a huge step forward.  Apparently you send a screen-shot of your desktop and the API will return coordinates which you click.   Not great, but I’ll take it!  So far every example I’ve seen has been on a Mac however it will be easy to do this on a PC!

We haven’t created a video on it yet but Matt Wolfe documented using it on a Windows computer here.

How To Install and Use Claude’s New AI Agent
How To Install and Use Claude's New AI Agent


Fixing Badly Created Files

I used to download files from sources like LinkedIn, SurveyGizmo/Alchemer, Facebook etc. that would give me really “weird” issues with my data.  The solution was technically simple however very complicated to explain.  Basically some programs (like Excel, Word, etc.) look for the Byte Order Mark (BOM) and will not assign the correctly “guess” the encoding without it.

Our executable FileFixer adds the BOM to the file which then will correctly import by these tools.  You can check out the issue in this video.

How to Remove those Weird characters in your file with File Fixer.exe
How to Remove those Weird characters in your file with File Fixer exe


Standardizing File Paths across computers

When I worked in Corporate America I’d often have 2-3 work computers (and had 2-3 computers at home).

It was always annoying to have to account for various paths depending on what computer I was at so I found a robust way to create a “fake drive” in Windows.

This approach is especially helpful because it exists before windows finishes loading.  So, if you’re calling programs to run at startup, this approach will not fail.

BTW- you might think you can just “map a drive” however, for reasons unknown to me, Microsoft’s tool only works on Network drives!

Now that we have a team of people working at the-Automator it is especially valuable to be able to copy a path to a file and share it with a colleague.   You can check out the tool in this video.

It’s also super helpful for creating temporary drives for projects you’re working on.  You can get the DriveMapper tool here.

Creating Fake Drives for easy access & Identical paths across computers
Creating Fake Drives for easy access & Identical paths across computers


Easily revert to previous versions of your code in VS code

Ever try and add a new feature to your script only to get side-tracked and not be able to finish❓  Then you go to use your script and realize it’s no-longer working because you didn’t finish what you started?

Isaias walks us through how to avoid this exact situation using VS code & git integration in this video.

How to easily revert to earlier versions with VS Code and GIT
How to easily revert to earlier versions with VS Code and GIT

This is one of the reasons why we say you should switch to VS Code!  It’s why we created an entire course walking you through how to get up and running in VS code.

Don’t forget, our courses come with a 30-day 200% money back guarantee!

200% Money Back Guarantee badge with a yellow and green starburst seal for AHK courses


Improving People’s Lives: Story #22

Michael, a Radiologist client, emailed me (somewhat panicked) saying that he changed his system and the script we wrote for him ~2 years ago had stopped working.

We squeezed in a call with him and not only fixed his tool but added some extra features so, if/when he upgrades his PC again, he can easily do the change himself❗


What we’re reading


AI / Chat GPT-3 News / Usage


⚡️Productivity tips:

Thankfully Ctrl + K:  will insert a hyperlink in many programs: Word, Excel, and PowerPoint, Chrome, Firefox, to name a few.


A spot of Humor  Dilbert offers Tech Support

This is a bit much but probably would be fairly helpful! Thanks Russell!

Dilbert: Reboot


What we utomated this week with AutoHotkey #60

Another very busy client week!  We had a record low number of scripts worked on (but really saved our clients a lot of time!).

You can see what we worked on last when in this video.

What we automated with AutoHotkey #60
What we automated with AutoHotkey #60


Client’s say…

I love your scripts because I don’t have to focus on so many things.   I just look at the image and rely on muscle-memory. — Michael N. (Radiologist)


Cartoon superhero mascot in green costume beside the bold text AHK Hero on a yellow background AHK Hero

Consider joining the AHK Hero club! Members receive 25% off courses, consultations, tutoring, done for you project work, etc.    Currently we have over 327 hours of recordings teaching AutoHotkey that is exclusive to AHK Hero members❗

During this Friday’s call we’re planning to discuss:

    • Help AHK Members with their code
    • Branching in VS code with git
    • Using Download verse httpRequest (API call) on YouTube thumbnail
    • Create Payroll tool AHK V2 GUI
      • The “rate” will be remembered for each employee. Each time the tool is launched, the rate will be there (but editable) and the hours are blank
      • the total is the Rate * Hours and rounded up to the nearest dollar

They also have access to exclusive & pre-released content and a 3 hours a week where we help people with their AHK issues (the Saturday calls are geared towards people new to AutoHotkey.)


️ Quotable quotes

  • The thing most people like least is a mirror — Dan Kennedy
  • The object of life is to make your vocation your vacation. — Mark Twain
  • If it doesn’t make dollars, it doesn’t make sense — Grandma

AHK Newsletter⏩SHARE WITH A FRIEND⏩

Do you know someone that would benefit from learning useful automation tips like the gems in today’s issue?  Take a second and forward this newsletter and bask in the glow of their undying gratitude.  Was this email forwarded to you?

Sign up for this Newsletter here.  We never share your email with anyone.  Ever!


The-Automator

Joe, Isaias, Irfan, Rizwan and staff


P.S. Yes, I did get the new ceiling fan in without burning down the house.  Just in time for fall!  LOL.

Just remember, we know of 19 ways to automate programs with AutoHotkey (17 of which do not involve sending keystrokes or mouse clicks so they are vastly more reliable.

Our approaches are much more robust & reliable!  Drop me a line if you’d like to learn more!

Or check our calendar and schedule a meeting.

Built-in Windows Hotkeys

Mastering Windows: Essential Keyboard Shortcuts

I. Streamlining Navigation and System Access

  • A. Swift Application Switching and Window Management: This section explores the power of Alt+Tab for seamless program switching and the efficiency of Win+M for minimizing all windows. It also covers Win+Arrow key combinations for maximizing, minimizing, and moving windows across monitors. (Shortcuts covered: Alt+Tab, Win+M, Win+Up, Win+Down, Win+Shift+Left/Right)
  • B. Effortless Access to System Features: This section focuses on shortcuts that provide quick access to key system functions and settings. It covers launching the Start Menu, Explorer, Search, Run dialog, Settings, Clipboard Manager, Accessibility Settings, Quick Link menu, and system information. (Shortcuts covered: Win, Win+B, Win+E, Win+F, Win+I, Win+R, Win+S, Win+U, Win+V, Win+X, Win+Pause)
  • C. Enhancing Accessibility and Interaction: This section explores shortcuts that improve accessibility and user interaction. It covers launching Voice Typing, using emojis, accessing the context menu, and utilizing zoom functionalities. (Shortcuts covered: Win+., Shift+F10, Win+H, Win+Plus/Minus)

II. Mastering Text Editing and File Management

  • A. Essential Text Editing Shortcuts: This section outlines fundamental shortcuts for text manipulation, including selecting, cutting, copying, pasting, undoing, redoing, finding, and replacing text. It also covers shortcuts for navigating within and between words and lines. (Shortcuts covered: Ctrl+A, Ctrl+X, Ctrl+C, Ctrl+V, Ctrl+Z, Ctrl+Y, Ctrl+F, Ctrl+H, Ctrl+Left Arrow, Ctrl+Right Arrow, Ctrl+Delete, Shift+End, Shift+Home, Double Click Mouse, Triple Click Mouse)
  • B. Navigating and Managing Documents: This section focuses on shortcuts for efficient document navigation, including moving between pages and jumping to the beginning or end of a line or document. (Shortcuts covered: Ctrl+Page Up, Ctrl+Page Down, Home, End, Ctrl+Home, Ctrl+End)
  • C. Formatting and File Operations: This section delves into shortcuts for basic text formatting, such as italicizing, bolding, and underlining. It also covers shortcuts for common file operations, including opening, creating, saving, and printing files. (Shortcuts covered: Ctrl+I, Ctrl+B, Ctrl+U, Ctrl+O, Ctrl+N, Ctrl+S, Ctrl+P)

AutoHotkey & API verse Human approach

I asked Google’s NotebookLM to explain how people sometimes use AutoHotkey to imitate a human, and sometimes they use API approaches

Summary:
The video discusses AutoHotkey (AHK), an open-source scripting language for Windows that allows users to automate repetitive tasks on their computers. The speakers, Susan and Jon, highlight the efficiency and versatility of AHK, explaining how it can mimic user interactions and communicate directly with software through APIs. They emphasize AHK’s accessibility for beginners while also showcasing its power for advanced users. The conversation touches on the supportive community surrounding AHK, making it an appealing choice for both novice and experienced programmers.

Key Points:

– Introduction to AutoHotkey [00:00:00]
– Susan expresses frustration with repetitive computer tasks and introduces AHK as a solution for automation.
– Jon describes AHK as a powerful tool that can handle various automation tasks efficiently.

– Capabilities of AHK
– AHK can automate tasks by mimicking user actions (keystrokes, mouse movements) at high speeds.
– It can also communicate directly with software through APIs, allowing for deeper interaction with programs.

– User-Friendly Nature of AHK
– AHK is noted for its accessibility, making it suitable for beginners while still being powerful enough for advanced users.
– The syntax is intuitive, allowing users to start with simple tasks and gradually take on more complex automation.

– Community and Support
– The AHK community is described as welcoming and supportive, providing resources and sharing knowledge.
– Active forums and documentation help users feel less intimidated by programming.

– Use Cases for AHK
– AHK is effective for rapid prototyping, allowing users to create simple GUIs quickly.
– It is also useful for system-level automation, making it easier to interact with Windows components and hardware.

– Conclusion
– The speakers conclude that AHK is not just for beginners; it serves as a specialized tool that can enhance productivity for all users.
– They encourage viewers to explore AHK to unlock its potential for automating tasks and improving efficiency in their digital lives.

Final Summary:
The video provides an insightful overview of AutoHotkey, emphasizing its role in automating tasks and enhancing productivity for users of all skill levels. With its user-friendly design and strong community support, AHK stands out as a valuable tool for anyone looking to streamline their computer interactions and unlock new possibilities in automation.

Navigating the Power of AutoHotkey: A Deep Dive

APIs compared to Human Interfaces: How do you use AutoHotkey?

APIs compared to Human Interfaces: How do you use AutoHotkey?


Source 1: APIs Compared to Human Interfaces: How Do You Use AutoHotkey? (Conversation Transcript)

1. Introduction (0:00-2:15)

  • Joe Glines introduces Isaiah Baz and the topic of discussion: comparing API-driven automation with human interface mimicking in AutoHotkey.
  • Joe presents a visual diagram to illustrate the two approaches and their respective pros and cons.

2. Exploring API Advantages and Challenges (2:15-7:15)

  • Joe and Isaiah discuss the benefits of API automation, highlighting reliability, consistency, and speed, while acknowledging the greater complexity and potential limitations imposed by developers.
  • They delve into the need for advanced programming knowledge when using APIs, specifically DLL calls, and the importance of understanding the target API’s documentation.

3. Contrasting Human Interface Automation (7:15-14:00)

  • The conversation shifts to the human interface approach, with its ease of use and rapid scripting for simple tasks but limitations in reliability and performance, particularly across multiple computers or monitors.
  • They debate the categorization of specific commands like ControlClick and WinMenuSelectItem within the human interface paradigm.

4. AutoHotkey’s Abstraction and Scripting Power (14:00-23:30)

  • Joe and Isaiah explore the concept of abstraction in AutoHotkey, where commands like ImageSearch and PixelSearch simplify complex Windows API interactions for users.
  • They discuss the trade-offs between scripting languages and full-fledged programming languages, highlighting AutoHotkey’s ability to bridge the gap between ease of use and powerful functionality.

5. AutoHotkey’s Uniqueness and Appeal (23:30-33:30)

  • The conversation shifts to the unique strengths of AutoHotkey, particularly its ability to leverage COM objects, providing flexibility and a wide range of automation capabilities.
  • They compare AutoHotkey’s ease of GUI creation to other languages like Python and C#, emphasizing AutoHotkey’s user-friendliness and accessibility for both beginners and experienced programmers.

6. Practical Examples and User Experiences (33:30-45:00)

  • Joe and Isaiah share anecdotes highlighting the practicality and effectiveness of AutoHotkey for automating everyday tasks, from web scraping to note-taking in a call center environment.
  • They discuss the longevity of AutoHotkey usage, with many users sticking with the language for over 5 years, attesting to its power and user satisfaction.

7. Automating WordPress with API vs. Human Interface (45:00-54:00)

  • The discussion turns to a real-world example of automating data extraction from a WordPress website.
  • They contrast the initial approach of using web scraping (mimicking human interaction) with the more efficient method of directly accessing the database through API calls.

8. The Power of WinHttpRequest and Bypassing Paid APIs (54:00-1:02:30)

  • Joe and Isaiah delve into the power of the WinHttpRequest object in AutoHotkey for interacting with web services and APIs.
  • They highlight the advantages of API calls over web scraping, emphasizing the speed, efficiency, and conciseness of retrieving data in JSON format.
  • They discuss how to mimic API calls even when a public API isn’t available by analyzing network traffic using tools like Wireshark or Fiddler.

9. Ethical Considerations and Final Thoughts (1:02:30-1:07:00)

  • The conversation touches on the ethical implications of using human interface automation to bypass limitations imposed by websites, emphasizing the importance of respecting website policies.
  • They conclude by summarizing the key advantages of AutoHotkey, particularly its ability to seamlessly blend both API-driven and human interface mimicking approaches, making it a powerful and versatile automation tool.

Source 2: Intro to AutoHotkey Version 2 | Learn to Automate Programs with AHK v2 (Video)

1. Introduction and Installation (0:00-1:45)

  • Joe and Jason introduce AutoHotkey V2, emphasizing its advantages over the deprecated V1 and outlining the video’s scope.
  • They guide viewers through the installation process, including downloading the main program and the recommended SciTE4AutoHotkey editor.

2. Creating Basic Hotkeys (1:45-5:15)

  • The video demonstrates how to create simple hotkeys using a straightforward syntax.
  • They showcase the MsgBox command to display a “Hello World” message and explain the use of brackets for executing multiple commands with a single hotkey.

3. Running Programs and Opening Websites (5:15-8:00)

  • The tutorial covers using the Run command to open websites and launch applications.
  • They illustrate how to incorporate multiple commands within a hotkey using the example of opening a website and displaying a message box simultaneously.

4. Using Modifiers with Hotkeys (8:00-9:45)

  • The video explains how to incorporate modifier keys like Ctrl, Alt, Shift, and the Windows key into hotkeys.
  • They demonstrate how to create a hotkey activated by Ctrl+Enter and open Notepad using the Run command.

5. Leveraging Hotstrings for Text Expansion (9:45-13:00)

  • The tutorial introduces hotstrings for text expansion, showing how to create simple replacements like typing “.ib” to automatically insert an email address.
  • They discuss the use of options within hotstrings, specifically the O option to omit the backspace ending character and avoid unwanted spaces.

6. Handling Special Characters and Raw Text (13:00-16:30)

  • The video delves into using special characters in hotstrings, including new lines (n) and moving the caret (Left).
  • They demonstrate how to send raw text using the r option, ensuring special characters like “!” are not interpreted as modifier keys.

7. Preventing Duplicate Script Instances (16:30-17:30)

  • They introduce the #SingleInstance directive to prevent multiple instances of the same script from running simultaneously, avoiding unwanted behavior.

8. Simulating User Input: Mouse Clicks (17:30-21:15)

  • The video showcases using the Click command to simulate mouse clicks at specific screen coordinates.
  • They demonstrate how to record a series of clicks and then replay them using a hotkey, illustrating basic automation for tasks like interacting with a calculator.

9. Simulating User Input: Keyboard Input (21:15-23:45)

  • The tutorial expands on simulating user input by using the Send command to send keystrokes and simulate typing.
  • They demonstrate how to send text, tabs, and enter keys to automate input tasks within various applications.

10. Troubleshooting and Resources (23:45-26:00)

  • Joe and Jason offer essential troubleshooting tips, including ensuring the script is running by checking the system tray icon and reloading the script after saving changes.
  • They highlight the AutoHotkey help file as a valuable resource and encourage viewers to join their live Friday support sessions on YouTube.

Source 3: Quick Reference | AutoHotkey v2 (Website)

1. General Information

  • Provides basic information about AutoHotkey V2, including the current version, website link, copyright information, and software license (GNU General Public License).

2. Quick Links

  • Offers quick access to essential resources for learning and using AutoHotkey V2, categorized into:
  • Getting started: how to use the program and run example code.
  • Tutorials: step-by-step guides on writing hotkeys, sending keystrokes, running programs, managing windows, and a beginner tutorial by “tidbit”.
  • Text editors: recommendations for text editors with AutoHotkey support.
  • Frequently asked questions (FAQs): common questions and answers about AutoHotkey.

3. Documentation

  • Links to comprehensive documentation for AutoHotkey V2, organized into sections covering:
  • Scripts: concepts, conventions, scripting language syntax, miscellaneous topics, built-in functions, variables, expressions, functions, and objects.
  • Interactive debugging: information on debugging AutoHotkey scripts.

4. Keyboard and Mouse Control

  • Directs users to resources focusing on keyboard and mouse interaction within AutoHotkey, including:
  • Hotkeys: creating shortcuts using mouse, controller, and keyboard combinations.
  • Hotstrings and auto-replace: automatic text expansion and replacement.
  • Remapping keys and buttons: modifying the functionality of keys and buttons.
  • List of keys, mouse buttons, and controller controls: a comprehensive reference for identifying and using various input devices.

5. Other Features

  • Points to resources for additional AutoHotkey functionalities, such as:
  • DllCall: interacting with dynamic link libraries.
  • RegEx quick reference: using regular expressions within AutoHotkey.

6. Acknowledgements

  • Expresses gratitude to key individuals who contributed to AutoHotkey’s development, including Jonathan Bennett (creator of AutoIt), Chris Mallett, and others.