• 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: AppleScript and Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: AppleScript and Safari


  • Subject: RE: AppleScript and Safari
  • From: "Steve Suranie" <email@hidden>
  • Date: Tue, 9 Nov 2004 08:09:47 -0500
  • Thread-topic: HTML and Applescript?

Doh, I typoed, I meant to say download XML files on a reaccuring basis. : )

> ----------
> From: 	applescript-users-bounces+ssuranie=email@hidden on behalf of Steve Suranie
> Sent: 	Tuesday, November 9, 2004 8:05 AM
> To: 	email@hidden
> Subject: 	AppleScript and Safari
>
> 	This is a two part question.
>
> 	1. Is there a way to script Safari so it will download files to my hard drive (I want to download some XML files on a redundant basis).
> 	2. If not, is there a way for AppleScript to know when a page in Safari has loaded? I wrote a script that just went to the xml file and was trying to read the source but I kept getting an error - I think the script runs faster than the page can load and thus, the variable I set to hold the source is not valid when I try to return it (see code below). What I was thinking was something on the same line of the "bzy" file type for files that are busy.
>
> > tell application "Safari"
> > 	make new document with properties {URL:"http://www.smartmoney.com/rss/smheadlines.cfm?feed=2&format=RSS091"}
> > 	with timeout of 120 seconds
> > 		set theSource to source of front document
> > 	end timeout
> > end tell
> >
> I get an error message that reads: variable theSource is undefined.
>
>
> If I have the page preloaded and run a script to just read the source code it works fine, which is why I think the script is running faster than the browser can load the page.
>
> Any help is appreciated.
>
>
>
>
>  _______________________________________________
> 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
>
>
>
 _______________________________________________
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

  • Prev by Date: AppleScript and Safari
  • Next by Date: Re: AppleScript and Safari
  • Previous by thread: Re: AppleScript and Safari
  • Next by thread: RE: AppleScript and Safari
  • Index(es):
    • Date
    • Thread