Hi everyone, just some simple scripts to fetch the current article from the NetNewsWire RSS reader.
It “just” fetches the current article as a URL; hooked links won’t open in NetNewsWire but in your browser. But I imagine that’s probably sensible as articles aren’t kept permanently in NetNewsWire?
Get Address:
tell application "NetNewsWire" to get the current article's permalink
Get Name:
tell application "NetNewsWire" to get the current article's title
Is this integration working with NetNewsWire 6? It seems to not be working for me on the updated version. When I run the script in the script editor I get a “Missing Value” error even though everything looks correct otherwise.
Thanks Marlowe — permalink does work in NNW 6 (I’ve just tried with 6.0.1) but I see now from the scripting dictionary that there isn’t always a permalink.
Here are the relevant lines from the dictionary, my emphasis:
permalink […] a permalink for the article, if known
url […] url for the article. This will be the permalink if available, or the external url
So given that permalink can fail, and url won’t fail but will give the permalink if available, I think it’s sensible to just use url in all cases.