While you'll lose over time ("as N tends towards infinity")^, but it's certainly possible to win, and walk away. Happens in Vegas, even.
The problem is, of course, someone wins, walks away and then comes back later, and gives back what they won, and then some. I was up about 3g the first day, and stopped. And then yesterday, I blew 4g. *lol*
In theory, you could macro it to buy tickets until you were "up" a certain amount, or had lost all your money. But I think half the fun is watching those goofy reels animate!
^Note that with video poker, perfect play, and favorable payoff tables, it's possible to win over time. However, we're talking VP, not lotto, and over time being hundreds of hours of play.