script to collect text from launchbar and dump it into DTPro

The following script lets users quickly dump small notes into a specified folder in DTPro.

For those interested in using Devonthink as part of Getting Things Done, the ability to capture info quickly is crucial. So the script lets you use Launchbar to enter text without having to click over to DTPro. Just access Launchbar (command-space) then hit space to enter text, then enter a snippet e.g., “Email friend happy birthday” and a new item will be created with this title in the DTPro group specified in the script.

The following script will connect launchbar with devonThink–probably something similar could be done with quicksilver:

on handle_string(theName)
–the above line grabs the text from launchbar
tell application “DEVONthink Pro”
set newLocation to create location “/inbox”
–note that inbox in the line above can be changed to whatever group you want
set theContent to theName
set theDate to current date
tell application “DEVONthink Pro” to create record with {name:theName, type:txt, date:theDate, plain text:(theName as string) & return & (theDate as string)} in newLocation
end tell
on error error_message
display dialog error_message
end try
end handle_string

save this script (using script edit, for example), and then I suggest adding the script to either scripts or a custom list in launchbar so that launchbar will always find it.

then just access launchbar (command-space) and then hit another space to enter text, and the text that is entered will create a new item in the “inbox” of the default devonthink database with the topic and time entered.