Any other software or tips for clipping web content?

You could add a shortcut either via system settings or by appending the shortcut to the script’s filename, see help for more information. But both approaches work only while DEVONthink is the active application.

Alternatively a script for the global scripts menu could simply open the current Safari tab in DEVONthink. No need for copying & pasting of URLs:

-- Open current Safari tab in a DEVONthink tab

tell application "Finder" to set pathToAdditions to ((path to application id "DNtp" as string) & "Contents:Resources:Template Script Additions.scpt") as alias
set helperLibrary to load script pathToAdditions

tell application "Safari"
	try
		if not (exists window 1) then error "No window is open."
		tell current tab of window 1
			set theURL to URL
			if theURL begins with "http://" or theURL begins with "https://" then
				set theName to name
				tell application id "DNtp" to my helperLibrary's openURLInTab(theURL)
			end if
		end tell
	on error error_message number error_number
		if error_number is not -128 then display alert "Safari" message error_message as warning
	end try
end tell
3 Likes

Thank you so much! This isn’t my strong suit, but I’ll look into it, take some time, and get better at these things. I appreciate your time! :slight_smile:

cgrunenberg already wrote the script for you, the rest should be easy :slight_smile:

  • Enable the global script menu in the settings of Script Editor.
  • Open a new document in Script Editor and paste the code. You can just click the “Open in Editor” button under the script on this page.
  • Click the hammer icon to compile the script.
  • Save it with a suitable name, for example “Open Safari tab in DEVONthink”. The file format should be “Script”.
  • Move the script to ~/Library/Scripts.

Now you can run it from the global script menu, found in the right side of your menu bar.

See this link for more information:
Using the Systemwide Script Menu | Mac Automation Scripting Guide

1 Like

Ideal would be ~/Library/Scripts/Applications/Safari.

1 Like

Thanks for the additional ‘GPS’ directive :blush:

Ah, yes. I somehow got the impression @utiPontushage wanted the script to be accessible no matter which application is active, but the Safari folder makes more sense.

@utiPontushage you’re welcome :smiley: The global script menu is pretty neat. DEVONthink also includes some additional scripts accessed this way for Safari, Chrome, DEVONagent and Apple Mail.

1 Like

Just wanted to say that this script has really changed my workflow for the better. Big difference! Also got a reason to study some scripting knowledge and more use of my Keyboard Maestro license.

Again, big thanks, there are very few apps or similar digital services with such an active community as well as present developers :slight_smile:

2 Likes

I am in the Bear camp for clipping based on ease of use and the quality of the capture.

1 Like