MozillaZine

keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
firefoxuse
 
Posts: 981
Joined: November 8th, 2011, 12:06 pm

Post Posted April 8th, 2017, 3:03 pm

nohamelin wrote:@firefoxuse
They are a bunch of code requests, without providing a single clue if you at least took some time to check older pages in this thread to find something similar. The bigger the request, the greater the patience you need to wait for someone who can take that task for you.


I cannot check 258 older pages!!!

malliz
Folder@Home

User avatar
 
Posts: 42926
Joined: December 7th, 2002, 4:34 am
Location: Aus

Post Posted April 8th, 2017, 3:09 pm

Tried the search this topic box?
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"

firefoxuse
 
Posts: 981
Joined: November 8th, 2011, 12:06 pm

Post Posted April 8th, 2017, 4:20 pm

malliz wrote:Tried the search this topic box?


yes it didn't work

there should be a list with the common functions, the developer should consider that

malliz
Folder@Home

User avatar
 
Posts: 42926
Joined: December 7th, 2002, 4:34 am
Location: Aus

Post Posted April 8th, 2017, 4:52 pm

What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"

firefoxuse
 
Posts: 981
Joined: November 8th, 2011, 12:06 pm

Post Posted April 8th, 2017, 5:00 pm

malliz wrote:http://mozilla.dorando.at/keyconfig/examples.html


well that seems to help, but only a bit

I don't know what coding language is that and if there is a reference so that I can script my own commands!

deltaa
New Member
 
Posts: 1
Joined: April 16th, 2017, 12:26 pm

Post Posted April 16th, 2017, 12:32 pm

Hi i am getting stuck in writing a script that should forward a selected email inline with attachments to a dedicated recipient defined in the script.
The email should not be send automaticially, but i want to add a predefined text "Hello, please check this email" by the script and manually press the "send" button.
Any ideas how to to this?
best reagrds alex

morat
 
Posts: 2201
Joined: February 3rd, 2009, 6:29 pm

Post Posted April 17th, 2017, 3:42 pm

@deltaa

Try this:

Code: Select all
// forward inline, add recipient, insert text
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
  getService(Components.interfaces.nsIWindowMediator);
var msgHdr = gFolderDisplay.selectedMessage;
var listener = {
  onWindowTitleChange: function () {},
  onCloseWindow: function () {},
  onOpenWindow: function (aWindow) {
    wm.removeListener(this);
    this.compose = aWindow.docShell.
      QueryInterface(Components.interfaces.nsIInterfaceRequestor).
      getInterface(Components.interfaces.nsIDOMWindow);
    this.compose.addEventListener("compose-window-init", this, true);
  },
  handleEvent: function (event) {
    event.currentTarget.removeEventListener(event.type, this, true);
    event.currentTarget.gMsgCompose.RegisterStateListener(listener);
  },
  NotifyComposeFieldsReady: function () {},
  NotifyComposeBodyReady: function () {
    this.compose.gMsgCompose.UnregisterStateListener(this);
    this.compose.window.setTimeout(function () {
      this.AddRecipient("addr_to", "foo bar <test@invalid.com>");
      this.awDeleteRow(this.awGetMaxRecipients());
      this.GetCurrentEditor().insertText("Abracadabra.");
    }, 0);
  }
}
wm.addListener(listener);
MsgForwardAsInline(null);

Similar post: viewtopic.php?p=14725693#p14725693

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 1 guest