I have chosen to automatically file items in DEVONThink using the below AppleScript inside a smart rule if / when an items is tagged. I am unable to get the last step (—Remove Tags) of the script to execute. Is it because the item has been moved? I am not a programmer so please speak slowly and I may understand it :). If there is a better way to do / write this I am all ears…
on performSmartRule(theRecords)
tell application id "DNtp"
repeat with theRecord in theRecords
--Bryan Tag
if tags of theRecord contains "Bryan" then
set BryanFollowUp to get record at "/" & "Follow Up" & "/" & "Bryan" in database named "1. Smith Group"
move record theRecord to BryanFollowUp
--Deborah Tag
else if tags of theRecord contains "Deborah" then
set DeborahFollowUp to get record at "/" & "Follow Up" & "/" & "Deborah" in database named "1. Smith Group"
move record theRecord to DeborahFollowUp
--Jasmine Tag
else if tags of theRecord contains "Jasmine" then
set JasmineFollowUp to get record at "/" & "Follow Up" & "/" & "Jasmine" in database named "1. Smith Group"
move record theRecord to JasmineFollowUp
--Mike Tag
else if tags of theRecord contains "Mike" then
set MikeFollowUp to get record at "/" & "Follow Up" & "/" & "Mike" in database named "1. Smith Group"
move record theRecord to MikeFollowUp
--Patty Tag
else if tags of theRecord contains "Patty" then
set PattyFollowUp to get record at "/" & "Follow Up" & "/" & "Patty" in database named "1. Smith Group"
move record theRecord to PattyFollowUp
--Positive Results Tag
else if tags of theRecord contains "Positive Results" then
set PositiveResultsFollowUp to get record at "/" & "Follow Up" & "/" & "Positive Results" in database named "1. Smith Group"
move record theRecord to PositiveResultsFollowUp
-- Spencer Tag
else if tags of theRecord contains "Spencer" then
set SpencerFollowUp to get record at "/" & "Follow Up" & "/" & "Spencer" in database named "1. Smith Group"
move record theRecord to SpencerFollowUp
--Church Tag
else if tags of theRecord contains "Church" then
set ChurchFollowUp to get record at "/" & "Follow Up" in database named "3. Church"
move record theRecord to ChurchFollowUp
--Archive Tag
else if tags of theRecord contains "Archive" then
set ArchiveItem to get record at "/" & "To be Filed" in database named "Ξ Archive"
move record theRecord to ArchiveItem
end if
-- Remove all tags
set the tags of theRecord to ""
end repeat
end tell
end performSmartRule