Answer the question
In order to leave comments, you need to log in
How to bind a hotkey to open the next/previous folder in Total Commander?
For example, there is a structure like this:
C:\
-- dir1
---- dir2
---- dir3
---- dir4
Answer the question
In order to leave comments, you need to log in
I wrote a simple php script that opens the next / previous directory in the command line - https://gist.github.com/xandeadx/6ca1b50235b93b4f9...
Well, then I added two buttons - forward, back:
These keys are bound to clone the path of the current panel to the inactive one, and this is often useful. It is better to occupy less important keys, for example, F9-F12. The next edge - Total cannot do things like switch to a neighbor, so only a script in any automation language (cron, AutoIt and the like) helps here. The script on Autoit is like this:
HotKeySet('{F9}', 'Prev')
HotKeySet('{F10}', 'Forv')
HotKeySet('{F11}', 'Stop')
While 1 ; цикл вечного ожидания действий
Sleep(10)
WEnd
Func Prev()
WinActivate("Total Commander") ; перейти в ТК
Send("^{HOME}") ; выход в начало папки
Send("{ENTER}") ; выход из папки
Send("{UP}") ; переход выше
Send("{ENTER}") ; заход в следующую папку
EndFunc
Func Forv()
WinActivate("Total Commander") ; перейти в ТК
Send("^{HOME}") ; выход в начало папки
Send("{ENTER}") ; выход из папки
Send("{DOWN}") ; переход ниже
Send("{ENTER}") ; заход в следующую папку
EndFunc
Func Stop()
Exit
EndFunc
As follows from the script, by pressing the F9 / F10 button (note that this is a global hotkey, this pressing will not reach other programs), it will transfer focus to Total in the current panel (without checking whether it is on the right or left; although this can also be added ) re-enter the previous/next folder and wait for action again. By F11, the script is unloaded, which can be seen from the disappearance of the Autoita icon in the system tray. Send("^cm_GoToParent") ; выход из папки
Send("{ENTER}") ; выполнить
but it doesn't change the point
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question