Sorry, the translation was wrong..What do you mean by "print the file to the Apple script"?
tell application "Finder" to print (choose file) -- print to default printer
-- or --
tell application "Finder" to print ("/Users/abs2634/Library/Mobile Documents/iCloud~is~workflow~my~workflows/Documents/CMYK/CMYK.png" as POSIX file)
Thank you so much for your help!AppleScript itself can’t print anything, you will need to use an application such as Finder or Preview. Note that the print command wants an alias, so if you want POSIX you will need to coerce to a POSIX file:
AppleScript:tell application "Finder" to print (choose file) -- print to default printer -- or -- tell application "Finder" to print ("/Users/abs2634/Library/Mobile Documents/iCloud~is~workflow~my~workflows/Documents/CMYK/CMYK.png" as POSIX file)
Excuse me, but I have one more question.AppleScript itself can’t print anything, you will need to use an application such as Finder or Preview. Note that the print command wants an alias, so if you want POSIX you will need to coerce to a POSIX file:
AppleScript:tell application "Finder" to print (choose file) -- print to default printer -- or -- tell application "Finder" to print ("/Users/abs2634/Library/Mobile Documents/iCloud~is~workflow~my~workflows/Documents/CMYK/CMYK.png" as POSIX file)
tell application "Preview" to close front window
Thank you so much for your response and have a happy day!You can just tell Preview (or whatever application) to close the front window (or quit), for example:
AppleScript:tell application "Preview" to close front window