I don't know this unit but I've found that these triggers occur when the gate is opening and when its closing. You either need an additional driveway sensor and write a complex conditional where which sensor is triggered first matters, or to follow Harris and provide a contract at the gate tracking its state. Otherwise, you are triggering you macro when a car leaves at night rather than when it's entering. Perhaps I'm in error with this unit and it only outputs 12v when opening. But how will you know if a car is entering or leaving?
"This is a Christian Country,Charlie,founded on Christian values...when you can't put a nativiy scene in front fire house at Christmas time in Nacogdoches Township, something's gone terribly wrong"