Custom navigation by skipping several files?
Moderators: Hacker, petermad, Stefan2, white
Custom navigation by skipping several files?
When navigating in a directory with lots of files, it is convenient to have an option of "intermediate-scale" navigation. Up/down arrows are "fine-scale", as the move up/down one item. PageUp/PageDown are too "large-scale", as they jump by "pages". Is it possible to assign, say, Left/Right keys to move by 10 files backward/forward? I couldn't find an appropriate cm_* command in Navigation. Maybe possible to define a user command?
Maximko,
An AutoHotkey script as a workaround:
HTH
Roman
An AutoHotkey script as a workaround:
Code: Select all
#NoEnv
SendMode, Input
Keys := {Left: "{Up 10}", Right: "{Down 10}"}
#IfWinActive, ahk_class TTOTAL_CMD
Right::
Left::
SendMessage, 1074, 3
ActiveFilePanelHwnd = %ErrorLevel%
ControlGetFocus, FocusedControl, A
ControlGet, FocusedControlHwnd, Hwnd, , %FocusedControl%, A
IfEqual, FocusedControlHwnd, %ActiveFilePanelHwnd%
Send, % Keys[A_ThisHotkey]
Else
Send, {%A_ThisHotkey%}
Return
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Wow, many thanks! Just what I needed.
For what it's worth, maybe you'll hint a further modification to the script which will allow to go one directory higher with the Left key, if I have reached the top of the list in the panel?
Oh, and also this: for some reason, if I put your script at the beginning of my ahk-file with my other scripts, my other scripts stop working
If I put your script after my scripts, your script isn't working. Of course, I can separate them into different files, but - do you maybe know what could be the reason for the conflict? (I have a few simple scripts for shortcuts starting applications).
For what it's worth, maybe you'll hint a further modification to the script which will allow to go one directory higher with the Left key, if I have reached the top of the list in the panel?
Oh, and also this: for some reason, if I put your script at the beginning of my ahk-file with my other scripts, my other scripts stop working

Maximko,

right after it so the rest of the script (your part) is not affected by the #IfWinActive, ahk_class TTOTAL_CMD directive. But that does not explain why my script wouldn't work if it's at the end. The easiest way would be to post your script if there are no sensitive information.
HTH
Roman
Welcome.Wow, many thanks!

go one directory higher with the Left key, if I have reached the top of the list in the panel
Code: Select all
#NoEnv
SendMode, Input
Keys := {Left: "{Up 10}", Right: "{Down 10}"}
#IfWinActive, ahk_class TTOTAL_CMD
Right::
Left::
; Get the handle of the active panel control
SendMessage, 1074, 3
ActiveFilePanelHwnd = %ErrorLevel%
; Get the handle of the currently focused control
ControlGetFocus, FocusedControl, A
ControlGet, FocusedControlHwnd, Hwnd, , %FocusedControl%, A
; If the currently focused control is TC's active panel
IfEqual, FocusedControlHwnd, %ActiveFilePanelHwnd%
{
; Get the cursor position
SendMessage, 1074, 1000
ActiveFilePanelId = %ErrorLevel%
SendMessage, 1074, 1006 + ActiveFilePanelId
CursorPos = %ErrorLevel%
If (A_ThisHotkey = "Left") AND (CursorPos = 0)
SendMessage, 1075, 2002 ; cm_GoToParent
Else
Send, % Keys[A_ThisHotkey]
}
Else
Send, {%A_ThisHotkey%}
Return
Hard to say without seeing your script. If you put my script at the beginning, you might need to anif I put your script at the beginning of my ahk-file with my other scripts, my other scripts stop workingIf I put your script after my scripts, your script isn't working. Of course, I can separate them into different files, but - do you maybe know what could be the reason for the conflict?
Code: Select all
#IfWinActive
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.