toggle quoted messageShow quoted text
If it’s correct, it means what you think it means, but I’d still argue that unless that's officially documented, it is better not to rely on it.
On Dec 7, 2017, at 17:34, 2551phil <2551phil@...> wrote:Ok, I found where I got this idea. It's in the http://www.launchd.info link:
Good work! I shall retweet that.
BTW, you don’t need to specify both Program and Program Arguments in your plist. If you leave out the Program key (and the osascript string that follows it), launchd will take the first item in the Program Arguments array as the Program (which you correctly have as the path to osascript).
The way you’re doing it, you’re technically passing /usr/bin/osascript as the first argument to /usr/bin/osascript, which you don’t really want to do.
When you provide both keys, the value of Program is the executable to be started. The first string in ProgramArguments will show up as argv in the executable. If this makes no sense to you, just think that launchd will ignore it.And indeed, it did not make sense to me :) But since it works I thought my comments in the code were not entirely wrong.JC