/ Published in: AppleScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
tell application "DEVONthink Pro" set sel to the selection if (count of sel) is 1 then tell application "System Events" set devon_think to application process "DEVONthink Pro" set tag_bar to text field 1 of splitter group 1 of group 1 of splitter group 1 of splitter group 1 of window 1 of devon_think set focused of tag_bar to true end tell else -- More than 1 item is selected, add tags to selection via script dialog -- tell application id "com.devon-technologies.thinkpro2" try set theSelection to the selection if theSelection is {} then error "Please select some items." repeat set theTag to display name editor "Add Tags" info "Tags (separated by semicolons):" if theTag is not "" then exit repeat end repeat set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ";"} set theTags to text items of theTag repeat with theRecord in theSelection set tags of theRecord to (parents of theRecord) & theTags end repeat set AppleScript's text item delimiters to od on error error_message number error_number if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning end try end tell end if end tell