EventScripts Icon

Available Events and Parameters

EventScripts can pass information to both AppleScripts and shell scripts that provide more detail about the event that triggered the script. For AppleScripts these are passed as a record of properties, for shell scripts arguments are passed.

The tables below show the property names and arguments for all the events supported by EventScripts. Ensure your copy of EventScripts is up to date to get the complete list of events.

Example scripts demonstrating how the parameters are passed from EventScripts to both AppleScripts and shell scripts are available here.

Mobile Events

The event EventScripts Mobile will cause the script to be displayed in the iOS app EventScripts mobile. This lets you trigger the script from your iPhone, iPad or iPod touch. The EventScripts Mobile client found and EventScripts Mobile client lost are triggered when an EventScripts iOS client connects or disconnects from the server.

Mobile
Events
AppleScript
Record Properties
Shell Script
Arguments
EventScripts
Mobile
trigger
scriptPath
tagName
$1
$2
$3
EventScripts
Mobile client found
trigger
scriptPath
tagName
$1
$2
$3
EventScripts
Mobile client lost
trigger
scriptPath
tagName
$1
$2
$3

Location Events

This event is triggered when Core Location detects a change in your current location. EventScripts passes your previous and current location to any scripts that it executes.

Location
Events
AppleScript
Record Properties
Shell Script
Arguments
Location
updated
trigger
previousLatitude
previousLongitude
latitude
longitude
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7

Network Events

These events let you trigger scripts when your network configuration changes. EventScripts uses its own dedicated external IP resolution service, as well as that supplied by Akamai to detect when your real world IP address changes for the External IP address changed event.

Network
Events
AppleScript
Record Properties
Shell Script
Arguments
Internet became
available
trigger
scriptPath
tagName
$1
$2
$3
Internet became
unavailable
trigger
scriptPath
tagName
$1
$2
$3
External IP address changedtrigger
previousAddress
ipAddress
scriptPath
tagName
$1
$2
$3
$4
$5
Wireless network changedtrigger
SSID
previousSSID
BSSID
scriptPath
tagName
$1
$2
$3
$4
$5
$6

Volume & USB Events

The volume events are triggered before and after OS X mounts an external volume or server. The volume name and path is supplied to any scripts EventScripts executes. The USB events are triggered as devices are added and removed. The passed parameters include the USB device name.

Volume
Events
AppleScript
Record Properties
Shell Script
Arguments
Volume mountedtrigger
volumeName
volumePath
scriptPath
tagName
$1
$2
$3
$4
$5
Volume will unmounttrigger
volumeName
volumePath
scriptPath
tagName
$1
$2
$3
$4
$5
Volume unmountedtrigger
volumeName
volumePath
scriptPath
tagName
$1
$2
$3
$4
$5
USB
Events
AppleScript
Record Properties
Shell Script
Arguments
USB device attachedtrigger
deviceName
scriptPath
tagName
$1
$2
$3
$4
USB device removedtrigger
deviceName
scriptPath
tagName
$1
$2
$3
$4

Computer Events

These events let you trigger scripts when your computer sleeps, wakes and is shutdown. The Computer will sleep attempts to delay sleep to allow the script to be executed, but ultimately does not prevent sleeping. If you are only after an application to trigger scripts when your computer is put to sleep, then check out SleepWatcher for a free alternative to EventScripts.

Computer
Events
AppleScript
Record Properties
Shell Script
Arguments
Computer will shutdowntrigger
scriptPath
tagName
$1
$2
$3
Computer will sleeptrigger
scriptPath
tagName
$1
$2
$3
Computer wakestrigger
scriptPath
tagName
$1
$2
$3

Power Events

The Power switched to battery event is only appropriate to MacBooks. The other two events should also be triggered on desktops if you swap between mains power and a UPS system that is recognised natively by Mac OS X.

Power
Events
AppleScript
Record Properties
Shell Script
Arguments
Power switched to mainstrigger
scriptPath
tagName
$1
$2
$3
Power switched to batterytrigger
scriptPath
tagName
$1
$2
$3
Power switched to UPStrigger
scriptPath
tagName
$1
$2
$3

General Events

Oooh! Look! Motion detection! Yup - EventScripts has motion detection, which uses the iSight camera to look for motion. Won't work if you don't have an iSight camera. Very useful for, er...

General
Events
AppleScript
Record Properties
Shell Script
Arguments
Screenshot takentrigger
screenshotName
screenshotPath
screenshotType
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Desktop picture changedtrigger
imagePath
scriptPath
tagName
$1
$2
$3
$4
Motion detectedtrigger
scriptPath
tagName
$1
$2
$3

Audio Events

You can trigger actions in EventScripts when headphones are attached or removed from your Mac. This has been tested with onboard audio hardware only.

Audio
Events
AppleScript
Record Properties
Shell Script
Arguments
Headphones connectedtrigger
scriptPath
tagName
$1
$2
$3
Headphones disconnectedtrigger
scriptPath
tagName
$1
$2
$3

Spaces Events

Spaces
Events
AppleScript
Record Properties
Shell Script
Arguments
Spaces changedtrigger
scriptPath
tagName
$1
$2
$3
Entered fullscreentrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6

Download Events

Many applications (Safari, Transmission, etc.) post notifications to let the system know that a file has been downloaded. You can trigger events when EventScripts hears these notifications.

Download EventsAppleScript
Record Properties
Shell Script
Arguments
File Downloadedtrigger
downloadedFile
scriptPath
tagName
$1
$2
$3
$4

Apple Remote Events

Should work if you Mac can be controlled by an Apple Remote (not all can, in which case use EventScripts Mobile and your iPhone!). These events are powered by the excellent remote framework from iospirit, makers of Remote Buddy. If you need more sophisticated control of remotes than EventScripts can provide, you should really check out Remote Buddy.

Apple Remote EventsAppleScript
Record Properties
Shell Script
Arguments
Apple Remote Uptrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Downtrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Lefttrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Righttrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Centertrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Play/Pausetrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Menutrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4

Bluetooth Events

Bluetooth EventsAppleScript
Record Properties
Shell Script
Arguments
Bluetooth became availabletrigger
scriptPath
tagName
$1
$2
$3
Bluetooth became unavailabletrigger
scriptPath
tagName
$1
$2
$3
Bluetooth device foundtrigger
deviceName
deviceAddress
scriptPath
tagName
$1
$2
$3
$4
$5
Bluetooth device losttrigger
deviceName
deviceAddress
scriptPath
tagName
$1
$2
$3
$4
$5

Backup Events

These events are triggered when backups are completed, or when the backup volume is mounted.

Time Machine
Events
AppleScript
Record Properties
Shell Script
Arguments
Time Machine backup completedtrigger
backupPath
scriptPath
tagName
$1
$2
$3
$4
Time Machine volume mountedtrigger
backupVolume
scriptPath
tagName
$1
$2
$3
$4

Screen Events

Recent additions to this suite are the Screen was added, Screen was removed and the Screen configuration changed event.

Screen
Events
AppleScript
Record Properties
Shell Script
Arguments
Screensaver startedtrigger
scriptPath
tagName
$1
$2
$3
Screensaver will stoptrigger
scriptPath
tagName
$1
$2
$3
Screensaver stoppedtrigger
scriptPath
tagName
$1
$2
$3
Screen did sleeptrigger
scriptPath
tagName
$1
$2
$3
Screen did waketrigger
scriptPath
tagName
$1
$2
$3
Screen password lockedtrigger
scriptPath
tagName
$1
$2
$3
Screen password unlockedtrigger
scriptPath
tagName
$1
$2
$3
Screen was addedtrigger
scriptPath
tagName
$1
$2
$3
Screen was removedtrigger
scriptPath
tagName
$1
$2
$3
Screen configuration changedtrigger
scriptPath
tagName
$1
$2
$3

Application Events

Application
Events
AppleScript
Record Properties
Shell Script
Arguments
Application activatedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Application deactivatedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Application will launchtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Application launchedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Application quittrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
EventScripts launchedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
EventScripts quittrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6

Browser Events

Browser
Events
AppleScript
Record Properties
Shell Script
Arguments
Safari will launchtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Safari launchedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Safari quittrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Firefox will launchtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Firefox launchedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Firefox quittrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Google Chrome will launchtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Google Chrome launchedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Google Chrome quittrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6

iTunes Events

iTunes
Events
AppleScript
Record Properties
Shell Script
Arguments
iTunes track changedtrigger
album
track
artist
scriptPath
tagName
$1
$2
$3
$4
$5
$6
iTunes will launchtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
iTunes launchedtrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
iTunes quittrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6