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

Re: Post Data


  • Subject: Re: Post Data
  • From: Brian Johnson <email@hidden>
  • Date: Wed, 2 Jan 2002 11:23:16 -0800 (PST)

On Sat, 29 Dec 2001, Doug McNutt wrote:

> At 11:10 -0500 12/29/01, email@hidden wrote:
> > http://www.linkedresources.com/teach/applescript/writingCGIs.shtml
>
> Very nice and appreciated.
>
> Can you suggest some options for the other end? I want to
> communicate with my Christmas present which is a Tektronix 3000
> series oscilloscope that talks HTTP. Going through a browser to
> create a request in the format of the required POST method is a pain
> and terribly mouse intensive.
>
> Is there any way to persuade AppleScript to send out raw IP over
> Ethernet so as to emulate the response of a browser to entering an
> HTML form?
>
> http://192.168.1.17?command=ch1on&command=saveto1&command=getwave1

The trick is the URL Access dictionary "form data" item, which you should
be able to use as below (you could test it with one of the "spitback"
scripts that Jeff pointed you at if you wanted to verify that the request
is getting through).

tell application "URL Access Scripting"
set x to download "http:/192.168.1.17/" [opt-d]
to file "Macintosh Hard Disk:Xmas:reading.txt" [opt-d]
form data "command=ch1on&command=saveto1&command=getwave1" [opt-d]
replacing yes without progress and unpacking
end tell

Brian Johnson, Dept of Architecture, University of Washington, Seattle


  • Prev by Date: Airport & Internet Connect under OS X
  • Next by Date: Re: Post Data
  • Previous by thread: Airport & Internet Connect under OS X
  • Next by thread: Re: Post Data
  • Index(es):
    • Date
    • Thread