Script Safari/DEVONAgent Pro To Download Files

Hi! I’m trying to change a suggested script from this page,

I have both DEVONAgent Pro and DEVONThink Pro Office.

The URL of the webpage I’m trying to download from is

I’m trying to write a script that will download a CSV file from this page but I’m having trouble making it work since the file is not linked as a basic html link but seems to be part of a Javascript table.

For example, the Team Offense tab Javascript looks like this:


I don’t know enough yet about Javascript to be able to write a Do Javascript command that will download the file in the same way should I click the Export option.

Any help would be greatly appreciated!

Hey Don,

It looks to me like you can extract the tables quite easily.

tell application "Safari"
	tell front document to set _text to its text
end tell


{ MacBookPro6,1 · 2.66 GHz Intel Core i7 · 8GB RAM · OSX 10.11.1 }