Is there any way to suppress having a command added to the undo queue?
I'm writing a script that needs to check if fonts are available. I'd like to do this live as the user types the font name (so that a relevant control only enables when the name corresponds to an available font), but the only way I can think of to do this involves adding a comp and a text layer to the project, then changing the layer's font and checking that the change actually took. The problem is this all gets added to the undo queue, and even if I put it in an undo group, if I'm checking this on every onChanging event for an EditText, this still floods the undo queue with dozens of pointless Undo entries.
I tried using
app.executeCommand(app.findMenuCommandId("Undo "+undoGroupName));to remove the undo entries at each step, but this unfortunately causes the EditText to lose focus, which defeats the purpose.
I'm pretty sure there isn't any other way to pop an entry off the undo queue programmatically, but is there any way to avoid pushing entries onto it in the first place?
