SaveToFolder - drop stuff in last used folder, don't ask
Posted by: siria
Date: May 14, 2011 04:20PM

Tired of confirming the "choose folder" box each and every time when saving a bunch of images, pages or links? This macro extends the menu to offer not only "Save As...", but additionally also "Save (Last Used Dir) (!)"

The second entry is new, it blindly drops the stuff into the LAST USED folder without asking anything - but ATTENTION, this also means it doesn't ask for overwrite permission if that filename exists already, it overwrites it silently! Would have prefered a warning, but that's beyond my restricted coding level, so I just added a little reminder in that menu line: (!)








----------------------------

DOWNLOAD:
http://kmeleonbrowser.org/forum/file.php?9,file=753,filename=SaveToFolder.kmm
Just a kmm-file, save it in your K-Meleon macros folder

Macro tested in KM 1.5.4 and 1.6beta2. Probably works also in other versions.

Options:
You can set your own keyboard shortcuts for those new commands, if you open the kmm-file in a text editor. In the beginning there are a few lines with variables meant for user configuration.
Predefined shortcut to "Save Link Target in last used folder": ALT + LeftMouse

In the kmm-file you can also define your own max menu length of the last used folder path. Default: max 16 characters in menu.

Native K-Meleon options:
the save type (HTML only OR whole page with images, scripts etc.) is also the last used mode, as you've set it with the last used "Save AS..." command.
To choose either the filenames or the page titles as default for saving, open
Edit > Preferences (F2) > File Handling
On the same page is also an option to automatically close the "download finished" info box without confirmation each time.

Code: it uses a native KM pref, and toggles it if needed ("kmeleon.download.useSaveDir").
Catch: Unfortunately the second "drop in last used" command doubles the file endings (extension), e.g. an image "photo1.jpg" gets stored as "photo1.jpg.jpg". Can't help it, the filenames look a bit odd, but the function itself works fine, no prob.

"Un-Installation": Remove "SaveToFolder.kmm" from macros folder, or hit F2>Macro Extension to temporarily disable single macros.



Edited 6 time(s). Last edit at 03/03/2014 09:28PM by siria.

Attachments: savetofolder_menu1.png (21.8 KB)   SaveToFolder.kmm (6.9 KB)  
Re: SaveToFolder - drop stuff in last used folder, don't ask
Posted by: mhf
Date: May 16, 2011 05:35PM

siria - this is nice but if I use the "Save (Last Used Dir) (!)" option it adds an extension to the existing one, e.g. myfile.zip.zip or yourfile.exe.exe ...

Re: SaveToFolder - drop stuff in last used folder, don't ask
Posted by: siria
Date: May 18, 2011 08:32PM

Grmpf... Have actually overlooked that, oops, but you'right. Thanks for telling!

At least the files and images still work fine despite the double ending. Saved photos also keep their recording details (exif) so I see no real problem, the function is okay, just the filenames look a bit stupid.

Have really tried hard now to find some fix for it, and played with savetype-prefs etc., but didn't help sad smiley
Basically this macro just uses the native K-Meleon commands ID_SAVE_AS, but those has no option for parameters of any kind, like filenames or endings. Aside from that, only the native KM pref is toggled that tells the browser "Don't ask for the save folder", that's all. And can't find any other related prefs that would help. Am afraid that would take a developer to change this behaviour, a step too difficult for me ;-)

Attachments: savetofolder_menu2.png (16.3 KB)   savetofolder_menu3.png (9.8 KB)  
Re: SaveToFolder - drop stuff in last used folder, don't ask
Posted by: mhf
Date: May 18, 2011 08:58PM

Thanks for your reply siria - sure it looks a bit odd but as you say it doesn't affect the files in any way, so no problem.

K-Meleon forum is powered by Phorum.