%AccessedVariables% token for last used variable names from all macros

Hello,

The %AccessedVariables% token returns (v10.0+) a comma-separated list of variables accessed by this macro.

https://wiki.keyboardmaestro.com/token/AccessedVariables

Is there a way to return all variables accessed by all macros sorted by last used?

Thanks,
ChrisQ

Seeing a list of all variables can be done in the preferences window. However, sorting by last used? I don’t think that capability exists. @peternlewis can confirm/deny this.

You can get a list of all variables from AppleScript.

tell application "Keyboard Maestro Engine" to name of variables

They are not ordered by use though.

2 Likes

Thanks @peternlewis for the AppleScript, that's quite useful as well. :slight_smile: