ViewMode onExit commands
Moderators: white, Hacker, petermad, Stefan2
ViewMode onExit commands
When you define viewmode, you have a autorun command that is excuted when the viewmode is loaded.
If we add some command to turn some feature on or load some specific toolbar,.... , hide
Could it be possible to have an autoExit command to turn it off when you switch to other viewmode or default..
If we add some command to turn some feature on or load some specific toolbar,.... , hide
Could it be possible to have an autoExit command to turn it off when you switch to other viewmode or default..
Support +++
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 48083
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I would prefer not to add another line to this page, but maybe I could integrate it somehow with the current user interface, e.g.
cm_command1, cm_command2 | com_command3, cm_command4
What do you think?
cm_command1, cm_command2 | com_command3, cm_command4
What do you think?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
So yo mean that what comes after | will be executed when leaving the View Mode...?
If you do it that way, we will have to answer questions about how to do this here in the forum for years to come - you no how people don't read the help
But I also understand that another field requires translation, which might postpone the final release.
If you do it that way, we will have to answer questions about how to do this here in the forum for years to come - you no how people don't read the help
But I also understand that another field requires translation, which might postpone the final release.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Having a separator on the same field could be a good idea you could resize it (at least 3 times) or have two lines.ghisler(Author) wrote:I would prefer not to add another line to this page, but maybe I could integrate it somehow with the current user interface, e.g.
cm_command1, cm_command2 | com_command3, cm_command4
What do you think?
IMHO It is clearer to have two separate auto-run field.
- ghisler(Author)
- Site Admin
- Posts: 48083
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
There is another problem: I can catch the directory change only when it is already complete. This would mean that the commands would be executed when already in the new directory. Probably not what the user would expect.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
So basically there needs to be a way to indicate something should occur when the tab becomes inactive by switching to another tab in the same panel - like a reset.
So one would need to keep track of which actions were defined to occur at this "interrupt" stage - prior to switching tabs. Then maybe a do a sanity-check to make sure the tab actually changed - if not, re-run cm_cmd_1,cmd2$$cm_...
[Aside]:
I would also like to point out that "|" is already used in many other places within TC's various settings, dialogs, tool bars, etc.
I use "$" in this example, as "$" is used in Regex to denote the end of a line. So just prior to changing tabs, "cm_cmd2ToRunWhenInactiveSuchAsWhenChangingTabs" will be run.
- cm_cmd1,cm_cmd2##cm_cmd2ToRunWhenInactiveSuchAsWhenChangingTabs,cmd3
- cm_cmd1,cm_cmd2#cm_cmd2ToRunWhenInactiveSuchAsWhenChangingTabs,cmd3
- cm_cmd1,cm_cmd2$cm_cmd2ToRunWhenInactiveSuchAsWhenChangingTabs,cmd3
- cm_cmd1,cm_cmd2$$cm_cmd2ToRunWhenInactiveSuchAsWhenChangingTabs,cmd3
So one would need to keep track of which actions were defined to occur at this "interrupt" stage - prior to switching tabs. Then maybe a do a sanity-check to make sure the tab actually changed - if not, re-run cm_cmd_1,cmd2$$cm_...
[Aside]:
I would also like to point out that "|" is already used in many other places within TC's various settings, dialogs, tool bars, etc.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Anyway this should run when you leave the viewmode and before switching to new directory. This should also occurs even if the viewmode is changed manually or using a command on the same folder.ghisler(Author) wrote:There is another problem: I can catch the directory change only when it is already complete. This would mean that the commands would be executed when already in the new directory. Probably not what the user would expect.
Basically you have to detect if you change ViewMode by a command of if the change to a new directory will trigger a ViewMode change once the folder will be set. This is probably not the way you implemented the Auto-switch
You know the pattern for the current viewmode so you ca detect before doing a CD if you leave or not the current mode.
- ghisler(Author)
- Site Admin
- Posts: 48083
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately this is impossible because TC cannot know whether leaving a directory will be successfull, e.g.Anyway this should run when you leave the viewmode and before switching to new directory.
1. User tries FTP connection, but it fails
2. User tries to switch to inaccessible drive
etc.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
When the switch to a new directory|or tab fails, just re-run the viewMode?ghisler(Author) wrote:Unfortunately this is impossible because TC cannot know whether leaving a directory will be successfull, e.g.Anyway this should run when you leave the viewmode and before switching to new directory.
1. User tries FTP connection, but it fails
2. User tries to switch to inaccessible drive
etc.
1) Run any onExit(ViewMode) actions.
2) Attempt to open the Folder.
3) If the path has not changed, Re-run the ViewMode.
4) If the path has changed, Clear the ViewMode.
EDIT:
* I don't think the "Refresh" Boolean I mentioned previously is needed.
Last edited by Balderstrom on 2016-07-30, 03:56 UTC, edited 3 times in total.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Sounds feasible...When the switch to a new directory|or tab fails, just re-run the viewMode?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar