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

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

Hacker wrote: 2023-06-08, 08:40 UTC linuxy,
So do I understand correctly, that when you are in C:\UpFolder\SubFolder, and go up to C:\UpFolder, you want the cursor not to be placed on SubFolder, but on the first item in UpFolder?

Roman
Hello! Thank you for asking. Not quite, but yes partially correct. I'm mainly trying to simply "focus" TC on the first item (file or folder) in a subdirectory when I open it and enter it. I'm not too worried about going *up*, although that would be nice too lol.

So, I am in C:\UpFolder\ and I want to double click and open/enter C:\UpFolder\SubFolder.
Once I do that, I would like TC to simply "focus" (select) the first file/folder in C:\UpFolder\SubFolder, not the [ .. ]

Basically, if I wanted to quickly drill down into a nested subfolder a few times,
I have to hit the folder, arrow down 1 keypress, hit next subfolder, arrow down, hit the folder, arrow down 1 keypress, hit the folder, arrow down 1 keypress, etc. it's quite tedious. The arrow down keypress is needed to un-select the default [ ..] parent directory that TC always highlights by default every time you enter a folder.

So, I'm simply trying to bypass the [ .. ] parent directory as an "item" so TC focuses on the actual first item/file/folder in the current directory I've opened.

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

Re: Folder help please (cm_GoToFirstEntry)

Post by *petermad »

linuxy wrote:I'm not too worried about going *up*,
That is contradictory to what you wrote earlier:
linuxy wrote: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.
If you are not worried about what happens when going "up" you can still use the solution I gave here: https://ghisler.ch/board/viewtopic.php?p=410629#p410629
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.50b4 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: 2023-06-08, 12:31 UTC
linuxy wrote:I'm not too worried about going *up*,
That is contradictory to what you wrote earlier:
linuxy wrote: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.
If you are not worried about what happens when going "up" you can still use the solution I gave here: https://ghisler.ch/board/viewtopic.php?p=410629#p410629
My apologies. I appreciate your time helping me with this. I can see now that I'm not being clear, sorry. Let me try again. The reason why I am still pursuing a solution is that, your solution doesn't seem to work. I added it, yet it never (never) selects the first file/folder it always selects/stays on the default [ .. ]

Can you please tell me why this might be happening?
(for example, I lost you when you wrote "and then use that View Mode in an Auto Switch Mode for an L rule (or a D rule)." but I added the cm entry already). I simply use the same view mode 24/7, and that's the view mode I added the cm autorun to)

See attached.

https://i.ibb.co/sCsZ1DW/cm.jpg
https://i.ibb.co/MCm9ppC/auto3.jpg
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

Oh wait, I feel so silly. Once I added the L1235, it is working 100% correct. I love TC so much!

Can you please tell me how you arrived at this "code" how does L1235 do anything? Like, what's L vs. D? What is 1235?

I'd like to learn more about that, thank you so much!!!!! :)
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Folder help please (cm_GoToFirstEntry)

Post by *Hacker »

linuxy,
tweak the script so it *always* selects the first file/folder in the directory, regardless of when the last time I entered it was?
I works like that for me flawlessly, both in TC 32-bit and 64-bit. Are you using Enter to enter the SubFolder? The script reacts to an Enter keypress, then keeps checking the current path in TC each 50 ms for 5 seconds. If the path is new and is a subfolder of the previous path, it sets the cursor position to the first item. If the path did not change within the 5 seconds or isn't a subfolder of the previous path, the script doesn't do anything and stops checking the path until the next Enter keypress is detected.

Can you tell me if:
1. the script does work for you as described above, and
2. what speceifically you would like to have changed?

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
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Folder help please (cm_GoToFirstEntry)

Post by *Hacker »

linuxy,
Can you please tell me how you arrived at this "code" how does L1235 do anything? Like, what's L vs. D? What is 1235?
I'd like to learn more about that, thank you so much!!!!!
Click on the Help button in the dialog window with the 1235 ;)

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
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *petermad »

Can you please tell me how you arrived at this "code" how does L1235 do anything? Like, what's L vs. D? What is 1235?
L stands for "Drive with drive letter". 1= USB Harddisk, 2= USB Stick, 3= Harddisk/SSD, 4= Network drive, 5= CD/DVD, 6 = RAM disk - you can see all these by clicking the [>>] button to the left of the field.

You could also use D instead of L.
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.50b4 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 »

I'm so happy with this thank you thank you!
One final question, how would I go about disabling this 'mode'?

For example, let's say I prefer to have the default TC behavior (where it remembers the previously entered directory, doesn't auto-select the first item, etc.) - how can I 'ignore' this without losing the configuration to be re-enabled in the future?

I tried to revert back to the defaults just to experiment and learn differences, but now no matter what I do, TC always select the first item lol :p

Is there a way to disable this mode and be able to come back to it later? Just learning TC, that's all. I'm going to use this cm_GoToFirstEntry mode all the time, but I'm just curious how to temporarily disable it and use TC default behavior without losing my setup?

:)

Thank you!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Folder help please (cm_GoToFirstEntry)

Post by *Horst.Epp »

Use this button to toggle Auto-View

Code: Select all

TOTALCMD#BAR#DATA
cm_ToggleAutoViewModeSwitch

wcmicons.dll
Toggle AutoView

0
2947
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *petermad »

2linuxy
cm_ToggleAutoViewModeSwitch works fine here for disabeling the automatic go to first entry view.

All your https://ibb.co links are currently not working (Error: The connection was refused when attempting to contact ibb.co.)
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.50b4 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: 2023-06-09, 22:26 UTC 2linuxy
cm_ToggleAutoViewModeSwitch works fine here for disabeling the automatic go to first entry view.

All your https://ibb.co links are currently not working (Error: The connection was refused when attempting to contact ibb.co.)
Bummer, I think there was a problem with the hosting image website sorry!

I forgot I had the AHK script running in the background so it was conflicting, I'm sorry. I have a new baby and my brain I swear is dead. :(

I was looking for a way to selectively disable the 'rules' as needed, without having to disable the entire "auto view" chain of rules, or keep them all enabled, does that make sense?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Folder help please (cm_GoToFirstEntry)

Post by *petermad »

2linuxy
Basically, if I wanted to quickly drill down into a nested subfolder a few times,
I have to hit the folder, arrow down 1 keypress, hit next subfolder, arrow down, hit the folder, arrow down 1 keypress, hit the folder, arrow down 1 keypress, etc. it's quite tedious. The arrow down keypress is needed to un-select the default [ ..] parent directory that TC always highlights by default every time you enter a folder.

This button will basically do what you describe:

Code: Select all

TOTALCMD#BAR#DATA
cm_GoToDir,cm_GoToFirstEntry

wciconex.dll,37
Go in to the first folder of folder under cursor
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *Fla$her »

2linuxy
Let me suggest a solution that in my opinion looks more optimal:
  1. Unpack the archive contents into %COMMANDER_PATH%\Addons\TCFS2\.
  2. Paste this at the end of usercmd.ini:

    Code: Select all

    [em_ReturnAndGotoNextForDir]
    cmd=%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef varset(1,msg(1074,1000)+1006) if(!msg(1074,varget(1))*msg(1074,varget(1)+2),tcm(1001),tcm(1001)+if(!msg(1074,varget(1)),tcm(2055)))
    [em_SwitchEnterMode]
    cmd=em_ReturnAndGotoNextForDir
  3. Bind em_SwitchEnterMode to Enter on the Misc. page.
  4. Switch the mode with the following button:

    Code: Select all

    TOTALCMD#BAR#DATA
    %COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef "if(ini(`%COMMANDER_PATH%\usercmd.ini`,em_SwitchEnterMode,cmd,`1001`),set_ini(`%COMMANDER_PATH%\usercmd.ini`,
    %Zem_SwitchEnterMode,cmd,`em_ReturnAndGotoNextForDir`),set_ini(`%%COMMANDER_PATH%%\usercmd.ini`,em_SwitchEnterMode,cmd,`1001`))"
    wciconex.dll,184
    Switch Enter mode
Overquoting is evil! 👎
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

I love this forum!!!! Thank you so much. TC is the best. 👍👍
linuxy
Junior Member
Junior Member
Posts: 33
Joined: 2022-03-03, 22:07 UTC

Re: Folder help please (cm_GoToFirstEntry)

Post by *linuxy »

Fla$her wrote: 2023-06-10, 07:04 UTC 2linuxy
Let me suggest a solution that in my opinion looks more optimal:
  1. Unpack the archive contents into %COMMANDER_PATH%\Addons\TCFS2\.
  2. Paste this at the end of usercmd.ini:

    Code: Select all

    [em_ReturnAndGotoNextForDir]
    cmd=%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef varset(1,msg(1074,1000)+1006) if(!msg(1074,varget(1))*msg(1074,varget(1)+2),tcm(1001),tcm(1001)+if(!msg(1074,varget(1)),tcm(2055)))
    [em_SwitchEnterMode]
    cmd=em_ReturnAndGotoNextForDir
  3. Bind em_SwitchEnterMode to Enter on the Misc. page.
  4. Switch the mode with the following button:

    Code: Select all

    TOTALCMD#BAR#DATA
    %COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef "if(ini(`%COMMANDER_PATH%\usercmd.ini`,em_SwitchEnterMode,cmd,`1001`),set_ini(`%COMMANDER_PATH%\usercmd.ini`,
    %Zem_SwitchEnterMode,cmd,`em_ReturnAndGotoNextForDir`),set_ini(`%%COMMANDER_PATH%%\usercmd.ini`,em_SwitchEnterMode,cmd,`1001`))"
    wciconex.dll,184
    Switch Enter mode
Hello thank you, but that link doesn't work for me. I don't understand it? (TCFS2)
Post Reply