How to tell when an action is complete

Is there a way to use python or logic bricks to tell when an action has stopped playing? I have tried using Boolean properties, but I can’t figure out how to tell when it has stopped, as opposed to just when it has stopped being triggered. For example, you press a button, and the character walks, performing a walkcycle. If it is set to play, for instance, it will trigger the action, and then as far as I can tell just forget about it. It may be overrode by other actions, or just end on it’s own, but the engine just forgets about it.
I would like to attach a script that sets a Boolean property to True when the action is playing, and False when it is not.

You could use the actuator sensor.