I've tried 123 magic on my DS in similar situations and it is working.
It's a bit American but I 've just taken the basics of it which is this:
123 Magic can be used to get them to STOP doing something (whining, tantruming, hitting etc) It is not for behaviour that needs to start (getting dressed, getting out of the house etc).
As soon as the bad behaviour starts you say in a completely emotion free way "That's a 1"
After 5 seconds if they still haven't stopped you say in the same non reacting way "That's a 2"
After five more seconds if they still haven't stopped you say "Right that's a three" and you implement the consequence (time out) but you do not explain what you are doing or why you are doing it, you do not explain what they did wrong or emotionally engage with them or try to get them to understand or reason with them or anything.
At the end of the two to three minutes you take them out of time out (whatever that is for you - for me it is either put in the cotbed with the side up so he can't get out, or strapped into push chair if downstairs)
You don't say anything or mention that they've been in time out, you just carry on with what you're doing.
My DS seems to be very quickly picking up that fact that he isn't getting any attention or the usual reaction from me in the process and will now often stop at 2.
I wouldn't use "time out" as such before now and started this at the end of my tether because my DS would hit me, scream "No mummy" etc and I don't want to "teach" him that I am angry with him, just that his behaviour is unacceptable.
I think its the total lack of emotional response and complete (boring) predictabilty of outcome that makes the difference.
It's pretty painfree all round.