Can I drop EPS files into a folder and have them automatically print?
Is this possible through folder actions or applescript?
thanks
jason
Browser: Safari 312.5
Operating System: Mac OS X (10.3.9)
Can I drop EPS files into a folder and have them automatically print?
Is this possible through folder actions or applescript?
thanks
jason
Browser: Safari 312.5
Operating System: Mac OS X (10.3.9)
Question 1: yes
Question 2: yes and yes
But let me add that while this forum will help YOU create a script to do that, I doubt that anyone will supply a script to do it without knowing a lot more about the problem, what’s going on, what printers are available, etc. The devil’s in the details and you haven’t supplied either details or much of a notion of what you want to do.
The only difference between a folder action script and simply creating a desktop printer alias in this instance is that the dropped in document will remain in the folder instead of where it was (if that folder is open in the Finder, that is). You’d just be replacing two drags with one. If you create a desktop printer and drop a copy in every folder you want to have it in, then you can just drop the files into their folders, collect a bunch of them and drop them on the printer icon.
Where an AppleScript would get interesting would be in helping to automate the whole process, whatever that is.
OK - time for details.
I have images coming to my computer from the office network that I color correct and then put in the designated out folder, whatever that may be (ie: A Section, Editorial, Marketplace, etc). The final files that land in the out folders are EPS’s saved from photoshop cs2. The issue lies in our requirment to print proofs of these files to a special printer on the network. Normally we would print the files from our computer using the command + P command in photoshop. However, some of my fellow employees are lazy, and since our office is split between two locations, they don’t always print there proofs to us. But everyone puts their final files into the out folders. So i thought if I could find a way to make the files automatically print to the network printer when it was dropped in its designated out folder then life would be easier for everyone, including the art directors who enjoy seeing the proofs! So it sounds like there is an answer to my delima somewhere. So far I have successfully experimented with creating a desktop printer that i can drag files onto to print and I was also successful in putting this alias on the network and letting my co-workers drag and drop files on it. I have the privleges to enable folder actions on the folders on the server, I just don’t know the script language - so i can’t program an action myself. That’s where I need help if it’s possible, which it appears to be, and that’s exciting to know! What’s my next step?
OK - to get you started, go to Apple’s own description of how folder actions work.
In addition see these hints under Folder Actions in the AppleScript Forums.
Here’s an example from Code Exchange of a routine (called a handler) for checking that the folder action completed its task (for example, was the printer ON and online).
If there’s a high probability that photoshop will be running (you can check or start it if not) then you can make the folder action print the file from PS.
Lots of possibilities. Have a stab at something, and use the AppleScript button above the message text box to give you bbcode for submitting your first effort so we can open it in our script editors with a click. If I have time later, I’ll run up a skeleton for you and post it. To open it in your script editor with your permission, just click on the link at the top of the script entry.
Good luck.
PS: to get the dictionary in your Script Editor, choose Library under the Window menu, select “Standard Additions”, scroll the left hand pane down to “Folder Actions” and there you’ll see the commands that trigger Folder Actions.
PPS: Further thought - to get a folder action to work remotely may require that the script be installed on all of the client machines. This link in ScriptBuilders provides an alternative that runs as an application on each machine. (Doesn’t do exactly what you want, but it’s a start)
This script works for me on MY system (10.4.4). To work, the script has to be placed in the ~/Library/Scripts/Folder Action Scripts folder on the client’s machine. If that doesn’t exist, it must be created and this script saved in it (with suitable modifications).
The network printer (whatever it’s called) must appear in the client’s Printer Setup Utility as an available printer, and the folder must be “blessed” to add the script as a folder action according to the instructions in the Apple reference I gave you.
My example looks like this:
on adding folder items to thisFolder after receiving thoseItems
-- save the user's previous printer choice and select the designated printer for this folder
tell application "Printer Setup Utility"
activate
set OriginalPrinter to current printer
set NetPrinter to printer "hp LaserJet 1012" of application "Printer Setup Utility" -- the exact name of the printer to be used goes where the LaserJet is in quotes in this example.
if every printer contains {NetPrinter} then -- check that the printer is available
set current printer to NetPrinter
else -- tell the customer something is wrong
display dialog "THE REQUIRED PRINTER IS NOT ONLINE!" & return & return & "Please go to the Printer Setup Utility to check that \"" & (name of NetPrinter) & "\" appears in your printer list." & return & return & "IF NOT, please call extension 1234." buttons {"OK"} default button 1 -- fix this up to suit yourself.
end if
-- get on with the printing, and display an error if it doesn't happen
tell application "Finder"
try
print thoseItems
on error theError
display dialog "Something has gone wrong: " & theError buttons {"OK"} default button 1
end try
end tell
set current printer to OriginalPrinter -- reset the user's original printer choice as the default on that Mac.
quit -- quit the Printer Setup Utility which has a window in the way.
end tell
end adding folder items to