My rss reader is Vienna. When clipping articles, I prefer taking rich note via DTP service to archiving. In Safari, the service grabs a rich text note along with its url. Nice. However, I read most of rss articles in the built-in browser within Vienna. If I use DTP service in the built-in browser, DTP take a rich note, but without its url. There was a thread explaining a similar case in NetNewsWire at devon-technologies.com/phpBB … php?t=1573
First, I took a look at the applescript, Copy Selection to Incoming, which came with DTP package. Then, I checked out the applescript dictionary of Vienna. In Vienna, I couldn’t find any way to get the url of the current browser tab. So, I had to take an alternative approach to this matter. The way I read an article is that I select an article and double-click it. In other words, when I’m viewing an article, there is an article selected in article list pane. If you are like me, the following might help.
Basically, I’ve borrowed a part of the original applescript written by Christian and added a few lines. Change the value of pDestinationGroup to the group you prefer. Save the script to ~/Library/Scripts/Applications/Vienna.
property pDestinationGroup : "/incoming"
tell application "Vienna"
activate
set theVersion to version
if theVersion is greater than or equal to "2.0.0.2007" then
set theArticle to the current article
if theArticle is not false then
set theURL to the link of theArticle
set theTitle to the title of theArticle
tell application "System Events"
keystroke "c" using {command down}
delay 0.5
tell application "DEVONthink Pro"
set incomingGroup to create location pDestinationGroup
set newRecord to paste clipboard to incomingGroup
set URL of newRecord to theURL
set name of newRecord to theTitle
end tell
end tell
end if
else
display dialog "This script requires Vienna 2.0.0.2007 or later"
end if
end tell
The script will not get a correct url, if the article of current tab and the selected article of article list is different. I just wish Vienna provided url of opened tab.
If you assign a shortcut key to this script, it will not work well. My guess is this has something to do with UI scripting. I use it thru a script menu. Any suggestion or improvement will be appreciated.
(FYI) In Vienna, there is a script command called ‘get selection’ which gets a selected text whether it’s in article viewer or built-in browser. I tried, but it only returned plain text, not rich text because I really wanted to avoid UI scripting.