I am using an Applescript posted on a previous message board (Scripts for a Tickler File) related to using GTD in DevonThink. I have attached a copy of the script at the bottom of this message (as I have made some small changes for my setup).
I have a quick question that I am sure has an easy answer. However, I am not very familiar with Applescripts, so I cannot figure out the appropriate change.
The script moves the contents from one folder (designated by the date in a nested structure) to another (called “/* Next Actions”).
I typically have two databases open (one called GTD and the other called Research). I want the script to first “activate” the GTD database before executing the script, in case the database I used last is Research. If I have Research as the “active” database, then it executes the script for that database, and I don’t get the desired result. So can you tell me the command that “activates” the GTD database before executing the set of commands that move contents?
Thanks so much.
property FOLDERS_MONTHS : {"01 January", "02 February", "03 March", "04 April", "05 May", "06 June", "07 July", "08 August", "09 September", "10 October", "11 November", "12 December"}
property FOLDERS_DAYS : {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"}
tell application "DEVONthink Pro"
activate
set todayFolder to create location "/* Next Actions"
set ticklerFolder to "/** Tickler"
set currentMonth to item (month of (current date)) of FOLDERS_MONTHS
set currentDay to item (day of (current date)) of FOLDERS_DAYS
set currentFolder to create location (ticklerFolder & "/" & currentMonth & "/" & currentDay)
set theChildren to the children of currentFolder
repeat with theRecord in theChildren
move record theRecord to todayFolder
end repeat
end tell