Saving AppleScript to Run from Launchd

How should an AppleScript be saved in Script Debugger 8 so that it can be run by launchd?

  • Compiled Script
  • Compiled Script Bundle
  • Application (Apple)
  • Application (Enhanced)

As an application (theoretically either format, but as Enhanced is about enhanced UI, it probably makes little sense via launchd).

Does it matter where I put the compiled application?

I presume that the preferred location is: ~/Applications

The compiled application can live anywhere. You just need to specify its location within the LaunchDaemons property list file. And those plist files need to live here:
Macintosh HD > Library > LaunchDaemons >

This is a really great resource for Launch Daemons:
https://www.launchd.info

1 Like

In Script Debugger, I saved my script as an ā€œApplication (Apple)ā€ in ~/Applications but when I double click on it, I get this error message:

Not authorized to send Apple events to Contacts. (-1743)

I read several posts on this problem but I donā€™t understand what I have to do to fix it. :weary:

Not a plug for either product, neither with which Iā€™m not associated other than as a user, butā€¦

If you work with launchd only occasionally, such that youā€™re unlikely to become really fluent, LaunchControl and Lingon are two apps which provide an interface for creating and manage daemons and agents. Iā€™ve used and quite like both.

I think the correct URL for LaunchControl is https://www.soma-zone.com/LaunchControl/.

I can say that as a very occasional user of under-the-hood stuff, Iā€™ve used Lingon and it saved the hours I never spent typing Unix into a green-and-black screen to have the expertise to ā€˜justā€™ use Terminal. Sometimes a UI is better for some users, especially those without a deep command line background.

@mwra and @commiepinko

I just read the Macworld Gems review of Lingon X.

What do you see as key differences between Lingon X vs. LaunchControl?

Sorry about the bad link. I blame the cats for all typos.

I prefer the way Lingon presents the entire launchd environment, but like the way LaunchControl deals with individual agents/daemons.

Lingon presents them as a form with many values, most of which typically remain blank. The tooltips for these entries tend toward the opaque, and are unlikely to make sense to the uninitiate. Thereā€™s no easy linked documentation. The app assumes you understand launchd.

LaunchControl uses a building-block approach to the guts of an agent. You drag desired objects from an organized palette of entries with fairly comprehensible descriptions. Tooltips are available with additional info.

Lingon is more attractive and has the superior interface. LaunchControl makes launchd more comprehensible, and is more informative. Now that Iā€™ve thought about it, it appears I prefer LaunchControl, though what Iā€™d really like is an app that takes the best from each.

2 Likes

I downloaded both and tried to get a feel for each.

I ended up choosing Ligon-X because of the step-by-step questionaire build style. (In the ā€˜90s we called them Wizards; does this date me?). At this point Iā€™m not really trying to understand launchd; Iā€™m just interested to get my (first) application to run.

Maybe later Iā€™ll toe dip into whatā€™s going on and might like the better documentation in LaunchControl. :wink:

I ran the test and it worked first time! :partying_face:

Congratulations. Enjoy.