` Printed Icetips Article

Icetips Article



Clarion in general: Extracting an image list out of web page
2003-07-30 -- Jeff Slarve
 
Newsgroups: comp.lang.clarion

Might as well let the big boys do your work for you<g>


 Program

   map
   end

Window WINDOW('Image Counter'),AT(,,419,233),|
        FONT('MS Sans Serif',8,,FONT:regular,CHARSET:ANSI),CENTER, |
         IMM,GRAY,MAX,RESIZE
       OLE,AT(3,3,414,207),USE(?Ole1)
       END
       BUTTON('Get Images'),AT(3,215,45,14),USE(?Button1)
     END

Q  Queue
Image  String(255)
   end

ListWindow WINDOW('Images'),AT(,,417,203),|
        FONT('MS Sans Serif',8,,FONT:regular,CHARSET:ANSI),CENTER,SYSTEM, |
         GRAY,DOUBLE

LIST,AT(3,2,409,198),USE(?List1),VSCROLL,FORMAT('200L(2)|M~Image~'),FROM(Q)
     END


ndx long

  Code

 Open(Window)
 ?Ole1{PROP:Create}='Shell.Explorer.2'
 ?Ole1{'navigate("http://www.cnn.com")'}
 Ndx = 0
 Accept
   Case Accepted()
   of ?Button1
     Loop Ndx = 0 to ?Ole1{'document.images.length'} - 1
       Q.Image = ?Ole1{'document.images(' & ndx & ').src'}
       If NOT Q.Image then break.
       Add(Q)
     end
     break
   end
 end
 Close(Window)
 Open(ListWIndow)
 0{PROP:Text} = Records(Q) & ' Images'
 Accept
 end


On Wed, 30 Jul 2003 14:55:33 -0500, "Tim Morrison"
 wrote:

>Actually, I would have to look just for "src=" as per the following example:
>
><img border="0" src="P7020305.JPG" width="325" height="261"></a></td>
>
>Could you give me an example of how to search for "src=" ?
>
>Tim Morrison
>
>
>"Jason Berkan"  wrote in message
>news:3f2819c6.19839397@news.softvelocity.com...
>> On Wed, 30 Jul 2003 10:55:38 -0700, Ben E. Brady
>>  wrote:
>> >Just search for the string 'image src="' and collect everything until
>> >you reach the next double qoute.
>>
>> <IMG SRC=
>>
>> Jason
>


Jeff Slarve
http://www.jssoftware.com



Printed November 21, 2024, 7:24 am
This article has been viewed/printed 35228 times.
Google search has resulted in 150 hits on this article since January 25, 2004.