That's certainly possible:
Begin Boolean Compare : [>{CMDWHENISAY}running] Equals True
Set Boolean [>{CMDWHENISAY}running] to [Not Set]
Write [Blue] '{CMDWHENISAY} loop stopped' to log
End Condition - Exit when condition met
Set Boolean [>{CMDWHENISAY}running] to True
Write [Blue] '{CMDWHENISAY} loop started' to log
Start Loop While : [>{CMDWHENISAY}running] Equals True
Click left mouse button
Pause 0,1 seconds
End Loop
The "{CMDWHENISAY}" token will be replaced by the contents of the "When I say" field of that command, which will be unique to that specific command. Because of this, you could duplicate this command to set up a different self-toggling command, and the only thing that would need to be modified is the actions inside the while loop that you want to have executed.
Make sure to check the "Evaluate 'Not Set' as false" in the "Begin a Conditional (If Statement) Block" and "Loop Start" actions.
As this uses loop actions, rather than repeating the entire command, also make sure the "Repeating" option for the command is set to "Execute only once".