--- In [email protected], "Sheri" <sheri...@...> wrote:
> If you ran it as posted, it has a "quit" before the BeginEditCollection. If I > remove it, I get an error on the invoke. Oh, darn. Sorry. Okay, so BeginEditCollection just seems broken. OTOH Freeze and UnFreeze work fine. > 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. In theory GetAccessibleObjectFromWindow or whatever api is called should work on out-of-process process controls: that;s what it's meant to be used for, I think. I need to test to see if I can get an IAccessible from anything at all. > 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. Neat, if it works.
