Running AppleScript without Window Server context
Running AppleScript without Window Server context
- Subject: Running AppleScript without Window Server context
- From: Dirk Stegemann <email@hidden>
- Date: Thu, 5 May 2005 19:18:25 +0200
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.
Is there any way to circumvent this problem?
Maybe there is another API to issue AppleScripts without connecting to
the Window Server...
Any input is appreciated!
Regards,
Dirk Stegemann
_______________________________________________
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