Thursday, December 13, 2012

End mind-numbing repetition


Once again, you find yourself sitting in front of your computer, eyes glazing over as you press the same sequence of buttons over and over to get something done. Maybe you had to create a complex folder hierarchy for a set of projects. Or maybe you had to copy, paste, and format the same sort of data multiple times.

Whatever the task was, it probably wasn't much fun.

The good news is that you can code your way out of such busywork, even if you're not a programmer. Here are five powerful automation tools that can help.

Directory Opus

When trying to automate something, it's wise to stop and think about the domain you're trying to work with. Does your task mainly involve repetitive text entry, or is it about moving and creating files? Narrowing the field will help you find the right tool for the job more easily—and when it comes to file operations, you can't go wrong with Directory Opus.
Directory Opus is extremely customizable and has its own simple scripting language.
Priced at $69 (in Australian dollars), Directory Opus is one of the costliest file managers around; it's considerably more expensive than, for instance, Total Commander ($44). That said, if you work with files all day, Directory Opus is worth every penny. You can customize all of your buttons, toolbars, menus, and commands, setting your own hotkeys and names for everything. You can also change the layout to look like anything from a dual-pane commander-style application to regular Windows Explorer to something uniquely yours.

This level of customization leads to easy automation: Directory Opus has its own built-in set of commands, making up a simple scripting language. For example, you can designate a single keystroke for creating a new document bearing today's date in a specific format (2012-12-13, 121213, etc.). You can arrange to select a collection of files and quickly rename all of them according to some scheme, or you can build a macro that selects all of the DOC and JPG files in the current folder, zips them up in an archive with a name and type of your choosing, and emails them. In other words, Directory Opus can help you automate just about any task that involves manipulating files, and its commands are well documented.

VBA

No article on the subject of automating daily work is complete without a mention of VBA (Visual Basic for Applications). You can't download and install VBA, but you probably already have it: It's built into Microsoft Office. If you're looking to automate any work that you do in Word, Excel, or Access, VBA is the tool you need. You can use it for just about anything, from entering text to formatting a document to working with external files to creating custom Excel functions.
Bundled with Microsoft Office, VBA lets you record macros and then customize them to do just about anything Office-related.
One of VBa's best features is that how easy it is to get started with. You can record a macro of yourself doing something (say, selecting some text and making it bold), and then use the built-in VBA editor to see what the macro looks like in code form. You can access the VBA editor by pressing Alt-F11 or by using the Developer tab on the Ribbon (though you must make that tab visible first).

The editor is a complete development environment, with built-in debugging tools, auto-completion, context-sensitive help, and more. When you're viewing a macro in the editor, you can easily customize it and gradually learn new abilities according to whatever you need for your project. In fact, working with VBA is one of the best ways to get into programming. Each macro is bite-size, and you can put it to use right away, making your work go more quickly and less tediously.

PhraseExpress

No matter what program you type into, you probably type some of the same things over and over again. Consider email greetings and signatures, or stock phrases related to your job ("Thank you for your interest," and so on). What if you could enter all of that repetitive text by pressing a key or two? This is what PhraseExpress does—and then some. It's free for personal use and $50 for business use after a 30-day free trial.
PhraseExpress can eliminate needless typing, and it supports sophisticated text macros.
Saying that PhraseExpress is a text replacement program is a bit like saying that a computer is a typewriter. Yes, you can save common snippets of text and quickly insert them with just a keystroke or two (a very useful feature); but you can do a lot more, too. For example, PhraseExpress can recognize when you correct a typo, figure out on its own certain typos that you commonly commit at the keyboard, and start offering corrections before you even notice that you've mistyped a word. It can enter dynamic information into snippets, such as today's date, or even the date six days from now. It can prompt for variables (like a person's name) and insert them in the right place in a snippet. And after installing a free add-on file from the PhraseExpress website, you can even use PhraseExpress as an inline calculator: Just type something like (10+5)*7= and the app will offer to replace that text with the correct result.

Powerful though it is, PhraseExpress has some limitations. For one thing, it's not a proper programming language: You can't easily configure variables, and the built-in editor doesn't offer line numbers or auto-completion for commands. Another problem involves the documentation: Its maker (Bartels Media) does provide some online documentation, but the information isn't especially thorough. On the other hand, PhraseExpress comes packed with useful examples—so if you like to learn by example, you might be able to find a macro similar to the one you need and then just customize it.

AutoHotkey

For years now, whenever I've needed my computer to handle something out of the ordinary, I've reached for AutoHotkey. Much like PhraseExpress, this simple (and free) script processor can respond to hotkeys and "hotstrings" (type wbr and AutoHotkey can replace it with "Best Regards"). But AutoHotkey's quick-and-dirty nature disguises a mature, powerful programming language that can handle everything from complex math operations to HTML transformations to creating whole user interfaces (windows, buttons, and all).
AutoHotkey's Window Spy lets you peer into any window on your system, to better automate it.
The most original thing I've ever attempted using AutoHotkey was a "Morse" utility: I wanted a tool that would do one thing when I hit Ctrl three times in rapid succession (dot-dot-dot), and do something else when I hit the same key in a dot-dash-dot pattern. AutoHotkey was up to the task, and I didn't even lose the Ctrl key's original functionality: All other hotkey combinations (Ctrl+S and so on) continued to work. In that case, I did struggle with the coding: Try as I might, I couldn't get the utility to work on my own, but AutoHotkey's friendly developer community came to my rescue, and a knowledgeable member created a script that did exactly what I needed.

Much like VBA, AutoHotkey is addictively easy to use right away. Your first need will likely be a simple one: to remap an annoying shortcut in an application that you use frequently, perhaps, or to create a quick macro for signing your emails. Once you see how easy such improvements are to make with a quick one-liner, you'll want to do more—which is where AutoHotkey's comprehensive documentation comes in. Full of examples and clear explanations, the bundled help file can give you a sense of what's possible, and how to achieve it. To make things even easier, AutoHotkey lets you perform many operations either in a simple syntax (a = Hello), or in a more professional way (for people who are already comfortable with coding in other languages, a := "Hello"). So, two syntaxes yield the same result, and everyone is comfortable. Add the community and its extensive collection of open-source scripts, and AutoHotkey takes automation to a new level.

Take Command

In the beginning was the command line, or so Neal Stephenson tells us. And disappointingly, not much has changed since then, at least with regard to the default Windows command processor, cmd.exe, and its bland black window. While Linux users enjoy slick semi-transparent windows that connect them to the powerful bash command processor, Windows users are stuck with an antique command line that doesn't resize properly and can't paste without a mouse command (pressing Ctrl+V will just cause ^V to print).

Microsoft's answer to this annoying situation is PowerShell, a powerful alternative command processor bundled with versions of Windows from XP SP2 to Windows 8. PowerShell can do lots of things, and its default console application is resizable, but you still can't select text via the keyboard, paste with Ctrl+V, or even resize its font quickly. In addition, the PowerShell command processor isn't easy to learn, and you may have to adjust your computer's security settings to be able to use it at all.
Take Command supports any command processor, including Bash.
Take Command, a $100 utility, proves that the Windows command line doesn't have to feel so ancient or be so complex. It takes a powerful yet simple command processor and partners it with a beautifully modern interface, for a result that leaves the default Windows interface years behind. The command processor, TCC, is a superset of the one built into Windows. So, dir is still dir, and del is still del, and everything you already know about working in the command line is still valid. But you also get lots of extra commands, and even the existing commands have switches in TCC that their cmd.exe counterparts can only dream of. As a result, like VBScript and AutoHotkey, TCC is a language you can gradually grow into; you can start with simple things, and you probably already know some of it.
The console interface is done just right. The window is tabbed, so it supports multiple console sessions at the same time. Pressing Shift and the arrow keys selects text. Pressing Ctrl+V pastes text into the console (amazing, I know!). An integrated file manager lets you see the impact of your actions on the file system in real-time. And when you're comfortable with the language and feel ready to write some batch scripts, you'll discover the best part: a built-in programmer's editor with a line-by-line debugger.

Take Command is expensive, but if you find yourself spending lots of time at the command prompt or having to troubleshoot why batch files are breaking, it's a great investment.

Which one? It's your pick

Software is a personal thing, and different users have different pet peeves. Fortunately, we don't have to create our own word processors and command-line interpreters for them to feel right. Even a simple tweak or two can go a long way towards making your software truly yours, and making your work go faster and more pleasantly. Start slow, and who knows: You might even become a coder.

By Erez Zukerman of PC World
http://www.pcworld.com/article/2019740/end-mind-numbing-repetition-with-these-5-powerful-pc-automation-tools.html

0 comments:

Post a Comment