Would-be robber loses his battle with an ATM