• 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: How Can I Get a Launch Agent which is a Script to Talk to Me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How Can I Get a Launch Agent which is a Script to Talk to Me?


  • Subject: Re: How Can I Get a Launch Agent which is a Script to Talk to Me?
  • From: "S. J. Cunningham" <email@hidden>
  • Date: Mon, 05 Oct 2015 05:56:36 -0400

On Oct 5, 2015, at 2:34 AM, Axel Luttgens wrote:

I have written several such Agents for testing and they work fine in all other respects.  However UI interactions such as "display dialog" appear not to be executed:  no dialog appears and the Agent doesn't appear to be waiting for a response.  What am I missing?

Perhaps a problem with your OS version (just noticed you are on 10.6.8)?
Anyway, to be sure, could you precisely describe the steps you undertake to create you launch agents?

Axel

Axel,

Thanks.  Sure.  Here's the plist I put in ~/Library/LaunchAgents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>com.example.exampled</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>/Users/sjc/Desktop/exampled.scpt</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>


and Here's the Launch Agent I put on the desktop:

beep -- this works
say "example d finished" using "Alex" -- this works

display dialog "exampled finished" -- this doesn't

And here's the shell command to load:

launchctl load Library/LaunchAgents/com.example.exampled.plist


Works fine except the "display dialog" is never executed and the following error appears in the console log:

10/5/15 5:44:31 AM com.example.exampled[7799] execution error: --> No user interaction allowed. (-1713) <--
10/5/15 5:44:31 AM com.apple.launchd.peruser.502[149] (com.example.exampled[7799]) Exited with exit code: 1



Steve
------------------
OS X 10.6.8, AppleScript 2.1.2

 _______________________________________________
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: How Can I Get a Launch Agent which is a Script to Talk to Me?
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: How Can I Get a Launch Agent which is a Script to Talk to Me? (From: Christopher Nebel <email@hidden>)
 >Re: How Can I Get a Launch Agent which is a Script to Talk to Me? (From: "S. J. Cunningham" <email@hidden>)
 >Re: How Can I Get a Launch Agent which is a Script to Talk to Me? (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: How Can I Get a Launch Agent which is a Script to Talk to Me?
  • Next by Date: Re: How Can I Get a Launch Agent which is a Script to Talk to Me?
  • Previous by thread: Re: How Can I Get a Launch Agent which is a Script to Talk to Me?
  • Next by thread: Re: How Can I Get a Launch Agent which is a Script to Talk to Me?
  • Index(es):
    • Date
    • Thread