According to the AppleScript Overview which was freshly revised for Leopard, the AppleScript Utility is scriptable and now lets you enable GUI Scripting. I think this means — although I haven’t confirmed it personally yet — that this is the first scriptable way to enable GUI Scripting.
I’ve spent a small amount of time trying to enable it other ways in the past — including the use of the `defaults` tool — and been stymied. I’m not sure when the last time I tried was, or which version of Mac OS X. Nonetheless, a scriptable way to enable GUI Scripting is welcome.
Despite my concerns that GUI Scripting could be a source of security problems — from the perspective of a social engineering attack — there are already many other potential ways to script or automate applications for social engineering mischief. On the plus side, systems administrators and others who need GUI Scripting on or off, even for just a short time, should have an easier time enabling or disabling it on computers thanks to this change.