The script is probably crashing - check out your app event log for any crash messages ... the probable reason is in the way the script gets copy-pasted - sometimes the "embedded icon" strings can get messed up and the graphics routines can be a little fussy ...

First step - let us know if indeed the script is crashing.