I stick to a monthly budget. Let's say I alot 5% of my income to gambling. I just need to make sure that it will last me for the whole month so I won't need to take more money from my income. It takes discipline. And another thing, never try to chase your losses.
I guess that is one way that we can use to prevent using more money in gambling. I agree that it needs the discipline to use some money to play gambling, and we need to have the power to control ourselves for staying a long time in gambling because that can make us spend more money. Maybe that will be a way to keep track of our gambling besides making a file of our gambling activity.