Getting a web page from filePro
Bob Stockler
bob at trebor.iglou.com
Sat Jan 29 13:13:53 PST 2005
On Sat, Jan 29, 2005 at 03:48:47PM -0500, GCC Consulting wrote:
| With much help from Fairlight and a suggestion from Jim Asman here's the
| solution to my problem.
|
| Platform: native 5.0.xx
|
| Problem: Pass a UPS tracking number to their tracking web page from a filePro
| record from an @key command.
|
| Step 1 - Copy the complete url when directly entering a tracking # into the UPS
| web page, into a text document.
|
| Step 2 - Create a call table for this routine and declare variables to hold
| portions of the URL. The value is too long to use one variable.
|
| Step 3 - Remember quotes are needed around URL being passed - so, qu=chr("34")
|
| Note line 16 sets the URL value. Line 13 has been commented out for now as only
| 1 tracking # is used.
|
| Line 17 is VIDEO sync is used to display the SHOWCTR() on line 18.
|
| The important thing to remember here is that the quotes around the URL are
| NECESSARY for win XP.
|
| Although I used START iexplore, I could just as easily used SYSTEM "START"<url.
| This would have started the default Windows browser. I have Mozilla, Firefox
| and opera on my system also. IE remains the default browser as I have software
| that is too tightly glued to it.
|
| 9 Then: declare
| url1(120,*),url2(120,*),url3(80,*),url4(80,*),url,tracknum(12,*),quotes(3.0)
| 10 Then: qu=chr("34")
| If: 'this set the first part of the url to get to ups tracking page
| 11 Then: url1="http://wwwapps.ups.com/WebTracking/processInputRequest?HTML
| Version=5.0&sort_by=status&tracknums_displayed=5&Type"
| 12 Then: url2="OfInquiryNumber=T&loc=en_US&InquiryNumber1="
| 13 Then: url3="&InquiryNumber2=&InquiryNumber3=&InquiryNumber4=
| &InquiryNumber5="
| 14 Then: url4="&AgreeToTermsAndConditions=yes&track.x=34&track.y=6"
| If: tracking_num = ""
| 15 Then: GOSUB get_trk
| If: 'place the tracking
| 16 Then: url=qu{url1{url2{tracking_num{url4{qu
| 17 Then: video sync
| 18 Then: SHOWCTR("17") "\b5 One Moment Please - Getting Your Information
| \a-"
| If: 'place the tracking
| 19 Then: tr="start iexplore"<url
| 20 Then: system tr
| 21 Then: CLS("17","1")
| 22 Then: END
| get_trk If:
| 23 Then: input popup(17,"-1") tracknum "Enter Tracking #\nor Press \kZ-to
| continue\n\kY- \b4 Cancel \a-\nEnter Option -> "
| If: @sk = "BRKY"
| 24 Then: END
| If: tracknum ne "" and tracking_num = ""
| 25 Then: tracking_num = tracknum;write
| 26 Then: RETURN
That looks suspiciously like output from a filePro program I wrote.
I wish everyone would use it (or whatever you did use) to post code
here - it makes it very easy to read and follow and doesn't waste space.
Bob
--
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).
More information about the Filepro-list
mailing list