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=kko] I can offer a solution using Windows Script Host. All work described below takes place in your profile directory. 1) Creating the script Create a new text file in your profile directory, paste the following lines and rename it to "Shortcut.js". if (WScript.Arguments.length) { var Arg = WScript.Arguments; var WSS = new ActiveXObject("WScript.Shell"); var FSO = new ActiveXObject("Scripting.FileSystemObject"); var LnkName = (Arg.length > 1) ? Arg(1) : "New Internet Shortcut"; var LinkLoc = WSS.SpecialFolders("Desktop") + "\\"; var i=0; for (; FSO.FileExists(LinkLoc+LnkName+((i)?(" ("+i+").url"):".url")); i++); LnkName += (i) ? (" ("+i+").url") : ".url"; var Lnk = WSS.CreateShortcut(LinkLoc+LnkName); Lnk.TargetPath = Arg(0); Lnk.Save(); } Half of the script is to make sure, that we do not overwrite existing files. The script won't do anything, if no parameters are passed to it. 2) Defining macros Open macros.cfg with a text editor and paste the following lines (wherever you want, I suggest at the end): PageToDesktop{ exec("wscript.exe \"".$path."Shortcut.js\" \"".$URL."\" \"".$TITLE."\""); } LinkToDesktop{ exec("wscript.exe \"".$path."Shortcut.js\" \"".$LINKURL."\""); } FrameToDesktop{ exec("wscript.exe \"".$path."Shortcut.js\" \"".$FrameURL."\""); } These macros will execute the script "Shortcut.js" in your profile directory. First parameter is the URL (required). Second parameter is the file name (optional). 3) Defining menu entries Open menus.cfg with a text editor. Search for "Save{". You should find the following lines (about line 700): Save{ bookmarks(Add, Bookmark This Page) favorites(Add, Add Page to Favorites) hotlist(Add, Add Page to Hotlist) %ifplugin macros macros(SavePage, Save Page As...) macros(EmailURL, Send Page As Link...) %else Save Page &As... = ID_FILE_SAVE_AS %endif - } Before the line "%else" add the line "macros(PageToDesktop, Send Page To Desktop)". This will give you a new entry "Send Page To Desktop" in the context menu of a page. When this entry is selected, the macro "PageToDesktop" is executed. Search for "Link{". You should find the following lines (about line 775): Link{ %ifplugin layers layers(OpenLink, Open in New Layer) layers(OpenLinkBg, Open in Background Layer) - %endif Open in &New Window = ID_OPEN_LINK_IN_NEW_WINDOW Open in Back&ground Window = ID_OPEN_LINK_IN_BACKGROUND - bookmarks(AddLink, Bookmark This Link) favorites(AddLink, Add Link to Favorites) hotlist(AddLink, Add Link to Hotlist) &Copy Link URL = ID_COPY_LINK_LOCATION %ifplugin macros macros(SaveLink, Save Link As...) macros(LinkInfo, View Link URL...) macros(LinkInIE, View Link In IE) %else Save &Link As... = ID_SAVE_LINK_AS %endif } Before the line "%else" add the line "macros(LinkToDesktop, Send Link To Desktop)". Search for "Frame{". You should find the following lines (about line 840): Frame{ Open Frame = ID_OPEN_FRAME %ifplugin layers macros(FrameInLayer, Open Frame in New Layer) %endif Open Frame in New Window = ID_OPEN_FRAME_IN_NEW_WINDOW macros(FrameInBack, Open Frame in Background) - %ifplugin macros macros(ReloadFrame, Reload Frame) macros(SaveFrame, Save Frame As...) macros(EmailFrameURL, Send Frame As Link...) %else Save Frame As... = ID_FILE_SAVE_FRAME_AS %endif - View Frame Info = ID_VIEW_FRAME_INFO V&iew Frame Source = ID_VIEW_FRAME_SOURCE } Before the line "%else" add the line "macros(FrameToDesktop, Send Frame To Desktop)". 4) Restart K-Meleon Good luck![/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development