Forum

Share

Please consider registering
guest

Log In RegisterMembers
Or log in with

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Feature request: Ability to display a notification window requiring OK to acknowledge
November 13, 2010
2:51 pm
Member
Forum Posts: 6
Member Since:
November 13, 2010
Offline

Hello,

 

There are some messages that I'd like to be able to give extra special attention to, like faxes I might receive as an email attachment. I'd like to be able to add a filter action to show me a window that says something like, "Filter name 'Fax Detection' has just processed a message with the subject 'Fax received from (555) 555-1212' and an email date of 11/13/2010 from email address faxserver@work.com" Then, it should have an OK button to force me to see it and acknowledge it.

Share
November 13, 2010
3:46 pm
Admin
Forum Posts: 323
Member Since:
July 12, 2008
Offline

What you want to do is pretty easy with a javascript custom filter. As an example, the following javascript custom action will output an alert with the message subject:

 

for (let index = 0; index < msgHdrs.length; index++)
{
  let hdr = msgHdrs.queryElementAt(index, Ci.nsIMsgDBHdr);
 alert('subject is ' + hdr.subject);
}

(Based on the sample at http://mesquilla.com/extension……taquilla/)

Share
November 14, 2010
8:19 am
Member
Forum Posts: 6
Member Since:
November 13, 2010
Offline

Thanks for this! I don't know javascript so I wouldn't have known where to start. I've added it.

 

I didn't have "Javascript Action" checked in the FiltaQuilla preferences. Once I checked it, I had to restart Thunderbird before it would appear as an option under "Perform these actions." Is this working correctly — that I just need to remember to restart TB if I make a change to the FiltaQuilla preferences? (Which I can do — just wanted to mention it in case this wasn't by design.)

Share
November 14, 2010
1:11 pm
Admin
Forum Posts: 323
Member Since:
July 12, 2008
Offline

It is by design (which means I was too lazy to make it work correctly and not need a restart).

Share
November 14, 2010
1:19 pm
Member
Forum Posts: 6
Member Since:
November 13, 2010
Offline

OK, I can live with that. :D Could you add a message to the preference window that warns users they'll need to restart TB if they make changes? Or, is there a way you can automatically show a TB restart button (like the one that appears after you install an extension)?

Share
November 14, 2010
1:45 pm
Admin
Forum Posts: 323
Member Since:
July 12, 2008
Offline

The window where you modify available preferences alread says "restart after changes" at the top.

Share
November 16, 2010
10:13 pm
Member
Forum Posts: 6
Member Since:
November 13, 2010
Offline

rkent said:

The window where you modify available preferences alread says "restart after changes" at the top.


 

Doh! Doh! Of course it does! Sheesh, I've got to stop mixing cola brands when I'm trying out new TB extensions. :D

 

I've been putting the javascript to good use, and although it does exactly what I asked for, I've discovered that when the alert window pops up, all rule processing stops until I click on OK. I have TB running all the time applying different filters, so when I'm away at work and one of the alerts pops up, I'm not there to click on OK. I still =need= it to stop and wait for me to acknowledge the alert, though.

 

Is it possible to:

 

1) Have javascript spawn a new process/task/something, that would handoff the alert job to it, and the rule processing would be able to continue along.

 

or

 

2) Have javascript do something like the infamous netcat tool that allows simple communication to a listening server and port. This would sort of allow what #1 above suggests, as netcat can be told to send out a text message and not wait for a reply. I already have a Mac set up to listen to such messages (it's called ncid, http://ncid.sourceforge.net/).

Share
November 19, 2010
3:19 pm
Admin
Forum Posts: 323
Member Since:
July 12, 2008
Offline

Yes, you could call the alert from a setTimeout, which would then allow processing to continue. So whatever you are calling (which I will say is "alert('The Message');" then you would wrap it like this:

setTimeout ("alert('The Message')", 0);

If the value of The Message changes, then you will need to contruct the text for the message as a string.

Share
Forum Timezone: UTC -8

Most Users Ever Online: 18

Currently Online:
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

bobkatz: 8

BigMike: 8

t2m: 7

zabolyx: 7

taa: 6

onlyme: 6

Member Stats:

Guest Posters: 130

Members: 565

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 7

Topics: 231

Posts: 802

Moderators: rkent (323)

Administrators: rkent (323)