help with context menus
Posted by: burt
Date: November 15, 2011 10:04PM


I managed to design a right click context menu addition to IE, where I can highlight a phone number (i.e. text) on a webpage and choose "PHONE" which copies the phone number to the clipboard and then executes phone dialer and pastes the phone number into the dialer's window, then hits dial button, which makes the call.

It required creating 2 "hidden" html documents, one whose title appeared in the right click menu, which copied the highlighted phone number to the clipboard and then "opened" the second html document

<script language="javascript"type="text/javascript">
{var SelectedText =window.external.menuArguments.document.selection.createRange().text;
var wsh = new ActiveXObject('WScript.Shell');
wsh.SendKeys ("{TAB}");
wsh.SendKeys ("{ENTER}");

The second html document, executed the dialer program and then pasted the clipboard to it and hit the dial button, all using SendKeys.

<script language="javascript"type="text/javascript">
var wsh = new ActiveXObject('WScript.Shell');
setTimeout("wsh.Sendkeys ('^V')",250);
setTimeout("wsh.Sendkeys ('{ENTER}')",260);
setTimeout("wsh.Sendkeys ('%{F4}')",8500);
setTimeout("wsh.Sendkeys ('%{F4}')",8600);
setTimeout("wsh.Sendkeys ('%{F4}')",8800);

I have no idea how to do this in K-meleon.

Adding to context menus in IE involves adding to the folder "MenuExt" in the registery. How do I add to the right click context menus in K-meleon?

Any help would be greatly appreciated.

Thank you

Re: help with context menus
Posted by: JamesD
Date: November 16, 2011 12:40AM

This will show how to add an item to a context menu. It is not fully automatic. There is a MacroLanguage for K-Meleon. See this: There is also a list of command ID's. See this:

There may be an extension which will do what you need. Check this:

You can execute "wscript.exe" from a macro and pass command line arguments to it. I did not go that far yet. In this little demo I just allow the user to highlight the phone number and right click to open Dialer.exe. You still have to paste the number and click "dial".

In your profile there is a folder named "macros". Copy the following code (different font) and put it into Notepad and give the filename that is in bold type. Be careful to select all files instead of text when saving from Notepad so the file extension will be kmm instead of txt.

You can find the path to your profile folder by using EDIT - CONFIGURATION - PROFILE DIRECTORY. After you put the macro named "DialOut.kmm" into your profile, restart KM, highlight a phone number, and right click.


#  K-Meleon Macros (
# ---------- DialOut.kmm
# ---------- K-Meleon Macro Language   ---------------
# Dependencies        : - main.kmm, Dialer.exe
# Resources           : - 
# Preferences         : - 
# Version             : - 0.1   2011_11_15
# --------------------------------------------------------------------------------

_DialOut_GSelect {
macroinfo = _("Copy selected text to clipboard for entering to Dialer.exe.");
exec("Dialer.exe") ;

_DialOut_ModMenu {
setmenu("SelectedText",macro,_("Send to DialOut"),"_DialOut_GSelect",-1);

# - - - - - - - - - - - - - - - - - - - - - - 


K-Meleon forum is powered by Phorum.