At 10:02 am -0600 24/3/04, Joseph Alotta wrote:
I'm still playing around with the applescript code to try to make it work according to the suggestions here. Seems it needs "alias" to tell it to open files, but can't find them if you completely path them.
My fault. I told you I was tired.
You need to use Mac:paths: and not unix/paths/
You can work out for yourself a way to do that but here is a working example of a plain AppleScript way to open the first 4 jpgs in your pictures folder:
my $script = <<EOS; set pics to path to pictures folder tell application "Finder" set filelist to {} set jpgs to files in pics whose name ends with ".jpg" set firstfour to items 1 through 4 of jpgs repeat with f in firstfour set end of filelist to f as alias end repeat end tell tell application "Preview" open filelist activate end tell EOS `osascript -e '$script'`