Encontré este script en algún sitio y estoy tratando de hacerlo para que compruebe constantemente si Final Cut Express está renderizando y cuando termine de hacerlo, muestre una notificación de Growl.
EDIT: Mi pregunta es: ¿Cómo consigo que el script compruebe constantemente si FCE está renderizando y una vez que haya terminado de renderizar, muestre una notificación? El script funciona para mostrar la notificación, ahora ¿cómo hago para que funcione bien?
EDIT: Intenté usar un manejador de inactividad. No funcionó, pero tal vez no estoy utilizando el controlador de inactividad derecha.
Aquí está el código del 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