on curl(URI)
tell me to do shell script "/usr/bin/curl " & quoted form of URI
end curl
Или другим способом:
on temporaryFile()
tell me to POSIX file (do shell script "/usr/bin/mktemp " & quoted form of (POSIX path of (path to temporary items from user domain) & (do shell script "/usr/bin/basename " & quoted form of POSIX path of (path to me) & " '.app'") & "XXXXXXXX")) as alias
end temporaryFile
on fetchPage(URI)
set temporaryFile0 to my temporaryFile()
tell application "URL Access Scripting"
--progress,form data,directory listing,download directory,authentication
download URI to temporaryFile0 replacing yes
end tell
set fileReference to open for access temporaryFile0
try
set returnValue to read fileReference
on error number -39
set returnValue to ""
end try
close access fileReference
tell application "Finder" to delete temporaryFile0
returnValue
end fetchPage