Improvement requests
: K-Meleon Forum
Use this forum to talk about a feature you're missing. Use the bug tracker to report it if necessary.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] Sorry, my fault. I did not read all the page. I have done a quick fix to the macro. Try this one. I hope I have it right. The right click menu should now have a "Save shortcut to desktop" item. Both files, the kmm and the js should go in the "macros" folder of your profile. The first letter, S, of each file should be in caps. [b]Shortcut.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2) # File name: Shortcut.kmm # ---------- Send shortcuts to desktop ---- # # Dependencies : Shortcut.kmm # Resources : - # Preferences : - # -------------------------------------------------------------------------------- # Send URLs to Windows desktop as Internet Shortcut _PageToDesktop { $TITLE==$URL?$u="":$u=gsub("\"","'",$TITLE); exec("wscript.exe \"".$_Shortcut_Path."Shortcut.js\" \"".$URL."\" \"".$u."\""); } LinkToDesktop { $macro="LnkToDesktop"; &JSEnable; } _FrameToDesktop { $macro="FrmToDesktop"; &JSEnable; } LnkToDesktop { $TITLE==$URL?$t="":$t=$TITLE; open("javascript:function chkLnk(e){var t='".$LinkURL."',l=e.document.links;for(var j=0;j<l.length;j++)if(l[j].href==t){top.document.title=(l[j].text==l[j].innerHTML)?l[j].text:'';break;}}function chkFrm(e){var f=e.frames;for(var j=0;j<f.length;j++)chkFrm(f[j]);chkLnk(e);}void(chkFrm(top));"); $TITLE==$URL?$u="":$u=gsub("\"","'",$TITLE); open("javascript:(function(){top.document.title='".$t."';})();"); exec("wscript.exe \"".$_Shortcut_Path."Shortcut.js\" \"".$LinkURL."\" \"".$u."\""); } FrmToDesktop { $TITLE==$URL?$t="":$t=$TITLE; open("javascript:function chkTtl(e){if(unescape(e.document.location.href)==unescape('".$FrameURL."'))top.document.title=e.document.title;}function chkFrm(e){var f=e.frames;for(var j=0;j<f.length;j++)chkTtl(f[j]);chkTtl(e);}void(chkFrm(top));"); $TITLE==$URL?$u="":$u=gsub("\"","'",$TITLE); open("javascript:(function(){top.document.title='".$t."';})();"); exec("wscript.exe \"".$_Shortcut_Path."Shortcut.js\" \"".$FrameURL."\" \"".$u."\""); } _Shortcut_BuildMenu { setmenu("Document",macro,"Save shortcut to desktop",_PageToDesktop,-1); setmenu("FrameSave",macro,"Save shortcut to desktop",_FrameToDesktop,-1); } _Shortcut_GetPath { $__Data=readfile(getfolder(MacroFolder)."\\Shortcut.kmm"); $_Shortcut_Path=getfolder($__Data==""?UserMacroFolder:MacroFolder) . "\\"; } # The file "Shortcut.js" must be located within your profile directory (where this file resides) ! #--------------------------------------------- $OnStartup=$OnStartup."_Shortcut_GetPath;"; $OnInit=$OnInit."_Shortcut_BuildMenu;"; $macroModules=$macroModules."Shortcut;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development