Improvement requests :  K-Meleon Web Browser Forum
Use this forum to talk about a feature you're missing. 
send shortcut to desktop
Posted by: froggy
Date: November 29, 2011 12:11AM

I dont see an option (in ver 1.5.3) to "send shortcut to desktop" or equivalent as is an option in IE. Am I not seeing it or is it not there?

I dont want to have to always use CTRL+ALT+I to send page to IE and then "send shortcut to desktop".


Thanks



Edited 1 time(s). Last edit at 11/29/2011 12:11AM by froggy.

Options: ReplyQuote
Re: send shortcut to desktop
Posted by: JamesD
Date: November 29, 2011 12:43AM

This is very old, but might be what you need.
http://kmeleon.sourceforge.net/wiki/Create+Shortcut

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
Re: send shortcut to desktop
Posted by: froggy
Date: November 30, 2011 11:40PM

I tried these scripts but I must be doing something wrong. No change in the menu options

Options: ReplyQuote
Re: send shortcut to desktop
Posted by: JamesD
Date: December 01, 2011 02:31AM

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.

Shortcut.kmm

#  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("javascriptsad smileyfunction(){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("javascriptsad smileyfunction(){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;";

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
Re: send shortcut to desktop
Posted by: megaduu
Date: December 01, 2011 04:10AM

It works well!

Options: ReplyQuote
Re: send shortcut to desktop
Posted by: froggy
Date: December 01, 2011 11:26PM

Yes it does. Works perfectly now.
Thanks !

Options: ReplyQuote
Re: send shortcut to desktop
Posted by: JamesD
Date: December 02, 2011 02:54AM

Very happy to have been of some help.

Hanlon’s razor is an eponymous adage named after Robert J. Hanlon that states: “Never attribute to malice that which is adequately explained by stupidity.”

JamesD

Options: ReplyQuote
Re: send shortcut to desktop
Posted by: siria
Date: October 12, 2014 11:06PM

Still based on the old KM1.0 version (&JSenable etc.), and can't work fully.

But kko posted a new KM1.5 version already in the wiki in 2008:
http://kmeleonbrowser.org/forum/read.php?1,27152,page=3

Quote
kko
KmmShortcut now works in both km 1.1 and 1.5 (no edition required).

Have now added a remark to the old version wiki page.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.