Why AutoHotkey for Artists and Graphic Designers?

While Using AutoHotkey with Windows Makes Sense for Most Professions, It’s Not So Obvious for Artists and Graphic Designers

If you work in the graphic arts on computers, then you know that a multitude of programs exists for creating designs and original art pieces. Each one works a little differently with artistcartoonspecific strengths and weaknesses. You may even use a couple of particular software packages for certain projects. Wouldn’t it be nice to own a few tools which work in every one of those programs?

When producing ads and capturing screenshots, even I use a number of disparate apps for designing and finishing the artwork. (I have a preference for the free Paint.Net program.) However, no matter how powerful and feature-filled the software, I always want the tools to do a little more while working in each program. That’s where AutoHotkey comes in.

*          *          *

If you’re new to AutoHotkey, see this “Introduction to AutoHotkey: A Review and Guide for Beginners.”

*          *          *

When AutoHotkey comes to mind, we first think of Hotkey shortcut actions and Hotstring text expansion and correction. While ideal for writers and bloggers, it’s not obvious how AutoHotkey would work for the computer artist. But, if you have creative tendencies and use a Windows computer, then AutoHotkey can enhance the power of your PC graphics software. In addition to its unique program automation capabilities, AutoHotkey offers commands which make many cursor and mouse movement tasks easier:

  • The Click command (and MouseClick command) make it possible to precisely position the cursor at any location on the screen or within a window. The MouseClick command has similar functionality to the Click command, but”the Click command is generally more flexible and easier to use.”
  • The MouseMove command (and Send command) facilitate the automatic movement of the cursor to a new location.
  • The MouseClickDrag command holds down the specified mouse button while moving the cursor to a new location—then releasing the button.
  • The PixelGetColor command and PixelSearch command copies colors at a location and finds specific colors within a window area respectively.
  • ImageSearch command locates specific images within an area. (Often used to identify icons and buttons, I haven’t yet played with ImageSearch command.)
  • The BlockInput command allows the turning off of the mouse (or keyboard) while other actions take place.
Keypad
In the MousePrecise script, pressing the 0 (zero) key holds the left mouse button down while other numbers become micromovement cursor keys—one pixel at a time. Press 0 again to release the left mouse button. Press Add Class (.) to activate the feature for a new program.

Integrate these commands with any Windows software to build super tools. For example, I wrote an AutoHotkey script called MousePrecise.ahk which turns the keyboard numeric keypad into a mouse controller for moving the cursor one pixel at a time in one of eight directions. It works in any Windows program. (Find detailed discussions of the MousePrecise script beginning with this earlier blog and in the book AutoHotkey Hotkey Techniques.)

Note: Because script writing looks mysterious to many people, the myth spreads that only programmers can do it. Not true! Once the tools are understood, writing AutoHotkey scripts turns into very creative process ripe for anyone with the ability to solve puzzles. I contend that artists make some of the best script writers in the world.

Adding Enhancements to Your Graphic Tools

Rather than acting as a replacement program for specialized graphic software, AutoHotkey works best for creating tool add-ons which work in any Windows software. While the built-in tools in any given program may be great, there’s always something which makes them operate a little better. AutoHotkey does that.

AutoHotkey does not change the nature of any built-in graphic tools. It merely adds features taking any Windows program to the next level. As an example, I used the Window Paint program to demonstrate how AutoHotkey might improve the built-in tools.

AutoHotkey Library Deal
AutoHotkey Library Deal

Empowering Windows Paint with AutoHotkey

Since Windows Paint is such a simple program, it makes a great example. In a series of columns I wrote in the beginning of 2015 for ComputorEdge Magazine, I highlighted how AutoHotkey can control and add capabilities to Windows Paint tools. These AutoHotkey techniques can work with other Windows graphic software:

  • “Controlling Windows Programs with AutoHotkey”—Windows Paint is used to demonstrate how to draw and fill in a square with AutoHotkey. Find tips which help you to both automate the drawing of simple objects and control other types of applications with AutoHotkey.
  • “Using AutoHotkey to Draw a Straight Line in Windows Paint”—While you may never need to do this, these AutoHotkey Techniques apply to many other applications. Continued investigations into controlling AutoHotkey drawing tools in Windows Paint.
  • “Make Your Own Drawing Tools for Windows Paint with AutoHotkey”—Build functions with AutoHotkey to create controls for Windows Paint (or any other program). Learn how to use the same line drawing code over and over again by putting it in an AutoHotkey function. Then draw a line of any length at any angle anywhere in Windows Paint using only one line of code.
  • “Automatically Find Buttons by Color in Windows Programs”—Yet, one more reason to use AutoHotkey free software! This little know AutoHotkey command will scan a section of a window or image for a specific color. Use it to select colors in Windows Paint.
  • “Controlling More Windows Paint Tools with AutoHotkey”—Make identical squiggles, another reason to use AutoHotkey free software! One more step taken toward building AutoHotkey tools for controlling Windows programs.

Although not necessarily beginning level articles, these discussions offer insight into whether AutoHotkey might help you decide as a graphic artist whether or not you can improve your current Windows software by adding extras. (For your convenience, I extracted these columns from the original ComputorEdge issues and combined them into one free PDF download: AutoHotkey for Artist.pdf. The links may be obsolete, but the info is still good!)

As an example, short AutoHotkey scripts can replicate mouse movements accurately without human error. Discussed in the article “Controlling More Windows Paint Tools with AutoHotkey” a function uses the Paint Curve tool to create the figure shown in the screenshot below.

paintcurvetool

This script eliminates the human error cause by hand manipulation of a mouse. With each script activation, AutoHotkey replicates the same action. Change the script parameters to alter the result.

While the scripts listed in these articles demonstrate many graphic tool possibilities, my favorite artwork oriented AutoHotkey app has to be the MousePrecise script discussed above. I use it whenever I need to accurately place and/or drag the mouse cursor. I’m sure that many graphic programs offer similar features, but this one works in any Windows program.

If you’re a computer artist or graphic designer, you have plenty of reason to investigate AutoHotkey. As with any creative project, only your imagination limits AutoHotkey.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s