Changed the code so it no longer needs the GUI password prompt.
Code taken from http://hints.macworld.com/article.php?story=20060203225241914
Enabling assistive devices no longer requires GUI password
Ah, this deprecates #175? I see.
Yes. Being relatively new at git, the pull request at the time was directly from the master branch. I closed that one and opened this one as a better practice of applying changes to a different branch.
Does this code work for you?
I tested this as follows:
sudo touch /private/var/db/.AccessibilityAPIEnabled
The checkbox was still unchecked.
Yes, it works well for me (Mountain Lion), even following the steps you outlined.
During your test, did you verify if /private/var/db/.AccessibilityAPIEnabled was appearing/disappearing? If you try it again, after unchecking the box verify via terminal if /private/var/db/.AccessibilityAPIEnabled is still there. If it is, the box will probably still be checked.
Bear in mind that as sudo touch /private/var/db/.AccessibilityAPIEnabled works to check the box, sudo rm /private/var/db/.AccessibilityAPIEnabled also works to uncheck it.
sudo rm /private/var/db/.AccessibilityAPIEnabled
On the other hand, you seem to have the reverse problem (could it have something to do with how you activated it the first time? It seems unlikely to me, but I started doing this on a clean install, if I recall correctly). Still, it may be worth another try, as I can confirm it works for me.