Skip to content

Instantly share code, notes, and snippets.

@mitcdh
Last active April 3, 2017 00:42
Show Gist options
  • Save mitcdh/947687d943cbe3c8f640bd2369b8b0dd to your computer and use it in GitHub Desktop.
Save mitcdh/947687d943cbe3c8f640bd2369b8b0dd to your computer and use it in GitHub Desktop.
Removes URLs from the selected Devonthink record
tell application id "DNtp"
try
set this_selection to the selection
set this_count to count of this_selection
if this_count > 0 then
show progress indicator "Removing URL" steps this_count
repeat with this_item in this_selection
set the URL of this_item to ""
end repeat
hide progress indicator
end if
on error error_message number error_number
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment