• 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: URL Access Scripting & Form Posting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URL Access Scripting & Form Posting


  • Subject: Re: URL Access Scripting & Form Posting
  • From: email@hidden
  • Date: Fri, 9 Mar 2001 02:30:30 EST

Try this:

-- you'll have to disect the page to determine the fields.
-- URL encoding may be unnecessary
set formdata1 to "size=30&page=1&index=music&field-artist=John L"
set formData2 to "ennon&field-title=&field-label=&field-binding="
set formData to formData1 & formData2

set destination to "WorkZone:johnlennon" -- use your own path

-- the URL must be that of the form action, not the page with the form
set cgiURLpart1 to "http://www.amazon.com/exec/obidos/search-han";
set cgiURLpart2 to "dle-form/ref=s_sf_pm/102-7990924-2982528"
set currentURL to cgiURLpart1 & cgiURLpart2

tell application "URL Access Scripting"
download currentURL to file destination replacing yes form data formdata
with progress
end tell

HTH.

Jeff Baumann
email@hidden
www.linkedresources.com

19 Days, 6 Hours, 57 Minutes
How is it going to end?


In a message dated 3/8/01 10:44:48 PM, Boonee wrote:

>I am a novice scripter but have been actively following this list and
>have caught the bug to learn more and do more. I have been
>experimenting with URL Access Scripting and need some assistance on
>scripting a post. The form is an Amazon.com form which is here -
>http://www.amazon.com/exec/obidos/tg/stores/static/-/music/search/104-
>8728514-4507965. It asks for the user to enter the artist, title and
>label and press the button "search now". I would like to use URL
>Access Scripting instead of Netscape Navigator or Explorer to send
>this info and then save the page returned to a file on disk.
>I understand the basic format but cannot figure out the form data
>part. Please help.
>I have this so far:
>
>set vfilePath to "Macintosh HD:Downloads:SourceData"
>Set i to "http://www.amazon.com/..."; --the post data should go
>here - artist, title and label
>tell application "URL Access Scripting"
> try
> download i to file vfilePath with progress
> on error err
>Display Dialog err
> return
>end try
>end tell


  • Prev by Date: WebNative login
  • Next by Date: HTML and Excel
  • Previous by thread: URL Access Scripting & Form Posting
  • Next by thread: Re: URL Access Scripting & Form Posting
  • Index(es):
    • Date
    • Thread