Cannot download linked images (php attachment)

Hi all

I am trying to download jpgs which are linked to as php attachments on this page: … hp?t=22259

I tried the “add linked images to Devonthink” script but get the error message "there are no linked images " or something similar. A click of a mouse reveals this to be untrue, of course.

Incidentally, for linked documents and audio files the drawer on the left hand side offers a completely different way of doing what to me as a user is a very similar action, namely downloading linked documents of a certain kind. Is there a reason behind treating these near identical actions so differently?

But my main problem is to download the jpgs in a batch, does anybody have a solution for this?


This script looks for links pointing to images. Attachments on the other hands are generic links and you don’t know what you’ll get before opening/downloading them.

A script to download attachments is as simple as…

tell application "DEVONagent"
		if not (exists browser 1) then error "No browser is open."
		set this_result to false
		set this_browser to browser 1
		set this_URL to the URL of this_browser
		set this_source to the source of this_browser
		set these_links to get links of this_source base URL this_URL
		repeat with this_link in these_links
			if the this_link contains "attachment.php" then
				add download this_link referrer this_URL without automatic
				set this_result to true
			end if
		end repeat
		if not this_result then error "This page contains no attachments."
	on error error_message number error_number
		if error_number is not -128 then display alert "DEVONagent" message error_message as warning
	end try
end tell


my sincere thanks for the script, it works exactly as I hoped it would (and thus much better than the quick script I had hobbled together previously). If only my scripting abilities did not suck as much as they actually do.

I am sometimes struck by the notion how scattered useful tools are all over Devon’s user interface when there is a seemingly simple problem waiting to be solved and time and again I am surprised at how friendly and efficiently the support works to solve that problem.

Perhaps that is the price for Devonthink and -agent being powerful collections of tools suitable for many tasks rather than a monolithic program designed to solve a single problem gracefully. That said, I am sometimes not entirely sure if the balance is right, though.

Thanks again