Scripting Application to Print

Hello, I am trying to find a script that would allow me to drop files into a folder and the corresponding application would open its file and print it. I know that InDesign 2.0 can be scripted to do this by naming the files that you put in the folder “.indd” Thanks for your time and consideration.

: Hello, I am trying to find a script that would allow me to drop
: files into a folder and the corresponding application would
: open its file and print it. I know that InDesign 2.0 can be
: scripted to do this by naming the files that you put in the
: folder “.indd” Thanks for your time and
: consideration.

Here’s some untested code. It should, at least, give you an idea of an approach.

on open(fileList)
    repeat with aFile in fileList
        set theFile to (contents of aFile)
        set theInfo to info for theFile
        tell application "Finder"
            set appFile to (application file ID (file creator of theInfo)) as text
        end tell
        tell application appFile
            try
                open theFile
                print window 1
            end try
        end tell
    end repeat
end open

Marc K. Myers Marc@AppleScriptsToGo.com
AppleScriptsToGo
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[3/2/02 3:23:55 AM]