I keep bumping into situations where a small syntax error causes FM to freeze, like there is a modal dialog open except there is no dialog. For example:
doc = app.ActiveDoc();
...this is wrong because of the parenthesis, but rather than throwing any errors, FM just freezes and I can't get it unfrozen, except to kill it with the Task Manager. Is there a way to prevent this freeze or at least thaw it out? It's becoming tiresome to restart FM and reset locks, etc. with every little typo.
I think this won't help you, but I can reproduce this with app.ActiveDoc() and app.ActiveBook().
With other properties I get a correct runtime error "app.AutoBackup() is not a function".
So generally it works as expected, but not in these two cases.
I think this is a problem of the script engine in these two cases. Perhaps there's an invisible (private) method defined, which is used internally, I don't know.
Markus, thanks. I guess the answer is that there is no answer, other than to get a little bit smarter. I get freezes with other actions, especially when (inadvertently) using invalid objects for various things.
Patient: "It hurts when I do this..."
Doctor: "Don't do that."
Europe, Middle East and Africa