Hi morat, thank you very much, everything works very well! I found that instead of "goDoCommand("cmd_editAsNew");" the command "goDoCommand("cmd_editDraftMsg");" is better for my goal, in this way Thunderbird overwrites info on the same message, without creating a lot of new messages with same Subject.
Thanks to your replies, Thunderbird programming has become an interesting thing for me and if it's not too much trouble for you (feel free to reply, I'm using you a little too much
) I'd like to ask you other two things (sorry):
1. Where user can find some documentation (official or unofficial) about how to learn to automate something in Thunderbird by using JS language? For example, how can I know the command for "Mark As Unread" in JS? So, where can user find a table of JS commands for common operations in Thunderbird (like Forward, Forward As, etc...)?
2. About your last code for easily opening a draft message for edit (for me it is a memo message that I modify several times in a day), it works perfectly; I ask you if it is possible to modify your script in order to open the draft message but without changing the current displayed window: I mean, if I'm in Calendar window and I'm editing an event by writing something in the "New Event" window, can I open my draft message "memo" with keyboard shortcut without Thunderbird changing the displayed windows (ie opening the draft message in the background)? For now, when I open my draft message, Thunderbird switches from the current window (for example a new event in Calendar) to the draft message window; but mine is an extra non-fundamental request, I'm just curious to know if it's possible with programming.
Many thanks for your time!
Regards