Yes, I know it is similar to this question, but I want further explanation.
I would like to detect two objects colliding, and write the frame number if on that frame the collision happened. Collision itself can be detected using the method described in the previous link, but I don't know on which 'operation', for example, 'scale' in the linked page, should I apply that driver.
Furthermore, I wonder I can run a simple python script for file writing, if a collision is detected using the driver method.