Want CNET to notify you of price drops and the latest stories?

How to trigger OS X system events with Griffin Proxi

Automating tasks in OS X is exceptionally useful, but while Apple has some options for scripting workflows, it does not offer many options to trigger them. Griffin's Proxi application may be the answer.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
4 min read

Being able to automate tasks is a very convenient option when using computer systems, which is one of the reasons why Apple included its Automator tool in OS X that can various scriptable tasks within applications and therefore do things like organize files and contacts, create documents with specific items in them, and manage calendar events.

While Automator and other scripting options like shell scripting or AppleScript are convenient, they are missing the triggering tool that will run them. Apple supplies its Apple Events options where you can have the system run a script when a folder's contents are changed, or on demand from an application like running an Automator workflow when an iCal alarm sounds, but other options require more details to get running. Apple's main scheduler in OS X is its launchd system launcher process, which can conditionally run various scripts or programs based on the user's or developer's needs; however, this option requires knowledge of launchd and familiarity with the Terminal to get running.

As a result of this complexity, many tasks in OS X that could be highly customized end up going unattended and requiring users to manually start them in order to get completed, but Griffin Technologies, which makes a number of peripheral devices for Mac OS and iOS systems, has a tool called Proxi that makes triggering scripted tasks far easier.

The tool is set up similar to Automator, where you create a list of triggers followed by tasks assigned to those triggers that will run when the trigger occurs. For instance, laptop users might wish to know if and when their system switches to battery power from wall power. While the power connector's light should be green or amber when connected, and the battery indicator in the menu bar should indicate whether the system is running on battery, these options are peripheral and can easily be overlooked. Instead of relying on them, you can set up a battery monitor trigger in Griffin Proxi that will display a bold notification window on screen about the power supply change. Here is how this is done:

Proxi trigger settings
In Proxi, select the trigger to see its settings. Screenshot by Topher Kessler
  1. Install Proxi
    Download and install Proxi from the Griffin Web site (it's a 2MB to 3MB download). The installer package is a "Flat" package that might not open in later versions of Apple's Installer utility, so if it does not open then you can open and extract the program using the package management utility Pacifist from Charlesoft.

  2. Open the program
    When the program opens, you will see a few windows, with the main "Proxi" window showing a column for triggers, followed by tasks, and then a settings pane.

  3. Add a trigger
    In this case we are adding a Battery Monitor trigger, so click the gear menu below the "Triggers" column and choose "Battery Monitor" from the "Insert Trigger" submenu. The trigger should now display in the column and be checked.

  4. Edit the trigger
    With the trigger added, select it and you will see a number of options for it in the settings pane, including details such as the power source that will cause the trigger and filters such as the trigger happening only if the battery is at a specific level. In this case I just want to create a notification that the power has switched to the battery, so I'll ignore extra values and filters, and just set the trigger to activate when the power source changes to the battery.

  5. Proxi Task Settings
    Edit the trigger's task in a similar way to the trigger itself. Screenshot by Topher Kessler
  6. Add a task
    With the trigger set up, now add the task to run when the trigger happens. This is done from the gear menu below the Tasks column, where you can select from a variety of options including copying and moving files, playing sounds, and displaying a screen message. In this case I want to create a bold screen message so I add the "Screen Message" task.

  7. Edit the task
    Selecting the task shows various options for it, such as where it will be on screen, its background color, and when it will be dismissed. Unfortunately some of the formatting options like text size and color are not in the Settings pane, but you can access them in the Format menu or use hot keys such as Command-plus to increase the text size.

After these steps have been completed, the setup is now done and disconnecting the power cable results in the notification showing up on the display. The tasks will only run if Proxi is left open on your system, which can be done by setting it to run at log-in in the program's preferences. In addition, you can make the program less intrusive when it is running by setting it to not show in the Dock and to have its menu bar display as a menu extra instead of on the main menu bar.

Proxi Notification Window in action
Switching to battery power after the task is set up now displays the desired notification window. Screenshot by Topher Kessler

While in this example I discussed how to set up a trigger for battery notifications, you can use the program to set up multiple triggers for a number of different items, including scheduled tasks, folder monitoring, speech recognition and hot keys, application monitors, and even responses to input from infrared remotes for systems with these sensors.

Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.