I’m try to figure out how to get my Applescript droplet to process the files dropped on it in the order of the files creation date (process earliest first).
Any suggestions would be greatly appreciated,
CarbonQuark
Basics of my script:
on open (excelFiles)
repeat with x from 1 to count of excelFiles
tell application "Microsoft Excel"
open item x of excelFiles
-- file process goes here
end tell
end repeat
end open
on open (excelFiles)
tell application "Finder" to set excelFiles to sort excelFiles by creation date
repeat with oneFile in excelFiles
tell application "Microsoft Excel"
open oneFiles as alias
-- file process goes here
end tell
end repeat
end open
This works. However, it sorts the files with the newest first instead of the oldest. I have a repeat loop to coorect the order. If there is a better way let me know.
on open (excelFiles)
tell application "Finder" to set excelFiles to reverse of (sort excelFiles by creation date)
repeat with oneFile in excelFiles
tell application "Microsoft Excel"
open oneFiles as alias
-- file process goes here
end tell
end repeat
end open
PS: please post these problems into the OS X forum, this is the OS 9 forum