"squirreltown" wrote:
yea I actually got that part right this time. This same function works fine if I change the POST stuff to GET, which is the way it is normally.
Ive just changed
m.http.SetUrl(feed_url)
to
strx = ReadAsciiFile("tmp:/apfavorites")
m.http.SetUrl(feed_url)
m.http.AsyncPostFromString("AID=" + strx)
and
xml=m.http.GetToString()
to
while true
msg = Wait(8000, m.port )
If msg = invalid Then
print "Error: invalid"
Else If Type( msg ) = "roUrlEvent" Then
if msg.GetString()
xml= msg.GetString()
End If
end if
...............
it prints the error and crashes on the next block because the xml variable is empty
That's actually a much bigger change that it may look. You went from the synchronous GetToString() to the asynchronous AsycnPostFromString() method. The former doesn't require a port and wait loop, while the second does, so I'd bet it is an issue with the port you're listening on. Try just swapping:
xml = m.http.GetToString()
with:
xml = m.http.PostFromString("AID=" + strx)
and see if it works. That's swapping synchronous for synchronous...
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)