Folder help please (cm_GoToFirstEntry)

English support forum

Moderators: white, Hacker, petermad, Stefan2

linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

Hi friends,

I love Total Commander. It's completely saved my life, having to work with Windows 10 is so much easier now. Thank you for this great program.

One question please.

Can you please tell me how I can make TC always "cm_GoToFirstEntry" when I open a folder? It's quite annoying for me to always have to manually arrow down one-key-press just to select the file actual file/folder in the directory whenever I enter it.

I assigned a hotkey but that's just not helpful in my workflow. In Windows Explorer and XYPlorer, it's quite common for the default behavior to be, when you open a folder, that you are highlighted/selected the first item in the directory, not the ".." that is not helpful. Muscle memory. :)

If I hit enter and go in a directory, and hit enter again (thinking I'm going to "open the first file in the folder"), all I do is exit the folder and get a loop (..) and it's quite awkward.

Thank you kindly for helping me. :)

Please tell me how I can have TC always select the first item/file/folder in the directory when I enter it (cm_GoToFirstEntry). I do not wish to always have the (..) selected every time I enter a folder.

Have a great day.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *petermad »

You can make a View Mode with *cm_GoToFirstEntry (notice the asterisk in the start) in the "Auto-run commands" field, and then use that View Mode in an Auto Switch Mode for an L rule (or a D rule).

See: https://madsenworld.dk/tcmd/gotofirstentrymode.png

Notice that this will also go to the first entry when you go up-dir and not go to the current dir when you go up-dir as the default is.
It will only work on local drives, if you also want it to work in for example FTP or Archives you have to make the same for F and A rules etc.

If you have other costum made rules, the make sure that you place the L rule AFTER your custom rules.

.
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
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

petermad wrote: 2022-03-03, 23:04 UTC You can make a View Mode with *cm_GoToFirstEntry (notice the asterisk in the start) in the "Auto-run commands" field, and then use that View Mode in an Auto Switch Mode for an L rule (or a D rule).

See: https://madsenworld.dk/tcmd/gotofirstentrymode.png

Notice that this will also go to the first entry when you go up-dir and not go to the current dir when you go up-dir as the default is.
It will only work on local drives, if you also want it to work in for example FTP or Archives you have to make the same for F and A rules etc.

If you have other costum made rules, the make sure that you place the L rule AFTER your custom rules.

.
Peter,

I cannot thank you enough. Your instructions were flawless. I got my solution fixed in about 30 seconds. Wow. TC is so powerful. I had no idea I could customize view modes to this extent. I am floored. WOW.

However, upon testing your solution, I don't care much for the "Notice that this will also go to the first entry when you go up-dir" part. This is jarring. I want TC to remember where I was, I don't wish for TC to jump up to the first entry of every folder when I go UP a directory. I'd like it to remain where I was.

** I only wish for TC to "only go to the first entry when you go DOWN-dir into a folder" please. Thank you. **

Thank you so so much. I hope you have a wonderful weekend.
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

Honestly, I'm not looking for anything fancy or something. Just basic functions found in the standard explorers like Windows Explorer, XYplorer, etc.

When you open a directory, I'd like TC to simply select/highlight the first item (cm_GoToFirstEntry).
When I go back up a directory to where I just was, TC should remember the folder and keep it highlighted so I can continue doing whatever operation I was.
TC should not jump to the top of every single directory by default, that's quite frustrating.

Only when you open a folder (go down-dir), TC should select the first item.

Thanks for helping me with this. I can't solve it myself. :(
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *funkymonk »

Support++ (for auto-selecting the first file when going *down* in the directory hierarchy)
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6490
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Folder help please (cm_GoToFirstEntry)

Post by *Horst.Epp »

funkymonk wrote: 2022-03-04, 08:02 UTC Support++ (for auto-selecting the first file when going *down* in the directory hierarchy)
No only as an option.
I always go to the newest file using a button.
So everyone has his own preferences.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

Is there a way to auto-select the first file/item/folder when going down into the directory, but remembering your place when you go back out of the directory please? It's something many of us, including me, are quite used to in many other standard explorer applications. It saves a lot of time and energy on keystrokes and whatnot, it adds up during a full day of work and explorer operations. :)

I mean, anything is better than auto-selecting (..) which just brings you right back to where you came from like a feedback loop lol - even if TC selects the most recent or the first-item, it's all better than default selecting the (..) which makes you leave the folder you just entered.

I hope I can achieve this in TC, I love this program so much!

Thank you!
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *petermad »

2linuxy
When you open a directory, I'd like TC to simply select/highlight the first item (cm_GoToFirstEntry).
When I go back up a directory to where I just was, TC should remember the folder and keep it highlighted so I can continue doing whatever operation I was.
TC should not jump to the top of every single directory by default, that's quite frustrating.
I cannot think of a way to accomplish that at the moment. Sorry
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
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *nsp »

The power of TC is when you use Tab, if you want to keep a state, just keep a tab.
Currently if you use the back button(Same with backspace or ..), TC should not jump/select to the [..] folder. This selection is made by the component only when you populate for a new dir as it is the first item.

If you use a custom viewmode, you change the default behavior and as you do not have any scripting nor condition in TC you cannot configure TC as you want.
To be more like XY explorer, you should just ask for an option to not show parent item !
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

nsp wrote: 2022-03-04, 21:05 UTC The power of TC is when you use Tab, if you want to keep a state, just keep a tab.
Currently if you use the back button(Same with backspace or ..), TC should not jump/select to the [..] folder. This selection is made by the component only when you populate for a new dir as it is the first item.

If you use a custom viewmode, you change the default behavior and as you do not have any scripting nor condition in TC you cannot configure TC as you want.
To be more like XY explorer, you should just ask for an option to not show parent item !
Hi there.

Thank you for this. I am trying to follow. Can you help me understand what you mean, how do I go about changing the default behavior of a custom view to configure as I want?

And is there currently an option to not show parent item (..) ? That would be quite awesome. It seriously would help save so many keystrokes for many of us :)

I'd gladly sponsor that. I love TC!
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *petermad »

Hi there.

Thank you for this. I am trying to follow. Can you help me understand what you mean, how do I go about changing the default behavior of a custom view to configure as I want?
You cannot do what you want by using View Modes, because Auto Switch Mode does not distinguish between shifting up or down the directory tree, it simply reacts on directory changes
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
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

petermad wrote: 2022-03-05, 21:46 UTC
Hi there.

Thank you for this. I am trying to follow. Can you help me understand what you mean, how do I go about changing the default behavior of a custom view to configure as I want?
You cannot do what you want by using View Modes, because Auto Switch Mode does not distinguish between shifting up or down the directory tree, it simply reacts on directory changes
Oh, I see. :(

So, I'm out of luck? There's no likely chance of this being possible sometime?
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *nsp »

Hiding parent (..) as an option, is not yes available.

Use forum to make a suggestion to @Ghisler(Author).

-- Out of Topic --

I personally do not count KeyStroke as in TC i navigate much more with the (Extended) QuickSearch (No exact match, Leter + Dialog and filtering on ) than with arrow keys or mouse.. This makes TC much more efficient than Explorer and many other windows explorer..
User avatar
Hacker
Moderator
Moderator
Posts: 13065
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Folder help please (cm_GoToFirstEntry)

Post by *Hacker »

linuxy,
Here is an AHK script that reacts to Enter being pressed and after checking if a subdir has been entered sets the focus on the first item:

Code: Select all

Global PreviousTcPath
PreviousTcPath := GetCurrentTcPath()

#IfWinActive, ahk_class TTOTAL_CMD
~$Enter::
	SetTimer, StopChecking, -5000
	SetTimer, CheckAndSetToFirstItem, 50
Return

CheckAndSetToFirstItem()
{
	CurrentTcPath := GetCurrentTcPath()
	If (CurrentTcPath = PreviousTcPath)
		Return
	If ((StrLen(CurrentTcPath) > StrLen(PreviousTcPath)) && InStr(CurrentTcPath, PreviousTcPath))
	{
		SendMessage, 1075, 2049, , , ahk_class TTOTAL_CMD
		SetTimer, CheckAndSetToFirstItem, Off
		SetTimer, StopChecking, Off
	}
	PreviousTcPath := CurrentTcPath
}

StopChecking()
{
	SetTimer, CheckAndSetToFirstItem, Off
}

GetCurrentTcPath()
{
	SendMessage, 1074, 17, , , ahk_class TTOTAL_CMD
	WinGetText, PathInTC, ahk_id %ErrorLevel%
	Return, SubStr(PathInTC, 1, -3) . "\"
}
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.
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *solid »

Hacker wrote: 2022-03-12, 19:00 UTC Here is an AHK script that reacts to Enter being pressed and after checking if a subdir has been entered sets the focus on the first item:
HTH
Roman
Is there somewhere a list of all commands that TC supports for SendMessage?
Thx.
Post Reply