Browse the docs

Location

Passes when the Mac is within a radius of a point on the map.

The Mac is within radius of the place

Keyboard Maestro: Location (Within, Not Within)

Details #

Asks the Mac where it is and passes when the distance to latitude, longitude is no more than radius metres. The default radius is 100 metres.

The Mac's position is a single reading, not a continuous track, and a Mac without GPS can be off by a good distance, so don't use a very small radius. The trace shows the distance in metres and the radius.

Every condition accepts "negate": true, which flips the verdict. The trace records what was compared before the flip, so a negated condition that blocks a macro still shows the real values.

Conditions in an Only if list combine with all: every one must pass, and an empty list always passes. An if step or a repeat loop takes a match of all (default) or any.

Parameters #

ParameterTypeRequiredValuesWhat it does
latitudeany valueYesLatitude of the point, in decimal degrees. Accepts a number or {{ }}.
longitudeany valueYesLongitude of the point.
radiusany valueDistance in metres. Default 100.
sampleyes / noUsed only in a dry run: the pretend answer. Default true.

Examples #

Am I near Apple Park
Do
  1. If the Mac is within 2000 m of (37.3349, -122.009)
  2. Show “Within 2 km of Apple Park”
  3. Else
  4. Show “Elsewhere”
Open in Switchboard to try it

Gotchas #

  • In a dry run no location is read: the condition passes with sample (default true) and the trace says simulated.

  • Needs both latitude and longitude (location needs latitude and longitude).

See also #