TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

Code: Select all

[Items]
longComments=if(L_isActive, if(L_viewMode!=100, tem(`cm_SrcComments 1`) + tcm(910), tem(`cm_SrcComments -1`) + tcm(909)), if(R_viewMode!=200, tem(`cm_SrcComments 1`) + tcm(910), tem(`cm_SrcComments -1`) + tcm(909)))

Code: Select all

tcfs2 /ei longComments
After I used this command, I found that the TC view switching became disordered. When I manually switch the TC view, the window also changes to 100%. why?
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *Fla$her »

Try this:

Code: Select all

longComments=if(L_isActive, varset(1, L_viewMode==100?0:1), varset(1, R_viewMode==200?0:1)) tem(`cm_SrcComments `2-varget(1)) tcm(909+varget(1))
Or this:

Code: Select all

longComments=if(L_isActive, varset(1, L_viewMode==100?1:0), varset(1, R_viewMode==200?1:0)) tem(`cm_SrcComments `1+varget(1)) tcm(910-varget(1))
Instead of 'long', it's better to write 'switch' or 'toggle'.

Also keep in mind that cm_SrcComments (Ctrl+Shift+F2) remembers the position of the separator in the same way as cm_SrcQuickView (Ctrl+Q), i.e. after the first execution of the above command it will have the same effect.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

Thanks a lot
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *Fla$her »

By the way, it's possible to make it even shorter:

Code: Select all

longComments=varset(1, S_viewMode==300?1:0) tem(`cm_SrcComments `1+varget(1)) tcm(910-varget(1))
or

Code: Select all

longComments=varset(1, S_viewMode==300?0:1) tem(`cm_SrcComments `2-varget(1)) tcm(909+varget(1))
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

You are truly striving for excellence.
Indeed, assessing the view of the current panel is simpler than assessing the currently activated panel.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

Code: Select all

/ef "varset(1, msg(1074,msg(1074, 1000)+1008)) loop(@<=(3) && if(varget(1)-1, tcm(523)+tem(`em_SuffixWithDate`), delay(1000)))"
Does varget(1) always get the latest value, or does it get the value set by varset the first time?
My goal: To determine whether LOADSEARCH has finished executing by checking for the existence of 'Return to Parent Directory'.

This method will not wait for tem to finish executing, there must be a delay before varset.

Code: Select all

/ef "tem(`em_LOADSEARCH`) varset(1, msg(1074,msg(1074, 1000)+1008)) loop(@<=(3) && if(varget(1)-1, tcm(523)+tcm(2400), delay(1000)))"
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *Fla$her »

yahuu wrote: 2024-11-22, 04:22 UTC Does varget(1) always get the latest value
Sure. var = variable.
TCFS2.exe /ef varset(1,1) varset(1,2) varset(1,3) tcm(-1,1) eval(settext_wait(varget(1),findwnd(Static,,findwnd(#32770))))"


What do you have in em_LOADSEARCH? What's in the stored settings?
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

Fla$her wrote: 2024-11-22, 05:05 UTC What do you have in em_LOADSEARCH? What's in the stored settings?
It's a simple emcmd for LOADSEARCH.

[em_LOADSEARCH]
cmd=LOADSEARCH
param===xxxx

If each time in the loop retrieves the latest value, then there is no problem.Thanks!
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *Fla$her »

You haven't answered the second question about xxxx.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

Fla$her wrote: 2024-11-22, 10:24 UTC You haven't answered the second question about xxxx.
xxxx is a search template I saved, there is nothing special.
Used the == of LOADSEARCH to call this template.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *Fla$her »

yahuu wrote: 2024-11-26, 16:20 UTCthere is nothing special.
Not the point. It's important to understand whether it's possible to cope with the task otherwise.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

Fla$her wrote: 2024-11-26, 20:19 UTC Not the point. It's important to understand whether it's possible to cope with the task otherwise.
My initial requirement was to use saved rules to query a specified file and then perform multi-rename using the saved rules. This process only requires one hotkey.

Currently, it has been implemented through tcfs2 and tc. Thank you.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *Fla$her »

yahuu wrote: 2024-11-30, 15:23 UTC My initial requirement was to use saved rules to query a specified file
Do you mean @<list path> in the second field? If that's the case, then I guessed it. In this case, you need to abandon LOADSEARCH in favor of LOADLIST0 (provided that the names/paths in the list are full-fledged, i.e. without masks), which will be much faster.
Overquoting is evil! 👎
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

👌,Thanks a lot.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
User avatar
yahuu
Member
Member
Posts: 122
Joined: 2015-01-15, 03:19 UTC

Re: TCFS2 + TCFS2Tools: Full-screen mode for TC etc

Post by *yahuu »

Q1: Can this be rewritten as ?: expression?

Code: Select all

if(msg(1074,msg(1074, 1000)+1004)>0, tem(`em_ToZipWith7z2`,1), tem(`em_ToZipWith7z1`,1))
I didn't succeed using it this way.

Code: Select all

msg(1074,msg(1074, 1000)+1004)>0 ? tem(`em_ToZipWith7z2`,1) : tem(`em_ToZipWith7z1`,1)
Q2:Can tcfs2 loop through %L or %P%S? I want to compress each selected file into a separate archive. Currently, I am using tcimg,But it responds too slowly.
License #301983 (2016)
TC 11.51 32+64bit on 10 (21H2) 64bit, 'Everything' 1.5.0.1388a
Autorun 2.2.18.1
Post Reply