Dan, I try to avoid scripting, so the saved text file doesn't need manipulating first.
A user must be able to save the grab, open the AE project and render the result.
Changing a grab into legal JavaScript is too much of a danger: it has to be done every week by several users.