So basically I want to print a webpage - more critically I ONLY want to print the first page of this (what happens to be a) 2-page document.
So I’ve tried this script as the main working script for printing the page:
set theURL to "http://www.crh.noaa.gov/forecasts/CAZ072.php?%20warncounty=CAC017&city=South+Lake+Tahoe"
tell application "Safari"
open location theURL
delay 10
print window 1
end tell
But I need to get in there: “…with properties {starting page:1, ending page:1}…” and I can’t get the diction down.
Tried it a slightly different way. This doesn’t really effect the printing aspects, just how I access the page. In this latter example I save it as a webarchive file and then try printing that one like this:
set theFile to (path to desktop as Unicode text) & "Print Test.webarchive"
tell application "Safari"
open theFile
delay 2
print theFile with properties {starting page:1, ending page:1}
end tell
I’ve also tried using the above technique of saving the webarchive and then trying to print the item via the Finder by setting up an Automator workflow consisting of:
¢ Get Specified Finder Items
¢ Print Finder Items
This likewise doesn’t work - because I don’t get to specify that I only want to print 1 page.
Any ideas on printing a SINGLE web page??
Thanks in advance! KB