-- 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