thumbnail of jpegs

Yves Coppé yvescoppe at skynet.be
Sat Jan 4 12:24:01 EST 2003


Hi,

I'd like to show photo's in a fld
the user chooses a folder with jpegs photos (on Mac OS X)
thet's the script :

on mouseUp
   answer folder "Choose the folder..."
   if it is empty then exit to top
   put it into tPathDossier
   put the defaultFolder into savedDefaultFolder
   set the defaultFolder to tPathDossier
   put the files into tFilesNames
   answer tFilesNames
   --delete line 1 of tFilesNames
   put the number of lines of tFilesNames into totLines
   put "1" into a
   put empty into tChars
   repeat totLines
     put a after tChars
     add "1" to a
   end repeat
   delete last char of tChars
   put tChars into fld "myThumbs"
   put "1" into a
   repeat for each line L in tFilesNames
     put the defaultFolder&"/"&L into tImagePath
     set the imagesource of char a of fld "myThumbs" to 
URL("binfile:"&tImagePath)
     add "1" to a
   end repeat
   set the defaultFolder to savedDefaultFolder
end mouseUp

In the fld I get :

"123"  -- it is the number of files (3) in the chosen folder !!!

What's wrong ???

Thank you for help
-- 
Greetings.

Yves COPPE

Email : yvescoppe at skynet.be



More information about the use-livecode mailing list