Macro open selected text as URL in new tab
Posted by: baysao
Date: May 11, 2008 05:21PM

In main.kmm, there is function "Open as URL" selected text in focus windows(tab). Sometime i want to open this text in other tab. So i wrote this macro .
Hoping useful.
Quote

# Macro name: OpenAsURLInNew.kmm
# Author: Thanh Vu(baysao@gmail.com)
# Macro help open selected text in new tab
# Macro depend macro main.kmm

Open_TextAsURLInNew{
$OpenURL=$SelectedText; $OpenURL==""?0:opentab($OpenURL);
}

# - PRIVATE
_OpenAsURLInNew_BuildMenu{
setmenu(Selection,macro,"Open As URL in &New",Open_TextAsURLInNew);
}

$OnInit=$OnInit."_OpenAsURLInNew_BuildMenu;";


Re: Macro open selected text as URL in new tab
Posted by: JujuLand
Date: May 11, 2008 07:38PM

ok, but you must add this line at the end of your macro to allow K-Meleon to manage macros.

# ------------------------------------------------------------------------
$macroModules=$macroModules."OpenAsURLInNew;";

if obviously your kmm is named OpenAsURLInNew.kmm

A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:24.0) Gecko/20140105 Ubuntu/12.04 K-Meleon/74.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr




Re: Macro open selected text as URL in new tab
Posted by: desga2
Date: May 11, 2008 08:12PM

Coded added to MacroLibrary.

Thanks for shared coded.

- EDITED: 19/07/2008

Updated to work with 1.1.X and 1.5 versions and added new position in context menus.

K-Meleon in Spanish



Edited 1 time(s). Last edit at 07/19/2008 09:47PM by desga2.

K-Meleon forum is powered by Phorum.