Doubts about the use of %Variable%

You're looping through the Variables collection, which includes every variable available in Keyboard Maestro.

When inside the loop, local_varriable is a placeholder variable used to reference the current item in the collection for each iteration of the loop.

Say your variables are [Var1, Var2, Var3,...]:

In the first iteration of your top loop, local_varriable is equal to the string "Var1", and then you set local_varriable equal to %Delete%, overwriting the string "Var1".

In the first iteration of your bottom loop, local_varriable is equal to the string "Var1", and you get that string using %Variable%local_varriable%, which is processed into "Var1", so you set Var1 equal to %Delete%.

Here are some bonus threads by forum veterans regarding deleting variables:

3 Likes