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

#1 2011-11-24 10:11:10

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

I need block help!

how do you make a block that reads the html from a webpage? I will give credit in my mod.

Offline

 

#2 2011-11-24 13:02:09

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: I need block help!

Try looking at Panther's code.  smile

Offline

 

#3 2011-11-24 13:07:25

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: I need block help!

scimonster wrote:

Try looking at Panther's code.  smile

thanks!

Offline

 

#4 2011-11-24 13:07:40

jurk
Scratcher
Registered: 2010-05-06
Posts: 100+

Re: I need block help!

samtwheels wrote:

how do you make a block that reads the html from a webpage? I will give credit in my mod.

sorry I do not know  sad


http://dl.dropbox.com/u/54228408/cool.png

Offline

 

#5 2011-11-24 13:12:49

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: I need block help!

try

Code:

self readFromUrl: t1

(replace t1 with other variables if needed. That's from Panther, I have no idea if it will work by itself in another program or not, I'd be interested to know!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#6 2011-11-24 13:17:07

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

Re: I need block help!

sparks wrote:

try

Code:

self readFromUrl: t1

(replace t1 with other variables if needed. That's from Panther, I have no idea if it will work by itself in another program or not, I'd be interested to know!

No, readfromurl is a made up method.

Try this:

Code:

readFromUrl: t1 
    ^ (HTTPSocket httpGet: t1) contents

That makes it so now you can use readFromUrl:  wink


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

 

#7 2011-11-24 13:19:08

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: I need block help!

Pecola1 wrote:

sparks wrote:

try

Code:

self readFromUrl: t1

(replace t1 with other variables if needed. That's from Panther, I have no idea if it will work by itself in another program or not, I'd be interested to know!

No, readfromurl is a made up method.

Try this:

Code:

readFromUrl: t1 
    ^ (HTTPSocket httpGet: t1) contents

That makes it so now you can use readFromUrl:  wink

thanks for all the help!

Offline

 

#8 2011-11-24 13:57:00

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

Re: I need block help!

samtwheels wrote:

Pecola1 wrote:

sparks wrote:

try

Code:

self readFromUrl: t1

(replace t1 with other variables if needed. That's from Panther, I have no idea if it will work by itself in another program or not, I'd be interested to know!

No, readfromurl is a made up method.

Try this:

Code:

readFromUrl: t1 
    ^ (HTTPSocket httpGet: t1) contents

That makes it so now you can use readFromUrl:  wink

thanks for all the help!

Your welcome.  smile


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