Saturday, January 5, 2008

Self-Control

Concentration in writing and note-taking is essential. Often we are distracted by other (quite legitimate) concerns or ideas that don't belong into the present context. Klein recommends in his book On Time (see last post for more bibliographical details: "When an unrelated idea crosses your mind, write it down, then return to the original task without wasting any further thought on it. The next time you take a break, you will have time to consider that spur-of-the-moment thought."

I have always thought that this is a good idea. Therefore I wrote a little AutHotKey Script that, on pressing a Hotkey (F9 & r) opens an edit box in which I can write the thought and then save it to a file.

Here is the script:

F9 & r::
ScratchFile = C:\Users\...\scratch.txt
FormatTime, MyTime
Gui, Add, Text, x6 y67 w80 h80 , Entry:
Gui, Add, Edit, x66 y67 w380 h70 vContentText
Gui, Add, Button, x106 y187 w100 h30 , Enter
Gui, Add, Button, x296 y187 w100 h30
Gui, Show, x350 y182 h236 w461, New Entry
Return

GuiClose:
ButtonCancel:
Gui,Destroy
Return

ButtonEnter:
Gui, Submit
FileAppend, ----`n**%MyTime%**: %ContentText%`n`n, %ScratchFile%
Gui,Destroy
Return




It will work from any application, and it stores all those snippets, ideas, to do's in one convenient location until I can get to them later.

To look at the the text file I could use any kind of editor, but I prefer to do so in a ConnectedText Topic, in which I have the following information:


<% Python import sys import codecs f=codecs.open( r'C:\Users\...\Documents\Aktuell\Utilities\scratch.txt', 'r', encoding='ISO-8859-1') text=f.read() print text.encode('utf-8') %>


[[$FILE:C:\Users\...\Scratch.txt|Scratch]]

[[$CATEGORY:Tools]]

The reference to the file is there so that I can delete items I no longer need, etc.

It works perfectly, and it helps me in enforcing self-control.

No comments: