• 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
Re: Running AppleScript without Window Server context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Running AppleScript without Window Server context
      • From: Nathan Day <email@hidden>
References: 
 >Running AppleScript without Window Server context (From: Dirk Stegemann <email@hidden>)

  • Prev by Date: Re: Obtaining a reference to an entity's context's owner
  • Next by Date: Re: Hyperlinks in NSTextFields?
  • Previous by thread: Running AppleScript without Window Server context
  • Next by thread: Re: Running AppleScript without Window Server context
  • Index(es):
    • Date
    • Thread