Hi,
sorry for crossposting this issue. I first posted it on the Notification-Plugin subforum but I suppose it's better here.
This problem is connected to the possibilities in the Notification plugin but I think there are more things at work which might be of broader concern..
It seems using Python script, all action groups that are called in a sequence are executed nearly simultaniously which is a bad idea when using actiongroups as a kind of function call.
So here is the original post . I hope there is something to do about it.
I have a Notification category defined for the notificationplugi, that has a minor problem after I converted my Applescripts to Python,
I use an action group that plays a sound via afplay before an announcement is spoken.
Code: Select all
import subprocess
subprocess.call("/usr/bin/afplay /Users/wilhelm/Music/STARWAVE/c827.WAV",shell=True)
This AG is set in the "before speech" option of the notification category. This AG used to play a common sound using the "do shell script" statement calling afplay in an embedded AppleScript.
So the sound was played before the announcement was spoken by the OS.
After converting that mini scipt to python I realize, that the sound and the spoken text are produced simultaneously - I suppose the phython script runs in an additional thread so both are excecuted nearly at the same time.
What can I do?