Extracting Images from a http:// page

Klaus Major klaus at major-k.de
Fri Feb 10 09:02:15 EST 2006


Hi David,

> Hi Again,
>
> Thanks a lot that worked just fine! The extract below reads thru  
> the URL list and flashes each image in an Image Object. However, I  
> can't seem to set the imageData, only the fileName. I don't want to  
> hold the image as a reference, but rather I want to import the  
> image into the stack. Is this possible? Uncomment the "set the  
> imageData" line below and comment the "set fileName" line, I just  
> get a blank image.
>
>
>   put myURLList into field 1
>
>   repeat for each line myImageLine in myURLList
>     put offset("src=" & quote,myImageLine) into myFromOffset
>     add 5 to myFromOffset
>
>     put offset(quote,myImageLine,myFromOffset) into myToOffset
>     put myFromOffset + myToOffset - 1 into myToOffset
>     put char myFromOffset to myToOffset of myImageLine into  
> myImagePath

Do this instead:

>     put myURLBase & myImagePath into myImagePath
>     --set the imageData of image 1 to  url  "binfile:" & myImagePath

put url myImagePath into img 1
## no need to mess with imagedata :-)

OR

set the fileName of image 1 to url myImagePath

>     wait for 0.5 seconds
>   end repeat
>
> Any ideas???

No need (it's wrong actually!)  for "binfile:" with http urls.

> Thanks a lot
> All the Best
> Dave

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list