Some people find that they can learn to control their roaming eyes in the street if they are mekabel on themselves a small knas every time they take a "second look" or gaze at something they shouldn't for more than 3 seconds. Some people give a "dollar" to tzedaka each time. Others give themselves a pinch. In SAA 12-Step groups, they keep a rubber-band on their hand and snap it hard for each wrong look.
Someone sent us the following tool that could be useful for some people along these lines:
They claim it helps a person "condition" themselves to associate the bad-habit (or gaze) with pain. In a short time, they claim, you will be healed from your bad habit!