Simple ExtendScript to close all documents hangs
Hi,
FM2019 update 3, Windows 10. Can anyone tell me why this seemingly simple script just hangs?
function closeAllFiles()
{
var doc = app.FirstOpenDoc;
while(doc.ObjectValid())
{
doc.Close(Constants.FF_CLOSE_MODIFIED);
doc = app.FirstOpenDoc;
}
}
When I watch it in the debugger, app.Close() seems to succeed, but app.FirstOpenDoc continues to get new document objects. I don't know where they are coming from. I thought maybe it was the tabbed welcome screen regenerating each time, but the problem persisted when I turned it off.
Russ
