Re: [Pythonmac-SIG] appscript fails to notice System Events is not running

2010-03-29 Thread has
Noah Coccaro wrote: > I have a long running server that uses appscript to send keystroke commands > to System Events. > It seems that System Events does not run constantly, or frequently dies. > Quite often, appscript seems to be in a state where it incorrectly thinks > System Events is runnin

Re: [Pythonmac-SIG] appscript fails to notice System Events is not running

2010-03-28 Thread Adam Morris
I use a function whose sole purpose is to return a reference to System Events to avoid this problem: import appscript as ap def getSystemEvents(): try: # ask System Events for processes to see if it's there throwaway = ap.app('/System Events').processes