• 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: Dave Balderstone <email@hidden>
  • Date: Tue, 09 Nov 2004 18:42:49 -0600


On Nov 9, 2004, at 8:59 AM, Dave Balderstone wrote:

Here's a script I use to download a 24 hour weather summary every night. It may help:

I forgot to delete the "if t > 83700 then" ... "end if" statement in my prior message. It only makes sense in context of the "on idle" that I did remove, and (of course) causes the script to fail if compiled and run as posted.


On Nov 9, 2004, at 6:15 PM, Doug McNutt wrote:

You can get multiple commands in one call using the semicolon separator but it does get painful.

do shell script "cd $HOME/Documents ; curl -O http://www.nytimes.com/services/xml/rss/nyt/Opinion.xml"; -- (no line breaks here)

You can also use the -o (small o) switch and give curl a full path for its output but you'll have to create the name yourself.

That's the approach I took in the code I posted (I grab the 24 hour weather summary as part of a project to monitor air quality in our building so I can determine wind direction, RH, etc when there are complaints). I wanted a unique file name every time the script executed and building the path on the fly is trivial.


djb

_______________________________________________
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


References: 
 >AppleScript and Safari (From: "Steve Suranie" <email@hidden>)
 >Re: AppleScript and Safari (From: Dave Balderstone <email@hidden>)

  • Prev by Date: RE: AppleScript and Safari
  • Next by Date: Curl vs URL Access (was something else)
  • Previous by thread: Re: AppleScript and Safari
  • Next by thread: RE: AppleScript and Safari
  • Index(es):
    • Date
    • Thread