• 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: Deivy Petrescu <email@hidden>
  • Date: Thu, 25 Jun 2009 20:32:02 -0400


On 25/06/2009, at 00:32 , Chris Page wrote:

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



Chris,
I missed this post....
Why will system events will return an error via eppc?
Used to be that System Events was the way to go for eppc or remote scripting.
What changed?


Deivy Petrescu
email@hidden



_______________________________________________
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: Chris Page <email@hidden>
    • Re: Mac OS X 10.4: using osascript to interact with users
      • From: Paul Berkowitz <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>)
 >Re: Mac OS X 10.4: using osascript to interact with users (From: Chris Page <email@hidden>)

  • Prev by Date: Re: list issues
  • Next by Date: Re: Mac OS X 10.4: using osascript to interact with users
  • 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