J'essaie d'ajouter cette sous-routine à mon script mais il doit y avoir un problème de syntaxe. Il n'accepte pas le "end mySay" Comment puis-je détecter si un navigateur est en train de jouer quelque chose ?
on mySay (p, myMessage)
tell application "QuickTime Player" to set isQTplaying to (playing of documents contains true)
tell application "Music" to set isMusicPlaying to (player state is playing)
tell application "VLC" to set isVLCplaying to playing
--tell application "Brave" to set isiBravePlaying to (player state is playing)
--tell application "FireFox" to set isiFireFoxPlaying to (player state is playing)
--tell application "Safari" to set isiSafariPlaying to (player state is playing)
if isQTplaying or isMusicPlaying or isVLCplaying or isiBravePlaying or isiFireFoxPlaying or isiSafariPlaying then
else
set volume output volume p
say myMessage
set volume output volume myVolumeBefore
end mySay