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"?> <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
|