--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > comPluginDemoScriptAccessible.powerpro in > http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/ > > as it's last statement invokes BeginEditCollection on an > ITextDocument obtained from a richedit control created by dialog > plugin. It fails on my home machine, but I just tried it on XP, > and seems to work. Does it for you? Dialog requires regex.ico, > which you can get from regex or dialog plug distros.
If you ran it as posted, it has a "quit" before the BeginEditCollection. If I remove it, I get an error on the invoke. I need to test more but the following seems to work at least for the inprocess dialog's richedit. If we could get this to work for out-of-process richedit controls, I think I'd have what I need. run script to set the undo limit to 20: win.sendmessage(g_hwnd_re,EM_SETUNDOLIMIT,20,0) (go type in the control) run script to suspend undo: local com_status static hTom = com.get_accessible_object(g_hwnd_re, "dispatch") local tomSuspend = -9999995 hTom.Undo(tomSuspend) (go type in the control -- perform an undo -- fact that it doesn't undo proves it is suspended) run script to resume undo: local tomResume = -9999994 static hTom hTom.Undo(tomResume) hTom.Release go do an undo in the control, typing done during the suspend is not in the queue. Regards, Sheri
