Continuing the discussion from Tinderbox and DEVONthink Pro:
You’ve got a Tinderbox note with its $URL
set to a x-devonthink-item://
URL, and want to open the corresponding record in its default application instead of in a DEVONthink window.
To do that, use this stamp:
if(!$URL.beginsWith("x-devonthink-item://")) { return; };
var theUUID;
var theScript;
theUUID = $URL.replace("x-devonthink-item://", "");
theScript = '
tell application id "DNtp"
set the_record to (get record with uuid "' + theUUID + '")
set the_path to path of the_record
quoted form of the_path
end tell
';
var theResult;
theResult = runCommand("/usr/bin/osascript | tr -d '\n'", theScript);
runCommand("open " + theResult);
Note: This will only open the record in its default application. If you want to open it in a different application, you’ll have to figure that part out yourself