Sometime when I’m reading a page in Safari I want to immediately continue with that page in DTPO to make it more convenient for note taking, etc. Looking for a one-click approach, because I’m too lazy to fuss with making a bookmark with Clip To DEVONthink, looking up the bookmark and opening a window in DTPO, I use one of the following scripts.
The first script asks where you want to put a bookmark made from the URL of the current Safari tab, makes the bookmark, then activates a DTPO window with that page.
property pURL : ""
property pName : ""
tell application "Safari"
set pURL to URL of current tab of window 1
set pName to name of current tab of window 1
end tell
tell application id "com.devon-technologies.thinkpro2"
open window for record (create record with {name:pName, URL:pURL, type:bookmark} in display group selector)
activate
end tell
The second script does the same thing, but makes a paginated PDF instead (e.g., if you want a one-click method to get right to work annotating):
property pURL : ""
tell application "Safari"
set pURL to URL of current tab of window 1
end tell
tell application id "com.devon-technologies.thinkpro2"
open window for record (create PDF document from pURL in display group selector with pagination)
activate
end tell
Put the scripts in the global Scripts menu on your machine (usually in ~/Library/Scripts)
thanks for the scripts! Another possibility is to use a workflow service executing an AppleScript like this one:
on run {input, parameters}
repeat with theURL in input
tell application id "com.devon-technologies.thinkpro2" to open tab for URL theURL
end
return input
end run
Install the workflow named “Open URL in DEVONthink Pro” in ~/Library/Services (or by double-clicking on the saved workflow on Lion), afterwards this command can be found e.g. in Safari’s service menu after selecting the page’s address.
AppleScript experts: would someone please show me how to modify this script to not display the group selector (just go to global inbox) and to not open the window, in other words just save the bookmark to the global inbox?
Saving the current Tab and choosing from the group selector, I don’t want the window to come up after I have saved the URL.
The script I edit works fine with…
Executing the script, fine!
Brings up the display group selector, Fine!
Saves the URL, fine!
Doesn’t bring up the saved url window, fine!
BUT it doesn’t show new entry (+1) on the DevonThink icon nor does it show unread(grey dot) on the file.