K-Meleon

KMeleonWiki > Resources > MacroLibrary > Download with Wget

Added by: Al. (macro originally conceived by Po)



Notes:

This macro adds an entry to the context menu which allows you to right-click and download a file using the command line application wget. You will want to put the wget executable file into a directory that's in your path, otherwise you'll have to specify the full path to it in the macro, in place of the name.

In Macros:

wgetfile {
menu = "wGet &file";
$tmp = getclipboard();
id(ID_COPY_LINK_LOCATION?);
exec("wget -P/mydocs/download " . getclipboard());
setclipboard($tmp);
}

Right-clicking on a link will download the pointed-to file to the C:\mydocs\download directory... you should change this part of the macro to reflect whatever folder you want the files to be saved to.


In Menus:

This goes in the menus.cfg file in all blocks that contain 'LinkPopup?' in the name:


macros(wgetfile)
-


K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.