Saturday, April 23, 2016

AHK Scripts, Especially ControlSend, Works only Once a While [Random]


I have AHK scripts that use ControlSend to close dialog boxes. However, they do not work consistently. The behavior is strange. The script works when I run it after rebooting the computer. But after a day or so, the script stops to work. I tried exiting the restarting the script -- doesn't work. Only reboot would solve the problem, and the solution is temporary. 

After reading the following discussion: https://stackoverflow.com/questions/21376762/what-to-do-when-controlsend-or-send-doesnt-work, I tried giving the AHK scripts admin rights. That solved the problem. I haven't have inconsistent issue involving ControlSend ever since.