Having a problem with Scripts...

Hi to all –

I’m having a problem when running Scripts and maybe some wizard from this forum can help me.

My problems:

  1. None of the Firefox Scripts works (Add link to DEVONthink; Add web archive to DEVONthink; Add web document to DEVONthink), and I get the following error message: “No browser is open/in front”. I’m using Firefox 3.0.5. (I checked the Safari scripts, and no problem there.)

  2. When running the scripts for NetNewsWire (Add flagged news to DEVONthink; Add news to DEVONthink) from the menubar Scripts menu, I have the error message “can’t get ‘class Titl’ of ‘class SeHe’”… However, if I open Script Editor and run the scripts from there, they both work. Weird.

The first one is not critical, since I can use the DTP Bookmarklets. But I really miss the NNW scripts working properly.

I don’t use FireFox, so I can’t help you with that one.

However, I do use NNW and the scripts are broken as you discovered. This has been reported as a bug, so I would expect that it will be addressed in the future.

Thanks for the feedback.

The interesting thing with NNW is that the scripts do work if you run them from the Script Editor.

Note to myself (for the x time): learn to Applescript.

How exactly are you doing that? I got a “no item selected” error (something like that) when trying it.

After selecting one item in NNW, I open the NNW script in the Script Editor and run it. It works like it should (at least on my system).

Got that to work this time – thanks for the encouragement to try it again.

Even better, the script runs normally if it’s saved as an application (with “Startup Screen” disabled in the save dialog Options).

Wish I knew why the commonly-used feedproxy.google.com URLs of pages imported from NNW are getting stuck trying to load, e.g.:

Clicking on the URL in the navigation bar opens it in Safari as expected, redirecting to reason.com/blog/show/130805.html.

Even easier… Open/Compile/Save the original script and it works fine (here).

this appears to remain unresolved in beta4

If you mean the scripts available for captures from Firefox when it’s the frontmost application, all of them work here, for capture of the viewed page as WebArchive, PDF or bookmark.

sorry, no I was talking about the netnewswire scripts for both flagged and selected news.
In reality though, I’m not sure why I would choose NNW over DTPO as my primary newsreader. Is there a way to import my hundreds of feeds other than one by one?

Export them as OPML, DTP(O) is able to import this.

I just tried out of curiosity and got an error like:
cannot make “” into type boolean
(or something to that effect). It seems like this was a precedence issue; for the “add news to dt”, I fixed it by adding 2 pairs of brackets and the script is now:

tell application "NetNewsWire"
		if exists selectedHeadline then
			set this_headline to selectedHeadline
			set h_title to title of this_headline
			set h_URL to URL of this_headline
			set h_enclosure to enclosure URL of this_headline
			if exists date published of this_headline then
				set h_when to date published of this_headline
				set h_when to date arrived of this_headline
			end if
			if exists description of this_headline then
				set h_note to description of this_headline
			else if exists summary of this_headline then
				set h_note to summary of this_headline
				tell application id "com.devon-technologies.thinkpro2" to create record with {name:h_title, type:bookmark, date:h_when, URL:h_URL}
			end if
			if (exists h_enclosure) and (h_enclosure is not missing value) then
				set h_note to "<html><body><p><a href=\"" & h_URL & "\"><bold>" & h_title & "</bold></a></p><small>" & h_note & "</small><br/><a href=\"" & h_enclosure & "\">" & h_enclosure & "</a></body></html>"
				set h_note to "<html><body><p><a href=\"" & h_URL & "\"><bold>" & h_title & "</bold></a></p><small>" & h_note & "</small></body></html>"
			end if
			tell application id "com.devon-technologies.thinkpro2" to create record with {name:h_title, type:html, date:h_when, URL:h_URL, source:h_note}
			error "No headline is selected."
		end if
	on error error_message number error_number
		if the error_number is not -128 then display alert "NetNewsWire" message error_message as warning
	end try
end tell

I have no idea if this is what the others also had. I can fix the other too if you need it (I don’t clip things from NNW to DTP so didn’t bother).

Thanks for the fix - I just added two set of () for the line:
if (exists h_enclosure) and (h_enclosure is not missing value) then

The script now works for me

Thanks for the fix. I had the same problem…