Re: Safari source code
Re: Safari source code
- Subject: Re: Safari source code
- From: Emmanuel <email@hidden>
- Date: Sun, 20 Nov 2005 21:53:21 +0100
At 3:47 PM -0500 11/20/05, David Marshall wrote:
On Sun, 20 Nov 2005 03:53:16 +0000, kai wrote:
Is that really the name of the Safari document, dor? Either way, I'm
afraid you can't coerce a Safari document to text. Instead, you'll
need to get the required document property (in this case, source).
What about simply extracting the URL from the Safari page whose
source is desired, and using URL Access Scripting to download the
source (which is, after all, the same regardless of the browser
being used)?
- - - - -
set thePath to path to desktop folder as Unicode text
set sourceFile to (thePath & "source.txt")
tell application "Safari" to set x to URL of front document
tell application "URL Access Scripting" to download x to sourceFile
tell application "TextEdit" to open sourceFile
- - - - -
(for an automated solution, prefer curl rather than URL Access
Scripting, it's way more reliable)
(Emmanuel)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden