How can I trigger an AppleScript to play a sound when a job is printed to a specific printer?
I have a PrintServer that FileMaker prints files to as a remote USB printer. I need to trigger a sound on the PrintServer whenever FileMaker sends a job to one specific printer (we have three printers on the PrintServer). I assume that I will need an AppleScript that is triggered on the PrintServer whenever it prints to the target printer.
i’m sure this is possible there’s a lot of talented scriptors on this forum who are very willing to help.
you might need to supply abit more info, and one hard thing is to reproduce somebody else’s set-up.
all these things could point to why nobody has answered your post…
There are three printers connected to the print server via USB.
1.) Kitchen
2.) Bar
3.) Coldside Back
When a person places an order at the POS computer a ticket is printed to each zone of the restaurant via the print server which hosts all of the printers. We have created a shared printer queue on each POS station but I am not familiar enough with how it passes the job to the print server. I assume that everything passes through the print queues on the print server. It seems like the printers all work even when there are no users logged in on the print server.
The kitchen is loud and they can not hear the printer. We have connected a speaker to the print server and we are trying to figure out how to trigger a specific sound file that alerts the cooks that an order has come in.
If we just had one POS it would be easy, I could simply tell the FileMaker’s print script to play the sound. Where I am stumped is trying to figure out how to trigger the sound from the print server.
I guess I don’t understand - If there’s only a printer in the kitchen, what’s going to make the sound for them to hear? Is the print server a Mac that’s in the Kitchen?
The print server is located in a back office that is approximately 40 feet from the kitchen.
There is a 50 foot audio cable connected to the speaker output on the print server.
There is a 50 foot CAT5 USB extender connected to the Print Server with a StarMicronics receipt printer connected to it.
Thanks for the Scriplet, I am not quite sure how to use it to trigger a sound but I will forward it to someone else in our office that has a better understanding of AppleScript.
After playing with my own setup here, I’m not convinced that the scriptlet is useful to you. While I was printing a large job it didn’t show anything. There has to be a way, but I haven’t found it. What is really wanted is a script to detect that a print job has come in and been sent to the printer because printing it will be fast anyway for the sort of thing you’re printing.
Thanks very much Adam, I will give it a try and let you know if it works. My concern is that I do not see any activity on the print server when a receipt prints from either POS terminal. I do not completely understand where the shared printer processes the requests that are sent to it. I thought that everything was going through the server’s print queue.
I am also looking into an Airport Express. Perhaps I can connect a speaker to one and trigger sounds via AppleScript from multiple computers.
tell application "Printer Setup Utility" to set P to name of every printer
You will see the printers like this (mine): {“hp LaserJet 1012”, “Stylus COLOR 740”}. Choose the one you mean to have beeps for, and change your on idle script to this:
on idle
tell application "Printer Setup Utility"
if status of printer "PutPrinterNameHereInQuotes" is printing then beep 2
return 2
end tell
end idle
First, I assume that “Cold Side Back” was the name returned by the Printer Setup Utility, when you asked for the name of every printer . Weird, because printers normally respond with something rather more generic. The reason I asked for what the Print Setup Utility called it, is because that’s “who” you’re asking. Is that the case?
Alternatively, your system considers the print server to be the printer. How do you direct print service to a particular printer?