• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Safari source code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari source code


  • Subject: Re: Safari source code
  • From: David Marshall <email@hidden>
  • Date: Sun, 20 Nov 2005 15:47:22 -0500

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

- - - - -

Dave
_______________________________________________
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


  • Follow-Ups:
    • Re: Safari source code
      • From: Doug McNutt <email@hidden>
    • Re: Safari source code
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: creating events in published calendars in iCal?
  • Next by Date: Re: Safari source code
  • Previous by thread: Re: Safari source code
  • Next by thread: Re: Safari source code
  • Index(es):
    • Date
    • Thread