This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-03-10 04:57:42

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Squeak help needed

I am modifying a modification of Scratch (  tongue  ) 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

 

#2 2012-03-10 05:05:16

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Squeak help needed

take a look at the panther


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#4 2012-03-10 05:53:42

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Squeak help needed

why not?


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#6 2012-03-10 06:26:13

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Squeak help needed

ok

the source code

blockspec

Code:

((#readFromUrl: UTF8['http://']))

The actual block code =

Code:

readFromUrl: t1 
    ^ (HTTPSocket httpGet: t1) contents

as far as i can tell

Last edited by muppetds (2012-03-10 06:26:34)


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#8 2012-03-11 09:24:24

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Offline

 

#9 2012-03-11 09:38:49

ZeroLuck
Scratcher
Registered: 2010-02-23
Posts: 500+

Re: Squeak help needed

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.


http://3.bp.blogspot.com/-oL2Atzp0Byw/T465vIQ36dI/AAAAAAAAADo/1vqL4PvhkM0/s1600/scratchdachwiki.png

Offline

 

#10 2012-03-11 09:57:59

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Squeak help needed

Yeah, line 799 onwards.  wink


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#11 2012-03-11 10:36:15

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Squeak help needed

rdococ wrote:

That works perfectly. Thanks!

thought there would be more to it


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#12 2012-03-11 14:16:03

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Squeak help needed

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.  wink  )
Otherwise I'm not sure because the lines get longer every time a new user logs in.  hmm


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

Board footer