in reply to perl sending Apple events?
I'm not sure, whether or not, this will help, but maybe osascript (man osascript) is something you could use to couple perl and PS (or any scriptable application).
osascript can take any Applescript source and can execute it. So if your perl generates applescript, it can manage scriptable applications.
For example:
open (OSASCRIPT , '| osascript -'); print OSASCRIPT <<OSASCRIPT; tell application "iTunes" if the player state is playing then pause return "Pause" else play return "Play" end if end tell OSASCRIPT close OSASCRIPT;
|
|---|