Hi everyone,
I am using the apple script ‘Add as to do to omnifocus’ and have modified it to also add it to the reminders icloud app with a document link that can be accessed through a web browser on Devonthink Server.
After completing a task, I would like to be able to imprint ‘Done’ without needing to open up Devonthink on a Mac and selecting ‘Tools - Imprinter’ from the menu. Is there any work around that can enable me to do this through a web browser accessing the Devonthink Server? I have thought about adding a tag, and having a script run periodically on the mac to look for this tag and perform the imprinting, but don’t know how to add a tag on the web client.
Any suggestions or alternative solutions would be greatly appreciated!
A script isn’t required, a scheduled smart rule could handle this. E.g. the smart rule is performed every minute, looks for PDF documents and/or images having the tag “Imprint”, adds the desired imprint and finally removes the tag. And in the web interface it’s possible to add tags in the Info inspector just like in the app.
Thanks for the suggestion. I don’t recall this feature in devonthink 2, but now, after having a taste of automating the imprinting, I have started exploring smart rules. I am now migrating my reminders script to a smart rule to automatically add the task after setting some metadata. I have created 3 custom metadata fields: taskCategory, billAmount, taskDuedate.
I am having some difficulties with a few variables and appreciate some advice. I have used the edit script option in the smart rules dialog box. I have retrieved the custom metadata using the following:
tell application id "DNtp"
repeat with theRecord in theRecords
set thisItem to theRecord
set customMD to custom meta data of thisItem
set theChosenListName to mdtaskCategory of customMD
set therawDueDate to mdtaskDuedate of customMD
set theDueDate to date of string therawDueDate
set extraNote to mdbillAmount of customMD
set theSummary to ("Reminder: " & name of thisItem & " " & extraNote) as string
set theURL to (reference URL of thisItem) as string
set devURLloc to "myaddress"
set theURLv2 to findAndReplaceInText(theURL, "x-devonthink-item://", "myaddress/view?id=")
set theURLv2 to "myaddress/view?id="
set theURL to devURLloc & return & return & theURLv2 & return & return & theURL
-- Add new to do to Reminders
tell application "Reminders"
tell list theChosenListName
--Create new to do
if theDueDate ≠ "" then
set theEvent to make reminder with properties {name:theSummary, remind me date:theDueDate, body:theURL}
else
set theEvent to make reminder with properties {name:theSummary, body:theURL}
end if
show theEvent -- Show new to do item in Reminders so that the user can edit it right away
activate
end tell
end tell
I am having some difficulty setting the due date. I have set the custom metadata taskDuedate to 28/2/2024 (using the format dd/mm/yyyy) and I get an error: Can’t get string “28/2/2024”. I’m not sure which part of the script causes the error. I have tried to change the string to a date type, but am unable to successfully run this rule. What am I doing incorrectly?