Oct 14, '03 10:38:00AM • Contributed by: mmichaelmmorriso
I've written a very simple AppleScript and attached it to my drop box folder on the OS X machine. I've placed an alias of the drop box on the desktop of the OS 9 machine (set to appear on start up). When the user of the OS 9 machine drops a file into the drop box, the Applescript is activated and the finder prints the file to the default printer.
Read the rest of the hint for the how-to...
Here's what you need to do...
- Create this simple Applescript:
on adding folder items to this_folder after receiving these_items tell application "Finder" --this prints the item(s) dropped into the drop box print these_items -- this pauses the process until the printer has time -- to print (make it longer if you wish) delay 50 -- this deletes the files after printing - keeps folder clean delete these_items end tell end adding folder items to - Put this script (I call it droptoprint) in /Library -> Scripts -> Folder Action Scripts). Using folder actions, attach this script to your Drop Box folder in the Public folder of your home folder on the OS X machine. Of course, you must have script menu and folder actions enabled (Script menu is a folder called Script Menu.menu in your AppleScript folder, or can be downloaded here. You must drag the Script Menu.menu to your menu bar to activate). Go to the Enable Folder Actions item in the Folder Actions submenu to start folder actions. Then choose Attach Script to Folder in the same submenu. Select the script and attach.
- Mount the OS X machine's drop box on the OS 9 machine's desktop. To do so go to the Chooser, select AppleShare and log onto the OS X machine's hard drive (as guest) and have the drive mount to the desktop at startup (of course Personal File Sharing must be started on the OS X machine). Make an alias of the drop box and put it on the OS 9 desktop.
- When the OS 9 user wishes to print have them either 1) print to a file and drop the resulting file into the drop box or 2) drop an existing file into the drop box.
