--- In [email protected], "Owen Watson" <[EMAIL PROTECTED]> wrote: > > Think Ive worked out what is the problem: it's HookWindowEvents. It's > only a problem when that's running. Here's the HookWindowEvents > script, which doesn't look as though it would provoke anything: > > event = arg(1) > handle = arg(2) > class = arg(3) > caption = arg(4) > if (index (caption,"Composer") > 0) do > if (index (event,"5") > 0) do ;; should be 5 for activate > local vClip=clip.GetHTML > if (index (vClip,"msoNormal") > 0) do ;; > vClip[?"MsoNormal"]="" > local vEndClip=.grepText(vClip) > clip.SetHTML(vEndClip,vText,1,0) > endif > endif > endif >
What do HookWindowEvents command list and the grepText script look like? I'd be wary of using global variables with the same names as PPro functions as you do above (with caption). Why not use local variables and give them unique names? You could use an args statement. Also, you could get out faster if its not the right window or event. See if this runs any better: args whevent whhandle whclass whcaption if (not (index(whcaption, "Composer")>0) or not(whevent==5)) quit local vClip=clip.GetHTML if (index (vClip,"msoNormal") > 0) do regex.pcreReplace(?"MsoNormal", vClip, "") local vEndClip=.grepText(vClip) clip.SetHTML(vEndClip,vText,1,0) endif quit Regards, Sheri
