MainForm handle

Hi,


In script standart call:
...
MainForm := TForm2.Create(Application);  
MainForm.Show;


how to get a handle of MainForm from script ?

You can use ScriptInfo.Globals to iterate through the global variables of a script and get their value. If MainForm is a global variable, you can do that.

Or you can just change the script to set the MainForm to a Delphi variable and read that Delphi variable directly.