General
: K-Meleon Forum
General discussion about K-Meleon.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] @ caktus and rodocop [quote=caktus] I tried this in K-Meleon Twin+'s K-Meleon-1.7\macros folder and it locked me into the 1.7 browser with no way to open the 1.6 browser except to remove this macro. I am using XP Home, could this be the problem? [/quote] I have a method to return a page from 1.7 to 1.6 when closing 1.7 window. It is not the most elegant code and someone may be able to come up with another method. I don't think you wish to reverse my KM17n code because that would start another copy of 1.6 and pretty soon you would have too many KM versions running. My method uses a macro and a script file in the USERMACRO folder in version 1.7 and a macro in the USERMACRO folder in version 1.6. For KM 1.7 the menu item is in the FILE EXIT area. Rodocop, please feel free to build on or change as you wish. These files for KM 1.7 usermacro folder: [b]ReturnPage16.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2) # ---------- ReturnPage16.kmm ----------------------------------------------------------- # # Dependencies : main.kmm, Restart.kmm (for menu location) # Resources : - K-Meleon Twin # Preferences : - # Author and date JamesD 2012-11-13 # Version : 0.3 # ---------------------------------------------------------------------------------- _ReturnPage16_Action{ macroinfo=_("Exit K-Meleon 1.7 and show current page in K-Meleon 1.6"); exec("wscript.exe \"".$_ReturnPage16_Path."\" \"".$URL."\"") ; $_ReturnPage16_txt1 = "When the K-Meleon version 1.6 shows after \n " ; $_ReturnPage16_txt2 = "1.7 has closed, right-click the Reload \n" ; $_ReturnPage16_txt3 = "button and choose \"Reload from 1.7\" " ; alert($_ReturnPage16_txt1.$_ReturnPage16_txt2.$_ReturnPage16_txt3, "Important", INF # close 1.7 id(ID_APP_EXIT); } _ReturnPage16_GetPath{ $_ReturnPage16_Path=getfolder(UserMacroFolder)."\\ReturnPage16.js"; } _ReturnPage16_BuildMenu{ # file menu setmenu("CloseWindow",macro,"Exit page to KM 1.6",_ReturnPage16_Action,2); } # ----------------------------------------------------------------------------------- $OnStartup=$OnStartup."_ReturnPage16_GetPath;"; $OnInit=$OnInit."_ReturnPage16_BuildMenu;"; $macroModules=$macroModules."ReturnPage16;"; [/code] [b]ReturnPage16.js[/b] [code] /* ReturnPage16.js by JamesD, version .03 2012-11-13 This script is a helper application for the K-Meleon Macro Module ReturnPage16.kmm that enables you to reload a page from 1.7 into 1.6 when exiting from 1.7 in K-Meleon Twin. Windows Script Host 1.0 (or better) required! */ if(WScript.Arguments.count()==1) { var WshShell = new ActiveXObject("WScript.Shell") WshShell.RegWrite ("HKCU\\Software\\KMELEON\\Twin\\ReturnPage16", WScript.Arguments(0), "REG_SZ"); } else { objArgs = WScript.Arguments ; WScript.Echo(WScript.Arguments.Count()); for (i=0; i<objArgs.length; i++) { WScript.Echo(objArgs(i)) } } [/code] This file for KM 1.6 usermacro folder: [b]CatchPage17.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2) # ---------- CatchPage17.kmm ----------------------------------------------------------- # # Dependencies : main.kmm, # Resources : - K-Meleon Twin # Preferences : - # Author and date JamesD 2012-11-13 # Version : 0.3 # ---------------------------------------------------------------------------------- _CatchPage17_Open { $_CatchPage17_url = readreg("HKCU","Software\\KMELEON\\Twin\\ReturnPage16"); open($_CatchPage17_url); } _CatchPage17_BuildMenu { setmenu("Reloa&ding", macro,"Reload from 1.7",_CatchPage17_Open); } # ------------------------------------------------------------------------ $OnInit=$OnInit."_CatchPage17_BuildMenu;"; $macroModules=$macroModules."CatchPage17;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development