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: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I've made some workaround for Lazarus, now I wait for 2 messages before hiding menu (it seems to be enough).
It is quite hard to see the difference when menu is opened by Alt but it is visible when menu is opened by TrackMainMenu (because I have to show menu for a moment before sending a command and then wait for mentioned 2 messages).

Please test it.

TCFS2Tools 1.4.2.174
SWZ
Junior Member
Junior Member
Posts: 10
Joined: 2013-07-07, 00:37 UTC

Post by *SWZ »

Great, it works now! Many thanks.

One glitch I observed was, if I selected view mode through the menu bar, the quick search was somehow screwed up. I mean, if I press 't', for example, inside the active pane, the cursor should have landed at 't*' in my case but it landed incorrectly at, e.g., 'b*'. Strangely, the same symptom even after the menu bar was enabled. No problem with 32-bit TC, on the other hand.

Although I never noticed it before I'm not sure if it's a side effect of Tcfs2Tools or a glitch of 64-bit TC itself, as I never actually changed the view mode through menu bar in the past as far as I can recall and I already experienced a slight misbehavior of the cursor in 64-bit TC.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Although I never noticed it before I'm not sure if it's a side effect of Tcfs2Tools or a glitch of 64-bit TC itself, as I never actually changed the view mode through menu bar in the past as far as I can recall and I already experienced a slight misbehavior of the cursor in 64-bit TC.
I can really reproduce it, even with clean INI, but only with 'Letters only' quick search mode, even when I switch view mode via keyboard. I've reported it as a bug.

Great, it works now! Many thanks.
Glad to hear that. I've released it. :)


TCFS2Tools 1.4.3.180:
+ GetWorkArea is now able to return also work area position
+ workaround for idle menu items in 64-bit version when menu is hidden (Lazarus thing)
+ adjust popup menu dimensions in 64-bit version
* wrong work area size returned in case of left or top taskbar position
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Post by *jinsight »

Can anyone post code to toggle between a 50%/50% vertical panel split and a 100% single panel? Thanks for any assistance.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Any of these should work:

Code: Select all

TCFS2.exe /ei "sp_set_active(sepPos==50 ? 100 : 50)"

Code: Select all

TCFS2.exe /ef "if(sepPos==50, run_item(sp_set_active, 100), tcm(909))"
Or if you need panels one above other and switch to side by side with 100% separator position,

Code: Select all

TCFS2.exe /ef "if(sepPos==50, if(isVerticalPanels, tcm(305))+run_item(sp_set_active, 100), tcm(909)+if(!isVerticalPanels, tcm(305)))"
Note that you need TCFS2Tools to be installed correctly for separator operations.
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

jinsight wrote:Can anyone post code to toggle between a 50%/50% vertical panel split and a 100% single panel? Thanks for any assistance.
Use cm_50Percent and cm_100Percent?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

white,
He wants to use single button/hotkey for switching between 50/100. :)
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Post by *jinsight »

MVV,

Exactly what I needed. Thank you very much.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

There were a lot of days since last release...

TCFS2 2.2.0.444:
+ loop function
+ special handling of double quotes: ignoring them when inside grave quotes
+ varcnt, varget, varset functions
+ verbatim mode for send function

+ complex strings may now be built from multiple strings and calculated numbers
* warn about end of line when reading function parameters
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

TCFS2Tools 1.4.2.188:
+ GetPanel command to get panel window handles
mrle
Junior Member
Junior Member
Posts: 58
Joined: 2005-04-25, 21:44 UTC

Post by *mrle »

Huh MVV, your exe will kill me ... my head will explode.

How to write a parameter for TCFS2.exe, in order to execute simply switcing TC separator for active panel to 100% (first step), and to 50% (second step)?

I don't have any knowledge of C language, but say it on mother tongue - without any "if".
Simply toggle vertical separator of active panel to 100%, regardless of whether it is at 1,2%, 18.9%, 50%, 63.2%, 100% ... whatever, on first step (if it is already on 100% - leave it there) ... and on second step simply toggle it to 50% (if it is pushed somewhere after the first step, to 99% or whatever - ignore that).

Exactly what would work TC commands: "cm_100Percent" and "cm_50Percent".

Something like this:

Code: Select all

/ei "sp_set_active(sepPos==100 : 50)"
... this, of course, doesn't work. :)

(Btw... maybe this is possible only with TCFS2.exe, without loading the TCFS2Tools.dll, since it does not require any information where the separator is located before moving?)

---------------------------------------------------------------------

The basic idea is to make the F12 button to toggle between "normal view" and "full-screen/thumbs view" with commands:

- TCFS2: 100%/50% separator
- TC: cm_visButtonbar, cm_visStatusbar, cm_visKeyButtons ... etc. (only visible Title bar and Mein menu / back to "normal view")
- TC: cm_SrcThumbs (Thumbnail/Full view)

---------------------------------------------------------------------

I don't know, have not tried it yet, will TC to be confused with this number of commands?

Perhaps all this commands leave to TCFS2.exe, if possible? ... but that would definitely kill me, and I have two small children :)

Leave everything to TC: split "cm_50Percent" (and all other commands) to F11, and "cm_100Percent" (with others) to F12?

I have a carousel in my head ...

TIA
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, since you want to set active panel width to 100%, you should check active panel width, so it depends on active panel. Try one of these:

Code: Select all

TCFS2 /ei "sp_set_active(sepPos == (L_isActive ? 100 : 0) ? 50 : 100)"
TCFS2 /ei "sp_set_active(if(sepPos == (L_isActive ? 100 : 0), 50, 100))"
These will switch to 50% if current width is 100%, or to 100% in all other cases.
... this, of course, doesn't work. :)
Of course, and should cause a error because it must be check_value ? yes_value : no_value and not just check_value : yes_value.
(Btw... maybe this is possible only with TCFS2.exe, without loading the TCFS2Tools.dll, since it does not require any information where the separator is located before moving?)
It is impossible because TCFS2Tools does moving separator (older TCFS2 releases did it itself but some stupid virus scanners like NOD32 don't like when application uses innocuous functions like ClipCursor).
Simply toggle vertical separator of active panel to 100%, regardless of whether it is at 1,2%, 18.9%, 50%, 63.2%, 100% ... whatever, on first step (if it is already on 100% - leave it there) ... and on second step simply toggle it to 50% (if it is pushed somewhere after the first step, to 99% or whatever - ignore that).
Such command requires special step number detection since step number can't be deduced from panel width.
The basic idea is to make the F12 button to toggle between "normal view" and "full-screen/thumbs view"
As I see, you want a single button to switch to full-width fullscreen thumbnail view mode. Am I correct? TCFS2 may hide everything except file panel and switch to thumbs view:

Code: Select all

TCFS2 /ef "if(hasCaption, locktc(1) + run_item(c0) + run_item(mm0) + run_item(tb0) + run_item(db0) + run_item(dc0) + run_item(cd0) + run_item(th0) + run_item(sb0) + run_item(cl0) + run_item(kb0) + tcm(269) + run_item(sp_set_active, 100) + locktc(0) + show(3) + save_undo(fs_thumbs_undo), show(9) + locktc(1) + run_action(fs_thumbs_undo) + tcm(302) + run_item(sp_set_active, 50) + locktc(0)) run_item(update)"
This command checks if window title exists and does switch to fullscreen (hides title, all panels and even menu - you can press Alt to access it or remove mm0 call if you don't like it, switches active panel width to 100%) or undoes changes (restores title, panels and menu, activates full view and sets separator to 50%). It may look weird (I know, it does :)) but it doesn't require TCFS2.ini modification. With file modification command is much easier (looks like fs2 command):

Code: Select all

[Items]
fs_thumbs_switch=if(hasCaption, locktc(1) + run_action(fs_thumbs) + tcm(269) + run_item(sp_set_active, 100) + locktc(0) + show(3) + save_undo(fs_thumbs_undo), show(9) + locktc(1) + run_action(fs_thumbs_undo) + tcm(302) + run_item(sp_set_active, 50) + locktc(0)) run_item(update)

[Actions]
fs_thumbs=c0 mm0 tb0 db0 dc0 cd0 th0 sb0 cl0 kb0
And command now looks just like this:

Code: Select all

TCFS2 /ei fs_thumbs_switch
mrle
Junior Member
Junior Member
Posts: 58
Joined: 2005-04-25, 21:44 UTC

Post by *mrle »

^

Thank you MVV for your support. I didn't put the above parameters, but they clarify me some things.
Also I could not deal with these "c0", "c1" ... things in INI, and forgot to mention in the first post that I want visible Title bar.

At the end found this is exactly what I looking for ...

Code: Select all

TCFS2.exe /u- /ef "set_style (# & ~ $ 00000010) tcm (909) tcm (2901) tcm (2902) tcm (2907) tcm (2908) tcm (2909) tcm (2911) tcm (2916) tcm (269), style (# & $ 00000010) tcm (2901) tcm (2902) tcm (2907) tcm (2908) tcm (2909) tcm (2911) tcm (2916) tcm (269) | set_style (# | $ 00000010) tcm (910) tcm (2901) tcm (2902) tcm (2907) tcm (2908) tcm (2909) tcm (2911) tcm (2916) tcm (269)"
FullScreen (with Title and Menu bars) + 100% separator + Thumbs = switch (on F12),
without installing/loading tcfs2tools.dll, without any "if", even without tcfs2.ini. Just exe and parameter.
Works like a charm.

Thanks and keep up the good work.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I see, you've read manual carefully:)
Also I see that your command will work incorrectly if some of panels are in wrong state. E.g. if statusbars are hidden and you execute command to hide it, it will be shown (commands like sb0 check if command should be sent before). Also, if you have right panel active, your command will hide it instead of expanding.
However it is good if it does what you need.
mrle
Junior Member
Junior Member
Posts: 58
Joined: 2005-04-25, 21:44 UTC

Post by *mrle »

MVV wrote:Also, if you have right panel active, your command will hide it instead of expanding.
No, it is always expanding active panel.

(also works with vertically arranged panels, which I never use)
Post Reply