I have been able to successfully save this as an app, but am having trouble
now when changing to select a file. When I try to change the choose folder
to choose file, I get the following error.
[quote]
Finder got an error: Can't get file {alias "Macintosh
HD:Users:sprale:Desktop:test eps files:03EM01301CZ06015A4.eps"} whose
{"eps", "ai", "ART1", "ART2", "ART3", "ART4"} contains name extension or
kind contains "Postscript" or kind contains "EPS" or kind contains
"Illustrator" or kind contains "ART5".
[/quote]
[applescript]
on run
-- set FileSample to (choose folder) --use this one instead if you
want to process an entire folder
set FileSample to choose file with prompt "Select multiple files with
the Command (Apple) key." with multiple selections allowed without
invisibles
set folderName to name of (info for FileSample) --only necessary if
needed for myList
tell application "Finder" to set theFiles to files of folder FileSample
whose name extension is in {"eps", "ai", "ART1", "ART2", "ART3", "ART4"} or
kind contains "Postscript" or kind contains "EPS" or kind contains
"Illustrator" or kind contains "ART5"
repeat with oneFile in theFiles
set {creation date:creationDate, modification date:modDate,
name:Filename} to info for oneFile as alias
set fileLocation to POSIX path of (oneFile as alias)
set myList to "Filename: " & Filename & return & "Creation date: " &
(creationDate as string) & return & "Modification date: " & (modDate as
string) & return & "Location: " & fileLocation & return & return
-- set myList to "Filename: " & Filename & return & "Parent
folder: " & folderName & return & "Creation date: " & (creationDate as
string) & return & "Modification date: " & (modDate as string) & return &
"Location: " & fileLocation & return & return --Use this set to input the
Parent folder line.
tell application "Adobe Illustrator"
activate
open (oneFile as alias) with options {update legacy text:true}
forcing CMYK without dialogs --Will not display font errors
--Set view to fit page
tell front document
set ruler origin to {0.0, 0.0}
make new text frame with properties {contents:myList,
kind:point text, position:{25, 770}, name:"Temp Info 1"}
--set size of text frame "Temp Info 1" to 9
print
close saving no
end tell
end tell
end repeat
end run
[/applescript]
thanks,
Levon
****************************************************************************
This email may contain material confidential to
Pearson. If you were not an intended recipient,
please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************
|