AutoHotKey Makes Repetitive Tasks Easier

AutoHotKey is a free, open source software for desktop automation in Windows. There is a lot you can do with it, but basic functions are useful and easy to understand.

How to Use it:

Making scripts is not hard, once Autohotkey is installed, files made with notepad and saved with the “.ahk” extension are recognized as scripts. Autohotkey can be exited easily from the taskbar and does not run on startup, so scripts will only run when you want them to. Commands can all be combined into one document, but it might make sense to have several files if they are not used frequently.

AutoHotkey has a helpful community that has worked out just about anything you would want to do. If you are looking for something in particular, chances are you will be able to copy paste it from a forum discussion.

Why You Should Use it:

AutoHotKey is useful for quickly executing repetitive tasks without having to think about them. Once you make something that works, you won’t want to go back. This helps focus while working on programs that have lots of complicated menus and shortcuts that you don’t need. Performing repetitive tasks with a simple keypress helps keep the focus on what you’re doing and not on remembering long hotkeys or navigating menus.

Basic Examples

Some General Uses Include:

Specifying the behavior of a keypress.

^z::^!z // this remaps control z to control alt z 

Launch multiple programs simultaneously. This example shows a few programs and methods for triggering them when the Windows key+m is pressed.

#m::
Run Notepad.exe  // launches notepad
Run C:\My Documents // opens “my documents” in windows explorer
Run www.google.com // opens a url in default web browser
return

Modify text input. Here is an example from the AutoHotKey website.

^!s:: // Ctrl+Alt+S becomes a hotkey to type a signature:
Send Sincerely,{Enter}John Smith
return

::btw::by the way // expands to "by the way" when "btw" is typed

Some of My Favorites

insert the current date:
This changes the “insert” key to add the current date. I find this useful for saving files or creating folders, it adds the date with the push of a button. The code can be altered to format the date any way you’d like.

Insert::
FormatTime, CurrentDateTime,, yyyyMMdd // date would appear as “20150417”
SendInput %CurrentDateTime%
return

Snipping Tool Shortcut:

Set your print screen button to bring up the windows snipping tool. This code remaps ctrl+printscreen to the original print screen function for when it is needed.

The biggest advantage of using this mail id of realsmartmail service is that you can legally purchase this medication online and have delivered to your house overnight if you find the customers are either reluctant cialis tadalafil online or commenting about the product vaguely, is a sign that you have a belief on poor lifestyle. The benefit of using organic oils is that, they leave no side effects on deeprootsmag.org levitra on line the genital area, as use of cheap oils may lead to impotency in the male body. More than a 100 houses caught cialis 10mg canada fire and burned down, making the town home to the world’s first aviation disaster. This modify learners to have a finer perceptive of how a vehicle works and the situations they cheap levitra professional might face.

$Printscreen::
Run, "C:\Windows\Sysnative\SnippingTool.exe"
return

$^Printscreen::Printscreen // preserving original print screen function
return

download images easily with Chrome:

Here is an example of a program specific function. If Chrome is the active window, this code lets you instantly save an image by hovering over it and pressing caps lock.

#IfWinActive, Google Chrome
Capslock::
Send,{RButton}
Sleep 200
send, {v}
Sleep 200
send,{Enter 1}
return
#IfWinActive

Navigating Menus:

Some programs require a lot of file menu navigation to perform a simple task. They typically offer ways to set keyboard shortcuts, but AutoHotKey can do a lot more.

A script for Illustrator to export jpgs by pressing the Windows key+j. Everything happens in less than a second.

#IfWinActive ahk_class illustrator
#j::
{
Send, !f // alt + f highlights the file menu at the top of the window
Send, {Down 18} // moves down the menu until “export is selected”
Send, {Enter}
Sleep 200 // pauses to let export window load
Send, {tab} // highlights filetype sub menu
Send, j // pressing “j” selects jpeg filetype
}
return

Learn More About AutoHotKey

In subsequent posts I plan on writing more about the applications of this software to specific programs, such as Photoshop, Illustrator, SolidWorks, and Chrome. Also check out these resources for more info and inspiring uses:

ahkscript.org

autohotkey.com/docs/scripts/

Show Us Your Best AutoHotKey Scripts – Lifehacker

share:

Leave a Reply

Your email address will not be published. Required fields are marked *