• 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: curl questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: curl questions


  • Subject: Re: curl questions
  • From: Doug McNutt <email@hidden>
  • Date: Tue, 17 Feb 2009 11:04:36 -0700

At 09:22 -0600 2/17/09, Jim Brandt wrote, and I snipped:
    set cmd to "curl \"" & _URL & "\" -o \"" & _T_B_S & PageName & "\""
    try
        with timeout of 10 seconds
            do shell script cmd
        end timeout

     2) How do I trap this type of error? It's already in a try block.
          What other choices do I have?

I find it much better to have AppleScript tell Terminal.app to execute the curl commands in a named window. That way curl's progress bar, written to stderr, is visible and you can use curl's trace, timeout, and continue options. There's also no doubt about who the user is and what the UNIX environment is because your $HOME/.tcshrc or other shell startup script gets executed.


Files in <ftp://ftp.macnauchtan.com/Software/Progress/> and particularly
<ftp://ftp.macnauchtan.com/Software/Progress/tViewInit> and
<ftp://ftp.macnauchtan.com/Software/Progress/tViewCmd>

are getting old but I still use them in OS 10.3.9 where I'm stuck because I refuse to give up my SE/30 file server.

Curl also has an ability to download multiple files with a single call. If you specify something like
[a,b,c,d] in a URL you can specify:


-o somenameprefix#1somesuffix

for the local file address and curl will replace #1 with "a" for the first file and "b" for the second and so on.

--

--> Life begins at ovulation. Ladies should endeavor to get every young life fertilized. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
References: 
 >curl questions (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: Cleaning up after a script
  • Next by Date: Re: Mail windows
  • Previous by thread: Re: curl questions
  • Next by thread: Re: curl questions
  • Index(es):
    • Date
    • Thread