• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Running AppleScript without Window Server context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Running AppleScript without Window Server context
      • From: Mike Paquette <email@hidden>
  • Prev by Date: Re: Hyperlinks in NSTextFields?
  • Next by Date: Re: Obtaining a reference to an entity's context's owner
  • Previous by thread: New multiple symbols warnings under Tiger
  • Next by thread: Re: Running AppleScript without Window Server context
  • Index(es):
    • Date
    • Thread