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

Re: curl equivalence


  • Subject: Re: curl equivalence
  • From: "John R." <email@hidden>
  • Date: Thu, 27 Oct 2005 16:32:00 -0400

On 26 Oct 2005 11:56:08  Christopher Nebel said

> If you don't mind using Objective-C, then you can get essentially
> ideal results. Essentially, you want to use one of the NSURL family -- these are
> tied into the same foundation that Safari uses, so you get the same
> cookie jar. Depending on the API you use, you can get different
> effects, but the one that's the simplest and most "correct" (i.e.,
> requires the least post-processing of the answer) is +
> [NSURLConnection sendSynchronousRequest:response:error:]. You do
> have to check the response status code yourself, though.


Is it possible to write an Objective-C handler that can be called from Applescript developed on Script Editor? I have not yet used Applescript Studio or Xcode, through which I suppose integration with Objective-C is easier. Maybe this is an excuse to try it. What I want to do should be simple in theory, right? -- load a url and loop "to check the response status code"?

Please point me to the documentation on this API +[NSURLConnection sendSynchronousRequest:response:error:], and what the "foundation" classes are for Safari.

In any case, it is flattering to catch the attention from someone at Apple!

> (I'd point out that using Safari for your visual
> feedback has two problems: one, many people regard a full-size window
> popping up to be annoying; two, if they were trying to use Safari at
> the same time as your program, at least one will not be happy.)

I am happy to report the Applescript experience has been better that you suspect. For scripting work, I learned to make a new Safari window and refer to it by id# in the script. After the window is made, I can use Safari normally, without strange "pop ups". I simply monitor or hide the script's capture window at my leisure.



_______________________________________________
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: curl equivalence
      • From: Christopher Nebel <email@hidden>
    • Re: curl equivalence
      • From: Martin Orpen <email@hidden>
  • Prev by Date: Re: curl equivalence
  • Next by Date: Re: curl equivalence
  • Previous by thread: Re: curl equivalence
  • Next by thread: Re: curl equivalence
  • Index(es):
    • Date
    • Thread