An easier way to take notes

with AutoHotkey

by Denis Lamarre
last updated Sep 5, 2013
difficulty.png Intermediate

by Denis Lamarre

Description

Note taking is habit forming. Note taking requires some additional supplies that can clutter a desk. Post-it notes, a pen or a notepad in close proximity  to a computer is usually a sign that someone is prone to recording and using notes. That is often the case for most computer users, from office workers to IT experts.

A desktop computer file can be used to take notes which you open every time you need to save some information for later use. In most cases, the active windows the user has opened, have to be minimized to find the file, then restored after use. In any case, workflows are disrupted by this method and concentration has been lost.

This easy-to-use AHK script brings a much-needed note file in front of all the other opened windows to let the user type what they need to remember, save the file and close it, then continue working where they left off with minimum disruption.  Workflows don't suffer and concentration can be maintained.  Here's how it works.

Steps

Note: You can trigger the following script with your standard keyboard if you don't have an Enterpad. If so, just replace the line 1 on step 2 with your hotkey definition. The Enterpad hotkeys are useful for efficiency driven professionals who want to avoid the trouble of dealing with too many Windows hotkeys [learn more].

1

stencil-v4-todo.gifPrepare your overlay.
Choose a free key on the Enterpad to use to open a to-do file.
Name it something relevant. This example uses TODO.

2

Create your note file.
Create a "todo.txt" file with Notepad and save it to the same folder where your AutoHotkey script template is.

3

Code installation.
Copy/paste the following script in your AutoHotkey script template (Enterpad.ahk) at the chosen key location.

001:
IfWinNotExist, todo
   Run todo.txt
WinActivate, todo
return

More Info

A very useful feature of the script above is that you don't need to think if “todo.txt” is or isn’t already open to get it. If the "todo.txt" file is already open, the script above won't open another copy of the same file (which could result in the loss of some info if two concurrent versions of the file were edited at the same time). It will simply try to bring to the foreground the already opened “todo.txt” file. That's the reason for the use of IfWinNotExist (at line #2).

At line 3, we add the “.txt” extension while we don't at lines 2 and 4. The reason is simple : depending on your file manager settings, it is possible that Windows does not show the extension of your file in the document caption bar. Based on this fact, using “todo” instead of “todo.txt” ensures that the script will find your already opened file.

In some very rare cases WinActivate (or Windows) may fail to bring to the foreground the “todo.txt” window. If so, you would have to click on it in the taskbar to bring it to the foreground. Please let us know if you experience this situation, have information about it or have found a solution to it.