Open Bug 59335 Opened 19 years ago Updated 11 years ago

Macros such as in Microsoft Outlook for MailNews (and rest of Mozilla)


(MailNews Core :: Filters, enhancement)

Not set


(Not tracked)


(Reporter: netdragon, Unassigned)


(Blocks 2 open bugs)


Macro scripting should be added as a new component of Mozilla/(MailNews?)- not 
under Filters. It should be possible to use for mail or newsgroups, access 
browser windows, etc. For an example of this in action, try Microsoft Outlook 
(not express), Mirc, or any other program that allows macros. This should come 
with a simple IDE that allows users to write their macros using 
Tools>Macros>Setup (Of course accessable from all of Mozilla). Using macros, 
users can move messages from one folder to another, read from, and write to disk 
files, etc. I do not know if files can be read with javascript, but I believe 
that your extensions allow for that. Of course, these macros would have more 
access to the computer than, say, javascript in a web page. One thing is that 
the computer needs to be protected from Macro viruses (like Melissa - I think). 
Therefore, there should be security to protect the user - ie javascript cannot 
install macros.

Macros should be called from filters or be called explicitly by the end user by 
the menu option Tools>Macros>Run. They could also be set to go off at certain 
times (through filters) of the day or after specified periods or when MailNews 
starts, etc (From Filters).

A macro should have a main function. Usually, it doesn't have to return anything 
- unless, for instance, it is part of a filter.

The DOM should be accessed as in normal javascript. The way Outlook does it is 
really stupid.

When you save a macro - it is placed into the innards of mozilla.
I added who is CC'ed on my other bug 
that I deleted. Hope you don't mind.
I added who is CC'ed on my other bug 
that I deleted. Hope you don't mind.
Blocks: 59339
Blocks: 59341
Marked some dependencies for this bug.
*** Bug 59333 has been marked as a duplicate of this bug. ***
As clarification a macro used in this context is:

A special purpose control language that is written by the user of the program, 
stored by the program in a list of macros, and is not compiled. Macros (in this 
context) have been around longer than javascript. I remember writing macros for 
a Word processor in the 80s that performed a set of actions (entering a specific 
set of characters). Macros have evolved in that sense to be interpreted 
languages that can perform disk actions, etc, etc. A macro is not javascript and 
javascript are not macros. Macros can be written in javascript if that is the 
programs macro language. The difference between using javascript to write 
Mozilla components and a macro is that a macro is written by the end user, 
stored in a list of macros (probably in a set of data files) and doesn't have to 
be hacked into the code - as it is only called by the user (or a filter). To 
write a macro, a user would only have to know javascript, and perhaps some 
extensions that allow disk access. Macros for Mozilla could have been easily 
made to be perl, VBscript, etc. I just think javascript would be the best 
language for macros.
Macro handlers should not be written in a way to limit it to javascript. In the 
future, maybe perl macros and others could be allowed.
we are so far away from having any other language from JS I really don't think
this is an issue!
Ever confirmed: true
reassign all search/filter UI bugs to gayatrib, part 2
Assignee: alecf → gayatrib
Alec: The macros should be written in JS
Blocks: 66425
reassigning to naving
Assignee: gayatrib → naving
It would be nice to have a macro record feature that will record mouse and key
input and produce a macro file that can be used to repeat the tasks from the
'personal toolbar' or scheduled. e.g. Crontab:
* 1 * * * * /usr/local/mozilla/mozilla /home/csl/getnews.mozmac
BTW Macro virus attacks can be exluded avoiding to interprete the text of
messages or attachments (there is no reason to (macro)interprete anything in a
message unless you will remotely control processes running on *your* destination
computer ;-)).
I suggest to leave to the user the ability to select the programming (macroing)
language to use, giving him the chance to make whatever he wants with the message.
There is no reason to constrict the user to learn something he doesn't want to.

A bunch of basic features (e.g. the most used filter actions) should be there
for regular users and a common interface to run apps pipeing data/control should
be present to give flexibility to power users. 
Blocks: 11037
mass re-assign.
Assignee: naving → sspitzer
Product: MailNews → Core
Related to Bug 11037 ?
Although coding JS function to manipulate the mail folders/windows/etc. is not that much fun, documentation is lacking, spaghetti-ness abounds etc. - what is preventing people from writing such 'macros'? Write a trivial extension which adds a button on some menu for running whatever JS code you like. Or is this a complaint about the fact that there's no default UI for writing an execuding various JS functions?
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Filter on "Nobody_NScomTLD_20080620"
QA Contact: esther → filters
Product: Core → MailNews Core
Priority: P3 → --
Summary: [RFE] Macros such as in Microsoft Outlook for MailNews (and rest of Mozilla) → Macros such as in Microsoft Outlook for MailNews (and rest of Mozilla)
I suggest marking this WONTFIX.
You need to log in before you can comment on or make changes to this bug.