Zip Code retreival

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Zip Code retreival

Post by Bob Hansen » Tue Oct 18, 2005 3:19 am

Before I head off in the wrong direction, I would appreciate some opinions:

Need to extract address, city, state from another program and input into fields on USPS website and return the resulting official USPS address back to the original program.

Input site is http://zip4.usps.com/zip4/welcome.jsp
After submitting, the results come back on a different page: http://zip4.usps.com/zip4/zcl_0_results.jsp

The results are 2-5 lines in a table cell in HTML code.

The input is coming from another program, no problem.
I think that I may be able to do the input in a single URL with passed parameters. Or I may need to do something like HTTPREQUEST POST method.

But will I be able to use HTTPREQUEST GET with that generic address? Or should I be using MacroScript Web Recorder to do this?


Once I get the 2-5 lines back I see no problem with parsing them and sending them back to the original program.

But what are the best tools to submit 5 variables to this web site and get back the resulting lines?

Would appreciate any suggestions if you have been there before, or something similar.

Thanks for listening.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Oct 18, 2005 4:31 am

I have tried using WebRecorder and keep getting an Access conflict error message. URL = http://zip4.usps.com/zip4/welcome.jsp

Access violation error at address 004991AF in module webrecorder.exe.

Using Web Recorder 155.
Closed all browsers.
Default browser is Firefox.

The page can be opened OK with MSIE 6.2 and Firefox 1.07.
Using XP PRO-SP2

Getting same error for many pages. Ends up with "This Page cannot be be displayed"
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Oct 18, 2005 4:53 am

Ok...watch the learning curve.


:idea: I copied the dll file from WebRecorder folder to windows folder and also modified the loaddll line to use the windows path.

(Just as mentioned in the Help file.....read the help files, dummy :oops: )

First page now opens up without error message. :D

But when form is filled out and submit is activated, then the results page comes up with "cannot display? page. :shock:

But no error message this time..... :?

Making some progress.....
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Oct 18, 2005 7:03 am

I think if you just want to post 5 variables to a URL I'd use HTTPRequest post operation and then parse response.
MJT Net Support
[email protected]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Oct 18, 2005 10:15 pm

Had to jump to other projects, will be back to this. But if I understand this means that the page that I saw returned with the generic name will all be in %result%......... That is good, solves how to use GET with generic page name..... I think that will work, will try to test that out in next few days.....

Thanks for simple solution.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts