Hi Michael,
Re:
> there is a different type of startup script used for batch processing
Good to know, but I don't see how I could use that in this case. I need the startup script to run when I just click on a file in macOS Finder that I've set to open with MoI. I guess that the instance of MoI launched by the OS could run a script from the startup folder that uses shellExecute to run that kind of script, but that seems like it would cause many instances of MoI to start since each would see the script in the startup folder and I'd still have the problem of getting the first one to exit.
Re:
> Does it happen for you if the script just consists only of: moi.exit( true );
Yes if there's another script present in the startup folder that replaces some innerHTML with something involving a command button that includes onclick like this:
code:
var CommandBarFlex = moi.ui.findElement('CommandBarFlex');
CommandBarFlex.innerHTML = '<moi:CommandButton onclick=""></moi:CommandButton>';
but moi.exit() in the first script works fine if the second script only inserts stuff involving command and not onclick like this:
code:
var CommandBarFlex = moi.ui.findElement('CommandBarFlex');
CommandBarFlex.innerHTML = '<moi:CommandButton command=""></moi:CommandButton>';
One puzzling thing is that the freeze occurs regardless of the filenames involved. I thought that startup scripts get executed in alphabetical order, but if the exit script has a name starting with a letter in the middle of the alphabet (like startupScript.js) then it doesn't matter whether the name of the onclick script is a.js or z.js a freeze still occurs. I expected that MoI would exit as soon as startupScript.js runs and z.js would never be reached.
- Peer
|