Select Page

Managing Tasks and Projects

I have used a number of productivity tools over the years from Thinking Rock to OmniFocus and have always been frustrated by not being able to access and edit my projects anywhere and on any device. For example, OmniFocus is probably my favourite tool by a long way and I have it on both my iPad and iMac but was unable to access it online or on Windows.

Eventually, I wound up using ASCII text files and dropbox to allow me to share, review and edit my projects on everything from my phone (Android), my iPad and my personal and work PCs (Windows).

My preferred method of managing projects and tasks is by using a fairly simply form of David Allen’s system, Getting Things Done (GTD). This combined with a deep and rather geeky pleasure using the Markdown format to write almost anything (including this) resulted in the following;

  • A single text file with a .md extension representing a logical area e.g. a project, a team or even a department.
  • In any file a Project always starts with the markdown heading notation # (hash/pound) e.g. # Release Procedures. Sub projects are simply marked using two or more # symbols and are always classed as being part of the preceding higher level project.
  • All task starts with “– [ ]” or “– [x]”. Empty if the task is pending and filled if it has a different status e.g. – [x] for completed. You can use other characters to signify other statuses but I try not to complicate things by doing this. Any other text is simply treated as comments or additional notes belonging to the preceding task or project.
  • The other main element is to use the @ symbol to add any additional notations e.g. @due(date/time) @done(date/time) @delegated(name) @start(date/time), etc.

What follows are the Autohotkey scripts I currently use to make using this system easier.

Create a New Task

#^n::Send, {home}- [ ]{space}

win + ctrl + n adds – [ ] at the start of the current line

:*:nt'::- [ ] `

Typing nt’ adds – [ ] at the current cursor position

:*:- [ ::- [ ] `

Typing – [{space} simply adds ]{space} completing the checkbox and adding a space so you can just start typing the task description.

Add Task Detail

Then there are a number of scripts that help add the additional detail;

:*:a’::
:*:asn':: gui, add, combobox, vAssigned, Murray|name|name|name gui, add, button, default xm gPRD_Assignee, Set Assignee gui, show, autosize center, Select Assignee return

PRD_Assignee:
  gui, submit
  send @assigned(%Assigned%)
  gui destroy
  return

Typing a’ or asn’ displays a dialog allowing you to select a name from the dropdown list. It adds @assigned(selectedName) at the cursor. Just pressing enter without selecting an option adds @assigned()

:*:c'::
:*:con'::
  inputbox, context, Enter Context, Context
  send @context(%context%)
  return

Typing c’ or con’ displays a simple input dialog where you can type a context and it then adds @context(context) at the cursor. Just pressing enter adds @context().

:*:d'::
:*:due'::
  inputbox, dueDate, Enter Due Date and or Time, Due Date/Time
  send @due(%dueDate%)
  return

Typing d’ or due’ displays a simple input dialog where you can type the due date and it then adds @due(date) at the cursor. Just pressing enter adds @due(). All the date time scripts work for this dialog so you can use cdd to select a date and format from the Choose Date Dialog.

:*:dl'::
:*:del'::
  inputbox, delegatedTo, Enter delegate name, Name
  send @delegated(%delegatedTo%)
  return

Typing dl’ or del’ displays a simple input dialog where you can type the name of the person the task has been delegated to. It then adds @delegated(name) at the cursor. Just pressing return adds @delegated().

:*:dn'::
:*:done'::
  inputbox, done, Done Date, Done
  send @done(%done%)
  return

Typing dn’ or done’ displays a simple input dialog where you can type the date the task was completed and it then adds @done(date) at the cursor. Just pressing return adds @done(). All the date time scripts work for this dialog so you can use cdd to select a date and format from the Choose Date Dialog.

:*:prj'::
  inputbox, projName, Enter Project Name, Project Name
  send @project(%projName%)
  return

Typing prj’ displays a simple input dialog where you can type the project the task belongs to and it then adds @project(projectName) at the cursor. Just pressing return adds @project(). I only really use this if I’m quickly adding tasks to my inbox list and want to note the project it applies to. I plan to extend this a bit in the future to make it more useful.

:*:pri'::
  gui, add, combobox, vPriority, High|Medium|Low
  gui, add, button, default xm gPRD_Priority, Set Priority
  gui, show, autosize center, Select Priority
  return

PRD_Priority:
  gui, submit
  send @priority(%Priority%)
  gui destroy
  return

Typing pri’ displays a input dialog where you can select a priority status from a drop down list it then adds @priority(selectedPriority) at the cursor. Just pressing enter adds @priority().

:*:rpt'::
  inputbox, repeat, Set Repeat Interval, Repeat every
  send @repeat(%repeat%)
  return

Typing rpt’ displays a simple input dialog where you can type a description of how the tasks repeats e.g. @repeat(Every Tue at 1400). Just pressing enter adds @repeat().

:*:sta'::
  inputbox, status, Enter Status, Status
  send @status(%status%)
  return

Typing sta’ displays a simple input dialog where you can type a status e.g. @status(On Hold) or @status(75%). Just pressing enter adds @status().

:*:str'::
:*:start'::
  inputbox, startDate, Enter Start Date and or Time, Start Date/Time
  sendinput @start(%startDate%)
  return

Typing str’ or start’ displays a simple input dialog where you can enter a date e.g. @start(2016/10/01). Just pressing enter adds @start(). All the date time scripts work for this dialog so you can use cdd to select a date and format from the Choose Date Dialog.

Toggle Task Status

Another script I use allows the quick toggling of any task between – [ ] and – [x].

#!d::
  ; Use the clipboard to grab the current line
  Clipboard =
  Send {END}
  Send {SHIFTDOWN}{HOME}
  Send ^c
  ClipWait
  task := clipboard

if(IsTask(task)) {
  ; It is a task, now toggle the check
  if(IsNotDoneTask(task))
   send % SetTaskDone(task)
  else if(IsDoneTask(task))
    send % SetTaskNotDone(task)
  Else {
    ; in case there is some other status in use replace it with Done
    task := "- [x]" SubStr(task, InStr(task, "]",,1) + 1,StrLen(task))
    send %task%
    }
  }
  Send {SHIFTUP}
  Send {END}
  return

Alt + win + d toggles between – [ ] and – [x] replacing any custom status with a done status. e.g. – [H] becomes – [x] .

As mentioned above I’m going to add code to append/remove a @done() tag with the current date & time and the ability to move completed tasks to an archive or daily completion/review log.

There are a couple of support functions e.g. IsTask(string) that are needed as well;

IsTask(value) {
  ; Look for the start of a task checkbox at the start of the line
  if(SubStr(value, 1, 3) = "- [")
    return True
  Else
    return False
}

IsDoneTask(value) {
  ; look for a done checkbox
  if(SubStr(value, 1, 5) = "- [x]")
    return True
  Else
    return False
}

IsNotDoneTask(value) {
  ; Look for a not completed checkbox
  if(SubStr(value, 1, 5) = "- [ ]")
    return True
  Else
    return False
}

SetTaskDone(value) {
  ; simply replaces empty checkbox with done checkbox
  return % StrReplace(value, "- [ ]", "- [x]")
}

SetTaskNotDone(value) {
  ; Replaces a done checkbox with an empty one.
  return % StrReplace(value, "- [x]", "- [ ]")
}

There are a couple more scripts that allow the quick adding of tasks to an inbox project/file and extending the Project selection popup with a hierarchical list of current projects. These are also where I start using ini files to manage settings and preferences and I’ll cover them in a separate post.

Note

Some of these functions work even on indented lines as AutoHotKey automatically trims whitespace from the start and end of lines. This can be confusing sometimes and can be turned off, just not in these scripts. This is one of the reasons I use all the productivity scripts as a separate compiled executable.

%d bloggers like this: