Hi, i'd like to suggest a new parameter for cm_exit, will be similar to cm_exit 5 but without saving settings to wincmd.ini. Something like this petermad em_command that open a new instance with same directories and file position
Could you please explain what would be the point of this? It wouldn't work well when using multiple tabs. In fact I tried this first before coming up with the parameter 4 - the problem was when the user switched tabs before closing, e.g. from tab 2 to tab 4, this command would then open the directory of tab 4 on tab 2 because the tab wouldn't be saved and would still be 2. But the current directory would be that of tab 4, which would be passed to TC via %P%N.
You are right that it probably wouldn't work well with tabs, neither does my em_ext_newcommander command.
But I rarely use tabs, but often make changes to the .ini file manually and then use em_ext_newcommander,cm_Exit to restart TC with current dirs and cursorpositions as they were. I have disabled all auto-savings (exept Old command-lines) in the Operation settings, because I want my TC to otherwise to start in the same condition every time - so em_Exit 5 is not attractive to me.
People who want the latest tab changes transferred when using cm_Exit can use cm_Exit 5 - what I would like is a cm_exit 8 that tranfers current dirs and cursorpositions, but does NOT save anything to wincmd.ini
Last edited by petermad on 2022-10-05, 12:01 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14 TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Everything is right. Before restarting, we edit wincmd.ini to check the operation of some options. When autosaving, manual editing may not be remembered.
I agree that without tabs, -1 would be a valid option. But it breaks the option to add values, so maybe I should use:
8: Always pass current paths to the new instance with /P option
Then it could be combined with 1 or 2 too (start same or switch between 32/64 bit) and even with 4
ghisler(Author) wrote: 2022-10-05, 10:20 UTC
While it is possible to launch a program in admin mode from a program running in user mode, I don't know of any method to do the reverse.
ghisler(Author) wrote: 2022-10-05, 08:02 UTC
I agree that without tabs, -1 would be a valid option. But it breaks the option to add values, so maybe I should use:
8: Always pass current paths to the new instance with /P option
Then it could be combined with 1 or 2 too (start same or switch between 32/64 bit) and even with 4
What do you think?
8 - sounds like a good solution - could you pass the paths as %P%N* and %T%M* not just as %P and %T - the * is necessary if the cursor is placed on [..]
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14 TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
petermad wrote:
8 - sounds like a good solution - could you pass the paths as %P%N* and %T%M* not just as %P and %T - the * is necessary if the cursor is placed on [..]
This is the best option and would be great to be able to use cm_RestoreSelection after restart, thanks
history.txt wrote:07.10.22 Fixed: CM_EXIT: Restore active panel with /P=L or /P=R switch, add 8 to parameter to always pass left/right path and name to the program (32/64)
Confirmed implementset in TC 10.52rc2 - even with preservation of cursor position.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14 TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar