to display web images on their control pages.
You will need to download SiteSucker and set it's Replace Files pref to "Always"
and of course season the script(s) to taste.
- Code: Select all
tell application "SiteSucker"
activate
download "http://www.nps.gov/webcams-glac/apvccam.jpg"
end tell
tell application "SiteSucker"
quit
end tell
set sourceFile to ((path to downloads folder as text) & "www.nps.gov:webcams-glac:apvccam.jpg")
set target_path to ((path to application support folder as text) & "Perceptive Automation:Indigo 4:IndigoWebServer:images:controls:variables:webcam+apgar.png")
try
tell application "Image Events"
launch
set theImage to open alias sourceFile
scale theImage to size 480
save theImage as PNG in target_path with icon
close theImage
end tell
on error e
display dialog e
end try