
squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2013
08:00 PM
Re: RSS parse
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
to
and
to
it prints the error and crashes on the next block because the xml variable is empty
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
Kinetics Screensavers

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2013
09:26 PM
Re: RSS parse
"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 changedm.http.SetUrl(feed_url)
tostrx = ReadAsciiFile("tmp:/apfavorites")
m.http.SetUrl(feed_url)
m.http.AsyncPostFromString("AID=" + strx)
andxml=m.http.GetToString()
towhile 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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2013
05:51 AM
Re: RSS parse
Thank you TheEndless & Mark- So it turns out to be a port issue after all. I thought the port was being set in the function that created it but i guess not. I added a setmessageport line and that led to it getting fixed, it runs fine now.
Kinetics Screensavers
mushiidoger
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2013
01:20 AM
Re: RSS parse
hello
i want to send username and password in post form
i not found any right way to do it kindly help me.
i have username in one variable and password in other variable
and i have url so how i send request to the server in post form
i want to send username and password in post form
i not found any right way to do it kindly help me.
i have username in one variable and password in other variable
and i have url so how i send request to the server in post form
- « Previous
-
- 1
- 2
- Next »