Well, the time is in ms, so a minute is 60000, not 5000 (5 seconds).
I'm not sure how well 13 would work (Shutdown, Force, Powerdown). perhaps just 12? (Force PowerDown)
Out of habit i surround my if statements in ()'s, which forces it to take it as an expression, although i am not sure how much difference that makes.
Lastly, i don't recommend using a label/variable that has the same name as a function.
So..
Code:
#persistent
settimer, turnoff, 1000 ;every second
turnoff:
;if over a minute...
if (A_TimeIdlePhysical > 60000)
shutdown, 8 + 4 ;force powerdown
return