This is a little suite of macros to interact with the Value Inspector.
It's a potential answer to how to display the values of all variables used in the current macro but I thought it best to start a new thread.
I've placed them in my "Keyboard Maestro" macro group. All assume v10 of KM (mainly because the main macro is a subroutine).
The macros are shown collapsed as they rely on image recognition for the Add/Remove buttons in the Inspector - and it might otherwise find those buttons in the macro itself. Take care when running these macros if you have any Add/Remove buttons visible in the currently-visible macro, or those buttons may be pressed in it instead ... with unforeseen consequences!
UPDATE: Please use the safer, alternative form of macro 2 below which doesn't suffer from this. Macro 3 could also be re-written to use AppleScript UI scripting, but I haven't got there yet!
1. Open (and set focus to) the Value Inspector
This just opens the Value Inspector (or closes and re-opens it) so that it is certain to have focus. This sometimes fails for me at the moment.
2. Remove all entries in the Value Inspector
This is a separate macro, as it may be helpful to call it separately.
UPDATE: Please use the safer, alternative form below
3. Show set of variables in Value Inspector
This is the main macro (well, subroutine) which can be passed a comma-separated list of variables to display (the same format that the AccessedVariables token uses). It can optionally remove all other entries in the Inspector first, using the second macro above.
4. Test displaying variables in Value Inspector
This is a test macro to demonstrate functionality of the main one.