C'è un modo per disattivare automaticamente le notifiche Growl quando una determinata app è in esecuzione, ad esempio Quick Time. Non voglio ricevere le notifiche mentre guardo un film.
Credito completo a @ghoppe su Super User per questa eccellente risposta . Sto solo duplicandolo qui perché un moderatore su Meta suggeriva che sarebbe stato opportuno farlo.
Si noti che questa soluzione sopprimerà Growl quando VLC (lettore multimediale) è in esecuzione. Per farlo funzionare per un'altra applicazione (ad esempio QuickTime), dovrai modificare l'Applescript. Se hai provato te stesso ma hai ancora bisogno di aiuto, ti suggerirei di postare una domanda al riguardo all'indirizzo Stack Overflow .
La risposta originale segue:
Enter in Applescript Editor, save as application, when saving check the box "Stay Open". Use this new applescript application to launch the VLC application.
Description: It will launch VLC, turn off growl notifications, check every 2s to see if VLC has quit, if so it will turn growl notifications back on and then quit. As a bonus, it will use growl notifications to notify you when growl notifications will be turned on or off.
global Growl_was_Loaded
global VLC_is_Loaded
on run
set Growl_was_Loaded to isAppLoaded("GrowlHelperApp")
set VLC_is_Loaded to isAppLoaded("VLC")
launchVLC()
idle
end run
on idle
set x to isAppLoaded("VLC")
if x and not VLC_is_Loaded then
launchVLC()
else if VLC_is_Loaded and not x then
set VLC_is_Loaded to false
if Growl_was_Loaded then
tell application "GrowlHelperApp" to launch
growl_notify("Growl notifications have been turned ON")
end if
tell me to quit
end if
return 2 -- wait 2 seconds
end idle
on launchVLC()
tell application "VLC" to launch
if Growl_was_Loaded then
growl_notify("Launching VLC… Growl notifications have been turned OFF")
delay 1
tell application "GrowlHelperApp" to quit
end if
set VLC_is_Loaded to true
end launchVLC
on isAppLoaded(app_name)
tell application "System Events"
set app_list to every application process whose name is app_name
if the (count of app_list) > 0 then
set x to true
else
set x to false
end if
end tell
return x
end isAppLoaded
on growl_notify(msg)
tell application "GrowlHelperApp"
set the allNotificationsList to {"Growl Toggler"}
register as application "Growl Toggler" all notifications allNotificationsList default notifications allNotificationsList
notify with name "Growl Toggler" title msg description "" application name "Growl Toggler" icon of application "Automator"
end tell
end growl_notify