provide the code and someone could perhaps tell you.
Is only this:
var myMenu = app.menuActions.item('Verificar ortografia...');
My Indesign is in portuguese, so "Verificar ortografia..." is the "Check Spelling..." menu.
The locale-independent way to invoke the check spelling menu action is:
var myMenuAction = app.menuActions.item("$ID/Check Spelling..."); myMenuAction.invoke();
Now, as a result, this action opens a (native) non-modal dialog. I don't think you can control it from a script.
Really? So sad...
Because when I close the active document, this window stay opened... is bored but is not the end of the world I can close by myself.
Thank you for your attention!
Oh. That can be changed if you reset your current workspace.
Sorry. Did not test this before. Resetting the current workspace does not help.