issue #2244:Modify ScriptData struct and functions related with sendEvent