[MacEd] Newbe and macro for thunderbird

Andrea M. acme at email.it
Wed Dec 17 11:32:57 EST 2003


Biju G C ha scritto:

>  --- "Andrea M." <acme at email.it> wrote: 
> 
>>Hi Biju, thanks a lot for your *very* useful example, starting from this 
>>I wrote this macro:

[snip]

> I modified it. to check word Command approve, reject etc.
> to find the line 
> 
> and here it is

Thanks a lot, this is a BIG improvement, now I'm trying to complete it 
starting from the preview panel, so I start the macro from
MsgReplyMessage();
and then i paste the code below, but it doesn't work.
If I write a macro with only MsgReplyMessage(); then I run your code it 
works fine, like I press the reply button then run the macro.

> //=========== Approve Macro Begin ==========
> var contentFrame = document.getElementById("content-frame");
> var contentDoc = contentFrame.contentWindow._content.document;
> var a = contentDoc.body.textContent ;
> a=a.split('\n');
> var i;
> for (i = 0 ; i < a.length;i++)
> {
>  if(a[i].search(/Command.*approve.*\d*/i) != -1)
>  {
>   contentDoc.body.innerHTML=a[i]
>   break;
>  }
>  if (i > 10) break;
> }
> 
> //=========== Approve Macro End ==========

[snip]

Thanks again for your help.
-- 
Ciao, Andrea


More information about the MacroEditor mailing list