I have a miniwindow plugin enabled in my script. It will be loaded each time starting a .MCL script.
The window position is calcuated from the size of main window.
My problem is that the miniwindow can not be located in the specified position.
I find the root cause of the issue is that the main window has not been ready when installing the miniwindow plugin which passed an incorrect window size to the plugin.
I added some debug messages in my plugin install function to proved my guess:
I got the first valuse 791 and the second value 1419, which shows when plugin is installed, the main window has not been completely initialized.
How can I force the plugin install staring after main window is ready?
The window position is calcuated from the size of main window.
My problem is that the miniwindow can not be located in the specified position.
I find the root cause of the issue is that the main window has not been ready when installing the miniwindow plugin which passed an incorrect window size to the plugin.
I added some debug messages in my plugin install function to proved my guess:
function OnPluginInstall ()
Note(GetInfo(281)) -- get windows width
DoAfterSepcial(5, "Note(GetInfo(281))", sendto.script) -- get windows width again after 5 secs
end
I got the first valuse 791 and the second value 1419, which shows when plugin is installed, the main window has not been completely initialized.
How can I force the plugin install staring after main window is ready?