Action: Insert Conditional
In the Photoshop Action panel there's "Insert Conditional" allowing you to set logical conditions for action behaviour. Illustrator should have this too. It's neat.
It's useful for making action behaviour more inteligent and relevant to the document, eg. doing one or another thing depending on whether the document is landscape or portrait, colour mode, etc.
Another way it can be used is to create toggle buttons for things that Illustrator doesn't currently have shortcuts for (eg. Scale Strokes & Effects). Presently you have to create two separate keybindings for each action, whereas the conditional allows you to toggle with a single shortcut.
Mark Nicoll commented
Hi mads, sorry I've only just seen this. Please see the attached image of my actions panel - hope it makes sense!
I'm very interested in shortcuts to change the "Scale Strokes & Effects" setting that you mention. It sounds like, on your comment, that it is possible (though only by creating two separate keybindings). While we wait for the one-key toggle function, you ask for, could you explain to me how to do it with two separate shortcuts?
Thanks a lot!!