Mobile & Location Events

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. Example scripts demonstrating how the parameters are passed from EventScripts to both AppleScripts and shell scripts are available here.

Event Category AppleScript
Record Properties
Shell Script
Arguments
EventScripts MobileMobile Eventstrigger
scriptPath
tagName
$1
$2
$3
EventScripts Mobile client found Mobile Eventstrigger
scriptPath
tagName
$1
$2
$3
EventScripts Mobile client lost Mobile Eventstrigger
scriptPath
tagName
$1
$2
$3
Location updatedLocation Eventstrigger
previousLatitude
previousLongitude
latitude
longitude
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Showing entries (filtered from total entries)

Application & Browser Events

These events are triggered by application launches and quits
'Background application launched' is an event triggered by background applications that don't appear in the Dock, such as 'screenshot' in Big Sur and above

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Application activated Application Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Application deactivated Application Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Application will launch Application Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Application launched Application Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Application quit Application Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
EventScripts launched Application Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
EventScripts quit Application Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Safari will launch Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Safari launched Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Safari quit Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Firefox will launch Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Firefox launched Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Firefox quit Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Google Chrome will launch Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Google Chrome launched Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Google Chrome quit Browser Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Background application launchedApplication Eventstrigger
bundleCode
applicationName
applicationPath
processIdentifier
scriptPath
tagName
$1
$2
$3
$4
$5
$6
$7
Showing entries (filtered from total entries)

Network Events

Events triggered by changes to your network connection or connectivity

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Internet became available Network Eventstrigger
scriptPath
tagName 
$1
$2
$3
Internet became unavailable Network Eventstrigger
scriptPath
tagName 
$1
$2
$3
External IP address changed Network Eventstrigger
previousAddress
ipAddress
scriptPath
tagName
$1
$2
$3
$4
$5
Wireless network changed Network Eventstrigger
SSID
previousSSID
BSSID
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Showing entries (filtered from total entries)

Volume, USB & Time Machine 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.

Event Category AppleScript
Record Properties
Shell Script
Arguments
Volume mounted Volume Eventstrigger
volumeName
volumePath
scriptPath
tagName
$1
$2
$3
$4
$5
Volume will unmount Volume Eventstrigger
volumeName
volumePath
scriptPath
tagName
$1
$2
$3
$4
$5
Volume unmounted Volume Eventstrigger
volumeName
volumePath
scriptPath
tagName
$1
$2
$3
$4
$5
USB device attached USB Events trigger
deviceName
scriptPath
tagName
$1
$2
$3
$4
USB device removed USB Events trigger
deviceName
scriptPath
tagName
$1
$2
$3
$4
Time Machine backup completed Time Machine Eventstrigger
backupPath
scriptPath
tagName
$1
$2
$3
$4
Time Machine volume mounted Time Machine Eventstrigger
backupVolume
scriptPath
tagName
$1
$2
$3
$4
Showing entries (filtered from total entries)

Apple Music Events

Triggered by changes in the Music application

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Music track changedMusic Eventstrigger
album
track
artist
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Music will launch Music Eventstrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Music launched Music Eventstrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Music quit Music Eventstrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Showing entries (filtered from total entries)

Apple Remote Events

If you Mac can be controlled by an Apple Remote, then you can use it to trigger scripts with EventScripts. These events are powered by the excellent framework from iospirit, makers of Remote Buddy. If you need sophisticated control via an Apple remote, use Remote Buddy.

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Apple Remote Up Remote Eventstrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Down Remote Eventstrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote LeftRemote Eventstrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote RightRemote Eventstrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Center Remote Eventstrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Play/Pause Remote Eventstrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Apple Remote Menu Remote Eventstrigger
buttonHeld
scriptPath
tagName
$1
$2
$3
$4
Showing entries (filtered from total entries)

Bluetooth Events

Triggered by monitored Bluetooth devices and iBeacons

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Bluetooth became available Bluetooth Eventstrigger
scriptPath
tagName
$1
$2
$3
Bluetooth became unavailable Bluetooth Eventstrigger
scriptPath
tagName 
$1
$2
$3
Bluetooth device foundBluetooth Eventstrigger
deviceName
deviceAddress
scriptPath
tagName 
$1
$2
$3
$4
$5
Bluetooth device lost Bluetooth Eventstrigger
deviceName
deviceAddress
scriptPath
tagName 
$1
$2
$3
$4
$5
iBeacon found iBeacon Eventstrigger
uuid
deviceUUID
scriptPath
tagName
$1
$2
$3
$4
$5
iBeacon lost iBeacon Eventstrigger
uuid
deviceUUID
scriptPath
tagName
$1
$2
$3
$4
$5
Showing entries (filtered from total entries)

Google Home & Chromecast Events

These events are triggered as EventScripts notices these devices becoming available, unavailable and as their activity changes. Parameters include 'activity' which lets you know what the device is currently doing. Note that 'name' and 'host' are reserved words in AppleScript and should be wrapped in braces, as below, when referencing the event record.

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Chromecast foundChromecast Eventstrigger
|host|
identifier
address
model
|name|
activity
scriptPath
tagName 
$1
$2
$3
$4
$5
$6
$7
$8
$9
Chromecast lostChromecast Eventstrigger
|host|
identifier
address
model
|name|
activity
scriptPath
tagName 
$1
$2
$3
$4
$5
$6
$7
$8
$9
Chromecast activityChromecast Eventstrigger
|host|
identifier
address
model
|name|
activity
scriptPath
tagName 
$1
$2
$3
$4
$5
$6
$7
$8
$9
Showing entries (filtered from total entries)

Computer & Power 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.

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.

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Computer will shutdown Computer Eventstrigger
scriptPath
tagName 
$1
$2
$3
Computer will sleep Computer Eventstrigger
scriptPath
tagName 
$1
$2
$3
Computer wakes Computer Eventstrigger
scriptPath
tagName 
$1
$2
$3
Power switched to mains Power Eventstrigger
scriptPath
tagName 
$1
$2
$3
Power switched to battery Power Eventstrigger
scriptPath
tagName 
$1
$2
$3
Power switched to UPS Power Eventstrigger
scriptPath
tagName 
$1
$2
$3
Showing entries (filtered from total entries)

Screen Events

Events triggered by changes to your screen setup, including fast user switching in and out of your active workspace.

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Screensaver started Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screensaver will stop Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screensaver stopped Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screen did sleep Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screen did wake Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screen password locked Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screen password unlocked Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screen was added Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screen was removed Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Screen configuration changed Screen Eventstrigger
scriptPath
tagName
$1
$2
$3
Spaces changedScreen Eventstrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Entered fullscreen Screen Eventstrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Exited fullscreen Screen Eventstrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Fast user switch inScreen Eventstrigger
userName
fullUserName
scriptPath
tagName
$1
$2
$3
$4
$5
Fast user switch out Screen Eventstrigger
userName
fullUserName
scriptPath
tagName
$1
$2
$3
$4
$5
Showing entries (filtered from total entries)

Miscellaneous Events

Audio events only cover in-built Apple audio hardware.

Motion detection requires an inbuilt Apple iSight camera,

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 with the download event.

Event Category AppleScript
Record Properties
Shell Script 
Arguments
Headphones connected Audio Eventstrigger
scriptPath
tagName 
$1
$2
$3
Headphones disconnected Audio Eventstrigger
scriptPath
tagName 
$1
$2
$3
File Downloaded Download Eventstrigger
bundleCode
applicationName
applicationPath
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Screenshot takenMisc Eventstrigger
screenshotName
screenshotPath
screenshotType
scriptPath
tagName
$1
$2
$3
$4
$5
$6
Desktop picture changed Misc Eventstrigger
imagePath
scriptPath
tagName
$1
$2
$3
$4
Motion detectedMisc Eventstrigger
scriptPath
tagName 
$1
$2
$3
AirPlay became availableAudio Eventstrigger
scriptPath
tagName 
$1
$2
$3
AirPlay became unavailableAudio Eventstrigger
scriptPath
tagName 
$1
$2
$3
Showing entries (filtered from total entries)

AI Website Maker