Ho trovato questo script online da qualche parte e sto cercando di farlo in modo che controlli costantemente per vedere se Final Cut Express sta eseguendo il rendering e quando termina il rendering, visualizza una notifica Growl.
EDIT: La mia domanda è: come faccio a controllare costantemente lo script per vedere se FCE sta eseguendo il rendering e una volta finito il rendering, visualizza una notifica? Lo script funziona per visualizzare la notifica, ora come faccio a farlo funzionare correttamente?
EDIT: ho provato a utilizzare un gestore inattivo. Non ha funzionato, ma forse non sto usando il gestore inattivo a destra.
Ecco il codice per lo script:
tell application "System Events"
tell application process "Final Cut Express HD"
set windowList to get name of every window
end tell
end tell
if windowList contains missing value then
end if
tell application "GrowlHelperApp" -- ** the daemon that is behind the scenes
-- Make a list of all the notification types that this script will ever send:
-- ** They really mean "ever" or you'll have to reregister.
set the allNotificationsList to {"Render Complete"}
-- , "Another Test Notification"}
--** Enable another notification
-- Make a list of the notifications that will be enabled by default.
-- ** We'll see shortly that a note must be enabled and the user can disable it.
-- Notifications not enabled by default can be enabled later in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to {"Render Complete"} -- ** just one turned on, the other not.
-- Register our script with growl.
-- You can optionally (as here) set a default icon for this script's notifications.
-- ** Theoretically, you only have to register once, but there is absolutely no harm in doing
-- it every time the script runs, i.e., leaving this line in your script.
register as application "Final Cut Render Complete Script" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Final Cut Express HD"
-- Send a Notification...
-- This one will appear because it was enabled by default.
notify with name "Render Complete" title "Render Complete" description "Your Render has Finished." application name "Final Cut Render Complete Script"
-- This one will not appear -- it wasn't enabled by default so the user has to turn it on in the 'Applications' tab of the Growl prefpane to see it.
-- Take out the comments to enable it.
--notify with name "Another Test Notification" title "Another Test Notification " description "Alas you won't see me until you enable me yourself..." application name "Final Cut Render Complete Script"
end tell