• 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: Mac OS X 10.4: using osascript to interact with users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS X 10.4: using osascript to interact with users


  • Subject: Re: Mac OS X 10.4: using osascript to interact with users
  • From: Chris Page <email@hidden>
  • Date: Wed, 24 Jun 2009 21:32:18 -0700

On Jun 12, 2009, at 10:32 AM, Philip Aker wrote:

System Events, when called from an non-windowserver process like osascript has to be jacked up to a windowserver level.

You will get a “No user interaction allowed. (-1713)” error if you attempt to display UI in osascript, because it doesn’t have UI, but if the script tells System Events to do so it should always work. i.e., as far as I am aware, System Events won’t return −1713 in response to “display alert” or “display dialog” (etc.) no matter which process sends the Apple event. (It will return an error if the event is sent via EPPC, however.)

This bash script produces an error:

$ osascript -e 'display alert "Hi!”’
0:19: execution error: No user interaction allowed. (-1713)

This does not:

$ osascript -e 'tell application "System Events" to display alert "Hi!"'

(The alert may not appear in front without also sending System Events an “activate” command, but it shouldn’t return a −1713 error.)

-- 
Chris Page

 The other, other AppleScript Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Mac OS X 10.4: using osascript to interact with users
      • From: Deivy Petrescu <email@hidden>
    • Re: Mac OS X 10.4: using osascript to interact with users
      • From: Philip Aker <email@hidden>
References: 
 >Mac OS X 10.4: using osascript to interact with users (From: Aaron Wyatt <email@hidden>)
 >Re: Mac OS X 10.4: using osascript to interact with users (From: Philip Aker <email@hidden>)
 >Re: Mac OS X 10.4: using osascript to interact with users (From: Aaron Wyatt <email@hidden>)
 >Re: Mac OS X 10.4: using osascript to interact with users (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Mac OS X 10.4: using osascript to interact with users
  • Next by Date: Re: list issues
  • Previous by thread: Re: Mac OS X 10.4: using osascript to interact with users
  • Next by thread: Re: Mac OS X 10.4: using osascript to interact with users
  • Index(es):
    • Date
    • Thread