Normal Topic @HTTPGetHTML() instead of @AsynchShell() maybe? (Read 751 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
@HTTPGetHTML() instead of @AsynchShell() maybe?
Sep 19th, 2011 at 8:05pm
Print Post Print Post  
In the past when a user needed to track a package sent via USPS they would press a button that had the code bellow on it. It would then connect via usps API and return a webpage with tracking data.

The user would then use cut and paste to place the info in an elment then press a convert button that would replace certain characters and use @AccessStringArray() to put the data where we wanted it.

Could I eliminate the cut and paste some how by using @HTTPGetHTML() or some other new command? is there a cleaner method for me to get data into the record then I am using?

Thanks

var n as int

if not @isblank(trackingnum)

{
n=@AsynchShell("http://testing.shippingapis.com/ShippingAPITest.dll?API=TrackV2&XML=<TrackReques... USERID=" + @Chr(34) +"176543218" + @Chr(34) + "><TrackID ID=" + @Chr(34) + trackingnum + @Chr(34) +"></TrackID></TrackRequest>")
}

else

{
PopupSelectPosition(4,@XPos(ThisElement),@YPos(ThisElement))
@msgbox("The Tracking Number field", "             Can NOT", "          be left blank!")
}
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HTTPGetHTML() instead of @AsynchShell() maybe
Reply #1 - Sep 19th, 2011 at 8:22pm
Print Post Print Post  
Maybe. PM or email me a valid tracking number to test with and I'll see what I can do. Also, give me your Convert code.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HTTPGetHTML() instead of @AsynchShell() maybe
Reply #2 - Sep 19th, 2011 at 9:00pm
Print Post Print Post  
This works:

Code
Select All
var vQuery as String
var vResult as String

	vQuery = "/ShippingAPITest.dll?API=TrackV2&XML=<TrackRequest%20USERID=" + @Chr(34) +"176543218" + @Chr(34) + "><TrackID%20ID=" + @Chr(34) + trackingnum + @Chr(34) +"></TrackID></TrackRequest>"
	vResult = @HTTPGetHTML("testing.shippingapis.com", vQuery, "", 80)
WriteLn(vResult)
 



Note that I replaced spaces with %20.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @HTTPGetHTML() instead of @AsynchShell() maybe
Reply #3 - Sep 19th, 2011 at 10:08pm
Print Post Print Post  
Erika,

You are a mind blower in every conceivable way!!!! Absolutely Amazing!

Works like a charm! Thanks so, so, so very Much.

As always you prove there is no company that has the type of Customer service and support like you guys.  
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @HTTPGetHTML() instead of @AsynchShell() maybe
Reply #4 - Sep 20th, 2011 at 3:11pm
Print Post Print Post  
My pleasure, Robert. Let me know if you need a hand with parsing it.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged