# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- CloneTab.kmm # # Dependencies : main.kmm # Resources : - # Preferences : - # Version : 0.1 2/17/09 JamesD # -------------------------------------------------------------------------------- _CloneTab_Focus{ opentab( $URL ); } _CloneTab_BkGnd{ openbgtab( $URL ); } _CloneTab_BuildMenu{ # add another option to NavTab menu setmenu("NavTab",macro,"Clone Tab w/focus",_CloneTab_Focus,4); setmenu("NavTab",macro,"Clone Tab in bkgnd",_CloneTab_BkGnd,5); } $OnInit=$OnInit."_CloneTab_BuildMenu;"; $macroModules=$macroModules."CloneTab;";
Quote
guenther
welcher Browser macht, was du gewohnt bist?
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- CloneTab.kmm # # Dependencies : main.kmm # Resources : - # Preferences : - # Version : 0.1 2/17/09 JamesD # -------------------------------------------------------------------------------- _CloneTab_Focus{ opentab( $URL ); } _CloneTab_BkGnd{ openbgtab( $URL ); } _CloneTab_BuildMenu{ # add another option to NavTab menu setmenu("NavTab",macro,"Clone Tab w/focus",_CloneTab_Focus,4); setmenu("NavTab",macro,"Clone Tab in bkgnd",_CloneTab_BkGnd,5); # To use middle click to clone current tab: setaccel("MButton","macros(_CloneTab_BkGnd)"); setaccel("CTRL MButton","macros(_CloneTab_Focus)"); } $OnInit=$OnInit."_CloneTab_BuildMenu;"; $macroModules=$macroModules."CloneTab;";
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- DuplicateTab.kmm ---------------------------------------------------- # Dependencies : main.kmm # Resources : - # Preferences : - # Version : 0.1 2009-2-18 DannyD # -------------------------------------------------------------------------------- _DuplicateTab_Focus{ opentab( $URL ); } _DuplicateTab_Init{ setaccel("MButton","_DuplicateTab_Focus"); } $OnInit=$OnInit."_DuplicateTab_Init;"; $macroModules=$macroModules."DuplicateTab;";
setaccel("MButton","_DuplicateTab_Focus");
setaccel("MButton","macros(_DuplicateTab_Focus)");
Quote
JamesD
Maybe I am having another senior moment, but I think you have to remove the underscore from the macro name to use it in setaccel.
setaccel("MButton","macros(_DuplicateTab_Focus)");
should be
setaccel("MButton","macros(DuplicateTab_Focus)");
and corresponding change in
DuplicateTab_Focus{
That's the way I tried it, but it still did not work.
Quote
DannyD
Attention, you might be fooled if you have "kmeleon.tabs.OnMiddleClick=1" and "kmeleon.display.newWindowOpenAs=2" configured. But instead of duplicating the tab which you have clicked on, it duplicates the current page.
Try middle-clicking on a tab in the background, you will see what I mean.
You are right. I did not know that a private macro could be called with setaccel statement.Quote
desga2
No, underscore isn't the problem.
1) Problem is Preferences setting override the macro accelerators settings.
Try to use other accelerator like "CTRL MButton" or "ALT MButton".
2) With a macro you can't clone tabs in background, only tab in foreground. (This needed toolbar plugin implementation to mouse behavior in tab bar and created a new macro function to know what tab was clicked)
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- CloneTab.kmm # # Dependencies : main.kmm # Resources : - # Preferences : - # Version : 0.2 2/19/09 JamesD # -------------------------------------------------------------------------------- _CloneTab_Focus{ opentab( $URL ); } _CloneTab_BkGnd{ openbgtab( $URL ); } _CloneTab_BuildMenu{ # add another option to NavTab menu setmenu("NavTab",macro,"Clone Tab w/focus",_CloneTab_Focus,4); setmenu("NavTab",macro,"Clone Tab in bkgnd",_CloneTab_BkGnd,5); } _CloneTab_SetAccels{ setaccel("SHIFT MButton", "macros(_CloneTab_Focus)"); setaccel("CTRL MButton", "macros(_CloneTab_BkGnd)"); } $OnInit=$OnInit."_CloneTab_BuildMenu;_CloneTab_SetAccels:"; $macroModules=$macroModules."CloneTab;";
Hm, I observed otherwise: _CloneTab_BuildMenu{} as proposed by JamesD does work on tabs in the background.Quote
desga2
2) With a macro you can't clone tabs in background, only tab in foreground. (This needed toolbar plugin implementation to mouse behavior in tab bar and created a new macro function to know what tab was clicked)
Sorry, what I meant was: Depending on your settings of "kmeleon.tabs.OnMiddleClick" and "kmeleon.display.newWindowOpenAs" it might appear as if the macro is working, while in fact it isn't.Quote
desga2
3)This is his normal use (remember 2).Quote
DannyD
Attention, you might be fooled if you have "kmeleon.tabs.OnMiddleClick=1" and "kmeleon.display.newWindowOpenAs=2" configured. But instead of duplicating the tab which you have clicked on, it duplicates the current page.
And this isn't a bug, is a feature or behavior not implemented yet.
Yes, of course I can. It's just that I don't like Drag&Drop a lot, I like the middle-click which I'm used to. And I thought, "if there is one browser that I can twist as I want it, then it's this one..."Quote
desga2
Please, I said you above that you can use Drag&Drop tabs in free space of toolbar to clone it and this work also with tabs in background.
Not being too familiar with the design principles of K-Meleon I am still uncertain: Is this a bug or intended behaviour?Quote
desga2
1) Problem is Preferences setting override the macro accelerators settings.