Topic RSS
3:41 am
Hi, thanks for this great extension! I set up a filter which lauches a bat file which pipes it to a python script. This works great, but I have to run it for every match in a folder.
For example, I would like to run the bat with ervery mail which matches a specific topic. Lets say I would like to match all emails from ebay – do some regex and save the end-date of the auction to my (Google) calendar. Running it for every mail that comes in is cool, but processing (all) already received mails (at least as an option) would be also great. Is there a way to do it?
bye bye
Andreas
We are somewhat limited by the way that filters are applied in the core code. Although the calls to perform a custom action are given a list of messages rather than a single message, in most cases in core the call to actions is actually made one message at a time. But there is an exception, and that is in the new "after classification" context (or the closely-related cases where filters are applied manually).
There is also a difference in the FiltaQuilla Run and Launch actions. Launch is called once per batch, Run is called per message. So I think (but have not tested) that if you try to apply the Launch command with the "after classification" context, it will only get called once per batch.
But there is no way to get any information about the message to the external program in Launch at the moment. But if you are a programmer, you could perhaps look at the implementation of Launch and Run in the extension code, and adapt it for your needs.
6:02 pm
Thanks for the reply, I played a litte bit with your code (I never did any Mozilla development before). I found two ways to achive my goal :)
1) when I pull up the for-loop which loops over the messages to the top of self.runFile it will create a new process for every message – my *.bat File gets called with the updated parameters and does what I want. But creating a new process for ervery message "feels" wrong…
2) If I set the "blocking" in theProcess.run(); to true, it calls the batch file for every message with the updated params after the previous process finished. I think I will use this way and add a new Filter Methode "Run File (blocking)" to the Extension.
thanks again,
Andreas
Most Users Ever Online: 18
Currently Online:
9 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Member Stats:
Guest Posters: 130
Members: 565
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 7
Topics: 231
Posts: 802
Newest Members: Matteo, p.dobrogost, gaute, Mythobeast, terry, Livraria Notre Dame
Moderators: rkent (323)
Administrators: rkent (323)
Log In
Register
Members
Home
Add Reply
Add Topic
Quote
Offline

Recent Comments