-- drag-and-drop interface on open fileList repeat with aFile in fileList processFile(aFile) end repeat speakResult(count of fileList) end open -- launch interface (assumes launch doesn't disturb finder selection; -- e.g., script may be launched from Automated Tasks menu) on run repeat with aFile in application "Finder"'s selection processFile(aFile) end repeat speakResult(count of (application "Finder"'s selection as list)) end run -- process one files on processFile(pFile) set pFile to pFile as string -- name of file to process set smallname to miniName(pFile) -- name of miniature GIF -- let clip2gif do the hard work: try tell application "clip2gif" to  save file pFile as GIF  in file smallname  depth 8  dithering true  transparency no  colors palette system colors  maximum size {128, 128} on error display dialog "Can't convert " & pFile & " ." end try end processFile -- find a name for the miniature on miniName(pStr) repeat with i from (length of pStr) to 1 by -1 if character i of pStr is "." then  return ((characters 1 through (i - 1) of pStr) as string)  & "-mini.gif" end repeat return pStr & "-mini.gif" end miniName -- give feedback using speech manager or dialog box on speakResult(pCount) if pCount is 1 then set outstr to "File processed." else set outstr to (pCount as string) & " files processed." end if -- try -- say outstr -- requires Speech Manager -- on error activate display dialog outstr -- end try tell application "clip2gif" to quit end speakResult