I noted in my previous post that there was one drawback I had with integrating Aptana Jaxer and the instance of Apache I run on Mac OS X: Jaxer had to be running in order to use my local development server (since HTM, HTML, and PHP requests filter through Jaxer) but I couldn't get the Jaxer service to start automatically with the OS.

Automator, a utility bundled with OS X turned out to be the answer. I'd always wondered just how useful programs such as Automator are but, admittedly, I've never bothered to play around with it.

Before using Automator, I tried two things. First, I had the Jaxer Launcher application run on Login/Start Up. This was fine. I just clicked the "Start Jaxer" button, quit the program and was running. Still, I hate having to do something extra when I log onto my computer.

Next, I wrote an AppleScript (do shell script) to start the Jaxer server. This worked fine. Sort of. I was able to have the process added to my Login Items in the Accounts Preferences pane. However, whichever method I used to execute the process (either I ran an Application that was saved from Script Editor or I called the AppleScript directly), it would get locked up. Thus, I had to Force Quit the script or application. No harm done but it didn't get past the problem with my first approach: I still had to do something extra after logging onto my computer.

Enter Automator
Being a bit thickheaded, I kept plugging away at trying to get the AppleScript approach to work. Googling, reading forum posts, the usual. At some point in my search, I found a blog post that mentioned Automator. I'd totally forgotten it existed and decided that trying it would probably be a good idea since I wasn't getting anywhere with the AppleScript.

I don't know a lot (barely anything, actually) about Automator and this isn't meant to be a tutorial; rather, the steps I took to get Jaxer running at start up/login without me having to do anything at all.

Quick (and poor) Overview
Automator is a utility program on Mac OS X that creates a native Mac application which carries out a series of processes and/or steps that you lay out. I know that Automator comes "bundled" with Leopard, 10.5.x, and believe the same holds for Tiger, 10.4.x, but no idea about OS versions prior to Tiger.

My Automation Plan
My goal was to have the following steps followed:
1. Start Jaxer Launcher
2. Press the button "Start Jaxer"
3. Press the button "Quit"

My Steps
1. Open Automator and Open Jaxer Launcher (be sure neither Jaxer nor Apache are running)
2. Select "Files and Folders" from the initial dialog
3. Left default options selected (Get Content from: my Mac -- and -- Ask for Files and Folders now)
4. A File System Browse dialog appears
5. Locate the Jaxer Launcher application and select it **this may not actually be required...not sure!
6. Ensure that the Actions panel is showing
7. Open/Expand the Library folder in the Actions panel
8. Select Utilities
9. Select Launch Application in the pane to the right of Utilities (double-click it or drag-and-drop to the right panel)
10. Click on the drop-down and select Other... (way at the bottom)
11. Again locate and select Jaxer Launcher
12. Select Watch Me Do by double-clicking or dragging-and-dropping it under the Launch Application panel (located at the bottom of the pane in which you selected Launch Application)
13. Press the Record button in the Automator Toolbar (you'll see a translucent black window with a stop button and the Automator icon)
14. Flip over to the Jaxer Launcher application you opened in step 1
15. Press the button Start Jaxer
16. Press the button Quit (check in your Jaxer Launcher preferences that all checkboxes under Start/Stop tab are unchecked)
17. Press the stop button in the Automator pop up window (see step 13 for description)
18. Save in Automator
19. In the File Format drop-down, select Application
20. Save the file somewhere on your system
21. Open System Preferences
22. Select Accounts (in the System section)
23. Select the Login Items tab for your account
24. Press the plus (+) button to add a new item
25. Locate and select the application you saved in steps 18-20

The next time you start your Mac, Automator will run this program and Jaxer will be up and running without any problems.

I am sure there are many flaws in my approach and I don't mean this post to be some sort of definitive statement on Jaxer and Apache integration. It's nothing more than a recording of the steps I took to make it all work. If you see things I did that are/were wrong, dumb, idiotic, inefficient, etc., please post a comment and let me know!