Action while holding down the mouse left click

How to program an action while left click is held? Action should stop on lifting off your finger from the mouse button.