I am modifying a modification of Scratch (
) and I need to know how you can get data from a website and report the data as a result of using a block.
Offline
No.
Offline
I don't want to download anything.
Offline
ok
the source code
blockspec
((#readFromUrl: UTF8['http://']))
The actual block code =
readFromUrl: t1
^ (HTTPSocket httpGet: t1) contentsas far as i can tell
Last edited by muppetds (2012-03-10 06:26:34)
Offline
That works perfectly. Thanks!
Offline
I have another question. How can you get the list of online users on the forums?
Offline
rdococ wrote:
I have another question. How can you get the list of online users on the forums?
I don't know Squeak, but you have to parse the contents of this site "http://scratch.mit.edu/forums/". At the bottom is a list of the online users.
Offline
Yeah, line 799 onwards.
Offline
ZeroLuck wrote:
rdococ wrote:
I have another question. How can you get the list of online users on the forums?
I don't know Squeak, but you have to parse the contents of this site "http://scratch.mit.edu/forums/". At the bottom is a list of the online users.
Make a code that reads line 800 of "http://scratch.mit.edu/forums/", but have it read one more line per user. (Have a block that is the (first ( ) users on the forums), it would read line 800 through the number entered minus one.
)
Otherwise I'm not sure because the lines get longer every time a new user logs in.
Offline