This is just speculation..
Could this have something to do with the :'s in the command? Maybe the code that parses the on OPEN event is running away because there are : within the command on the same line as the on OPEN line (which is delimited by :'s ). Have you tried doing that code with the commands below the event, or maybe with different characters besides the :'s ?
-genius_at_work