Re: Running AppleScript without Window Server context
Re: Running AppleScript without Window Server context
- Subject: Re: Running AppleScript without Window Server context
- From: Mike Paquette <email@hidden>
- Date: Thu, 5 May 2005 11:42:40 -0700
On May 5, 2005, at 10:18 AM, Dirk Stegemann wrote:
Hello fellow developers,
I wrote a Foundation tool which uses NSAppleScript's
'executeAndReturnError:' method to run an AppleScript constructed
at runtime.
I'm running this tool frequently as cron job (actually, the cron
job executes a shell script which in turn runs my tool). Everything
is fine until the user whose crontab is responsible for running the
cron jobs is switched away via "Fast User Switch".
Then, in the system.log I find following message:
osascript: kCGErrorRangeCheck : Window Server communications
from outside of session allowed for root and console user only
I don't want to install my cron jobs in the root user's crontab to
ensure they will run reliably.
Don't do that. Really. I think I can safely guarantee that it will
fail in future products.
Is there any way to circumvent this problem?
Maybe there is another API to issue AppleScripts without connecting
to the Window Server...
That would be ideal. I don't know of one, though. Perhaps one of
the AppleScript engineers can comment?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden