GTQScriptingLibrary1.2 --image sort
GTQScriptingLibrary1.2 --image sort
- Subject: GTQScriptingLibrary1.2 --image sort
- From: email@hidden
- Date: Fri, 6 Apr 2001 16:49:11 -0400
I am just starting to learn applescript, and have been reading this
list for a couple weeks now (very helpful).
I want to sort a list of files (which are in the format 1.eps to
999.eps) into ascending numeric format ie. 1, 2, 3 not 1, 10, 11.
I have tried using GTQScriptingLibrary1.2 but only because I could
think of no other way, which I have been unsuccessful in using (can't
get it to work).
Does anyone know of another/better way to sort?
here is my code so far
set theFolder to choose folder with prompt "Choose folder to sort:"
tell application "Finder"
set theImageList to every file of theFolder whose kind is not
"alias" and ,
the file type obsolete is "TIFF" or the file type
obsolete is "EPSF" or ,
the file type obsolete is "PICT" or the file type
obsolete is "JPEG"
if class of theImageList is not list then set theImageList to
theImageList as list
end tell
sort theImageList
---
thanks
Andrew McNichol