Monday, April 25, 2011

AutoHotKey Review: Free & Easy Windows Scripting (Macros) Super Excel Copy Example

Ok, ok, this is an old piece of software: http://www.autohotkey.com/ and the icon leaves something to be desired, but as far as hard-core macro functionality, it's got it.  You'll find other macro programs but this is great because 1. it's free, 2. it's easy to learn, 3. it does the job and 4. it's free.

Sometimes you do repetitive things on a windows machine. i.e. copy what's selected from the browser, switch to a spreadsheet, paste, and move down one line.  

Normally, you would just slog it out and do that sort of thing with the mouse and keyboard, but when you have to do it 50 times, it gets old fast.  Thats' where autohotkey comes in.  Here's a quick example of how you could automate that:

  • Run autohotkey (click on the installed program in the start menu)
  • Double Click on the icon in system tray (usually in the lower right hand corner of your screen), then hit File/Edit Script (or Control-E).  
  • A notepad window will appear with your default set of scripts.  If you look at the file, you'll see it has some samples: Win-Z (opens a browser) and Control-Alt-N (opens notepad). 
  • In the AutoHotkey.ahk notepad window, enter this simple macro at the bottom: 
#c::
Send ^c
ClipWait ; Wait for the clipboard to contain text.
SetTitleMatchMode, 2
IfWinExist Excel
{
WinActivate ; Activate Excel
}
else
{
Run Excel
WinWait Excel
WinActivate
}
Send ^v{enter} ; paste and hit enter to go to the next line
Send !{tab} ; switch back to original window
return
  • Hit File/Save, and go back to the AutoHotKey window (double-click the icon in the system tray) and select File/Reload script (or hit Control-R).   
  • Now, we've programmed Windows-C to be a super-copy so hit Windows-C and then go-ahead and copy something from any window.  AutoHotKey will take that copied text, and copy it into excel and then hit the enter key.  You can't realize how useful this is until you need it.  In the screen shot, I had selected, WinActivate and hit Windows-C, then selected Activate and hit Windows-C.  Notice how the excel window now has the two items.  

  • Of course I've only touched the surface here, AutoHotkey has many more features which you can look up as you need them.  Keep in mind that you can always access the nicely done built-in windows help from the AutoHotKey Help menu.


App Reviews

I just started another blog called "The App Review Spot"
http://theappreviewspot.blogspot.com/

It's a place that I'm going to write reviews of the software I use (or I have some interest in).

Monday, April 4, 2011

ssnooZe 1.1

ssnooZe 1.1 is in the App Store now!  Includes world weather (instead of just the US) as well as some other enhancements.  Check it out.