How to get a link to TScriptForm in Delphi at the runtime

Have you set ScriptFormClass property to make sure that all script forms created by scripter are of type TApplicationForm?

IDEScripter1.ScriptFormClass := TApplicationForm;

Reference: How to init ScripterForm from native-delphi code