Automation support

AppleScript support

TripMode supports AppleScript actions. The detail can be found with an explanation of the parameters when opening the app’s dictionary in the AppleScript editor.

The sample AppleScrpipt below automates switching TripMode on an activating the user-defined Streaming profile.

#Gets the current TripMode status and stores it in the status variable
tell application "TripMode"
	set status to (get filter status)
end tell
display dialog "TripMode current status = " & status buttons {"OK"}

#If the status is disabled, then we enable TripMode
if (status as string) is equal to "disabled" then
	tell application "TripMode"
		set filter status to enabled
	end tell
	display dialog "TripMode is now enabled " buttons {"OK"}
else
	display dialog "TripMode was already enabled " buttons {"OK"}
end if

#Now we want to activate the "Streaming" profile
tell application "TripMode"
	set filter status to enabled #makes sure TripMode filtering is turned on
	set profileType to "manu" #sets the TripMode profile behavior to manual, which allows us to select our profile
	set profile to "Streaming" #this assumes that the Streaming manual profile already exists within TripMode
	set currentProfileBehavior to (get profileType)
	set currentProfile to (get profile)
end tell

display dialog "TripMode current active profile: " & currentProfile buttons {"OK"}

Shortcuts support

The same actions as AppleScript are also available as Shortcuts actions under macOS Monterey or later. They can be listed under the Apps tab, TripMode when adding a new shortcut.