The key section of the reply
   [ url     http://zip4.usps.com/zip4/zcl_0_results.jsp   ] is

<td headers="full" height="34" valign="top" class="main" style="background:url(images/table_gray.gif); padding:5px 10px;">

                9876 W CHARLESTON BLVD APT 2555<br />

                LAS VEGAS&nbsp;NV&nbsp;&nbsp;89117-7061
                <br />
                </td>
      <td style="background:url(images/table_gray.gif);">&nbsp;</td>
and here is the code I would use to parse for the zip
(keeping it simple)
on parseZipExample
   -- I copied the source window, so
   put the clipboarddata into htmlPage --
   replace "&nbsp;" with cr in htmlPage
   filter htmlPage with "?????-????"
   filter htmlPage without "*--*"
   filter htmlPage without empty
   ;put htmlPage  --into msgbox
end parseZipExample

Modify to suit your program.

On Nov 27, 2010, at 3:22 PM, James Hurley wrote:

Richard,

Thanks. I am astonished that this is possible.

I'm afraid I am missing something. I tried entering my data (my home address--it appears that is what you did) in the USPS page
http://zip4.usps.com/zip4/

I then copied and pasted that source code into field 1 in LiveCode. (I didn't see any reference to my data--my address--in that html text.)

I used your script in a button and obtained some html text in field 2. But there is no reference in field 2 to my street address.

I don't mind working on the parsing to do the put and get, but I'm sure I missing the ingredient where my data (address, city and St) goes into field 1. I think that is what I am missing.

I don't see "visited=1&pagenumber=0 etc. anywhere in field 1 or 2.

Floundering,

Jim

Jim Ault
Las Vegas



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to