General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
'File / Open' question ?
Posted by: JAFD
Date: October 28, 2015 02:28PM

Hello,

Have an older computer, with K-Meleon 1.5.4 installed. Just got new computer, downloaded and installed 75.1.

Often, I use K-Meleon for going thru downloaded web pages, saving useful files to different disks and directories with different names.

Version 1.5.4 would respond to 'File/Open' by opening the directory from which you'd last opened a file. Version 75.1 opens the directory you've set as the default for saving a file, and you have to page, each time, to the directory where the file you want to open is. This wastes a great deal of time.

Also, 'File/Open' loads the newly opened file in a seperate tab, and every so often I have to go back and close a dozen tabs, one by one.

How can I set the defaults to the efficient system I'm used to in 1.5.4 ?

Thanks, very much, for your help with this.

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: siria
Date: October 28, 2015 07:20PM

Hi, just did some testing now.
But cannot confirm, in my browser there seems no difference in how file actions are handled:

File>Open always opens the "last used" directory, regardless if that use was "save" or "open". As it should be.

And whether it opens in a new tab or the same one, depends from the user setting for Typed Text:
Edit > Preferences (F2) > Browsing
There is a dropdown field to customize for Typed Text, Bookmarks etc., check them all. Also click on tab "Window Diversion" on the right side, it contains some similar settings too.

If you really want an open-command that only opens the "last OPEN" folder, you probably need a little macro that stores the last open-folder in a pref, and next time reads that pref again before opening another file. But that would only work for manually opened files via "File>Open"



(sig) New unofficial K-Meleon 76.4 (KMG76.4) available, in own subforum.
Based on Goanna engine, called 'test' builds forever but more stable as 75.1 acc. forum members. It's 1-2 generations ahead of predecessor KM76RC-2016
K-Meleon FAQ (link missing in forum sidebar)
Tips&Tricks - Learning new stuff every day
New to K-Meleon? What do you like? What not?



Edited 1 time(s). Last edit at 10/28/2015 07:21PM by siria.

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: siria
Date: October 28, 2015 07:29PM

Or do you use a fix folder for saving files? Not sure how much influence that has, but unlikely you want that, since you mentioned you're using different disks and folders.
Anyway, better also check your Save-settings in F2>Browsing>File Handling



(sig) New unofficial K-Meleon 76.4 (KMG76.4) available, in own subforum.
Based on Goanna engine, called 'test' builds forever but more stable as 75.1 acc. forum members. It's 1-2 generations ahead of predecessor KM76RC-2016
K-Meleon FAQ (link missing in forum sidebar)
Tips&Tricks - Learning new stuff every day
New to K-Meleon? What do you like? What not?

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: JamesD
Date: October 28, 2015 09:02PM

This might help.

[ Copy the code and paste into a text file. Name the text file "OpenFrom.kmm". Use the all files option. Copy the file to your macros folder. Restart K-Meleon. ]

This is test only. It is un-finished. Still to come is ability to change folder after initial setup.

OpenFrom.kmm

#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- OpenFrom.kmm
# ---------- K-Meleon Macro Language Rename/Add 'Open From' to File > OpenSave menu ----
#
# Dependencies        : main.kmm
# Resources           : -
# Preferences         : -
# Version             : 0.1   2015-10-28  JamesD
# --------------------------------------------------------------------------------
#
_OpenFrom_Get {
macroinfo = _("Open a file from the last directory used here.");
$_OpenFrom_Last = getpref( STRING, "kmeleon.plugins.macros.openfrom.lastdir" );
$_OpenFrom_Last == "" ? &_OpenFrom_Init : &_OpenFrom_Select ;
}

_OpenFrom_Init {
$_OpenFrom_Folder = promptforfolder (_("Specify an initial folder."));
setpref( STRING, "kmeleon.plugins.macros.openfrom.lastdir", $_OpenFrom_Folder) ;
macros("&_OpenFrom_Select");
}

_OpenFrom_Select {
$_OpenFrom_File = promptforfile( getpref( STRING, "kmeleon.plugins.macros.openfrom.lastdir"), "FILE", *.* );
open($_OpenFrom_File); 
}

_OpenFrom_BuildMenu {
### add another option to File > OpenSave menu
setmenu("OpenSave", macro, "Open from..", _OpenFrom_Get, "&Save Page As...");
}

$OnInit=$OnInit."_OpenFrom_BuildMenu;";
$macroModules=$macroModules."OpenFrom;";



Edited 1 time(s). Last edit at 10/28/2015 09:05PM by JamesD.

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: siria
Date: October 28, 2015 09:19PM

Couldn't resist playing with a macro :cool:

Update: new version v2.1!

########## fileopendir.kmm ##########


# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)

# The normal File > Open command in K-Meleon starts in the last SAVE-or-OPEN folder.
# If this macro is used, it will only remember its own new OPEN folder and start there next time.

# Version: v2.1 2015-10-29 (bugfix)
# Menu: File > Open last open-folder...
# Preferences: macros.fileopendir.path
# FORUM: http://kmeleonbrowser.org/forum/read.php?1,136075
# Optional command for button in toolbars.cfg: "macros(FileOpenDir_last)"

_FileOpenDir_BuildMenu{
setmenu("OpenSave",macro,"Open last open-folder...","FileOpenDir_last","&Open...");
# show icon in File menu (only works in KM75+, and image name must exist in skins/default folder)
setcmdicon("macros(FileOpenDir_last)", "menu1.png[4,16,16]");

# Optional set a Keyboard SHORTCUT (remove comment # sign to activate)
# setaccel("CTRL O","macros(FileOpenDir_last)");
}

FileOpenDir_last{
macroinfo=_("Open file, start in same folder as last time by macro FileOpenDir");
$_old=getpref(STRING,"macros.fileopendir.path");
$_new=promptforfile($_old,"Open *.htm file + remember folder","*.htm*");
if ($_new>"") {
dirname($_new)==$_old ? 0 : setpref(STRING,"macros.fileopendir.path",dirname($_new));
# Open in same page: open($_new) / Open in new tab or window: opentab($_new)
open($_new);
}
$_old=""; $_new="";
}

$OnInit=$OnInit."_FileOpenDir_BuildMenu;";
$macroModules=$macroModules."FileOpenDir;";


###########
Edit: Oops, James beat me by 17 minutes grinning smiley



(sig) New unofficial K-Meleon 76.4 (KMG76.4) available, in own subforum.
Based on Goanna engine, called 'test' builds forever but more stable as 75.1 acc. forum members. It's 1-2 generations ahead of predecessor KM76RC-2016
K-Meleon FAQ (link missing in forum sidebar)
Tips&Tricks - Learning new stuff every day
New to K-Meleon? What do you like? What not?



Edited 3 time(s). Last edit at 10/29/2015 09:24PM by siria.

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: JamesD
Date: October 28, 2015 09:51PM

siria

Your completed macro beat mine. Updating included in this one.

https://dl.dropboxusercontent.com/u/1522294/OpenFrom.7z

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: siria
Date: October 29, 2015 10:08AM

2 macros for 1 user, quite a support grinning smiley

And meanwhile realized mine didn't store anything if the pref didn't exist yet, oops...
UPDATED mine too, fix in my post above (version 2.1)

PS:
the menu icon didn't work yet, now fixed too in v2.1 above :cool:
That's a brandnew command, had to figure out the syntax first.



(sig) New unofficial K-Meleon 76.4 (KMG76.4) available, in own subforum.
Based on Goanna engine, called 'test' builds forever but more stable as 75.1 acc. forum members. It's 1-2 generations ahead of predecessor KM76RC-2016
K-Meleon FAQ (link missing in forum sidebar)
Tips&Tricks - Learning new stuff every day
New to K-Meleon? What do you like? What not?



Edited 2 time(s). Last edit at 10/29/2015 09:24PM by siria.

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: JamesD
Date: October 29, 2015 11:56AM

Quote
siria
2 macros for 1 user, quite a support

Naturally! The best browser has the best forum and best support. grinning smiley

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: Dorian
Date: October 30, 2015 06:08PM

Quote
JAFD
Also, 'File/Open' loads the newly opened file in a seperate tab, and every so often I have to go back and close a dozen tabs, one by one.

This should be fixed in the next release.

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: JamesD
Date: January 21, 2016 04:33PM

Updated to include menu item in Compact Menu.

https://dl.dropboxusercontent.com/u/1522294/OpenFrom.7z

Options: ReplyQuote
Re: 'File / Open' question ?
Posted by: foliator
Date: January 21, 2016 06:53PM

@siria:
I just tried the File Open dialog in KM75, and it always brings up the previously opened folder, regardless of the fact that I have set a specific folder for all downloads, so there doesn't seem to be a connection with that setting.

The file opens in the current tab, too, but as you suspected, changing the setting for typed URLs to open pages in a new tab affects the File Open dialog, as well.

---
Gerry

Options: ReplyQuote


K-Meleon forum is powered by Phorum.