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

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

Post by *MVV » 2011-11-14, 07:17 UTC

TCFS2 2.0.4.300:
+ new redraw function
+ new regmsg function
+ new ini, set_ini functions
* wrong environment variables processing in redirection (after 2.0.3.256)
* test function is renamed to eval (old name is supported for compatibility too)

TCFS2Tools 1.4.2.130:
+ 64-bit version of module added
+ commands to write numbers to internal array and read them back

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

Post by *MVV » 2012-02-16, 06:37 UTC

rilley wrote:Hello

I set total commander in config ini, to start without button bar = Successful
I set an hot key to the TCFS2 command but=tb1 tb0, witch is
tb0=delay(5000) tcm(2901), eval(hasButtonBar), tb1 Buttonbar Hide
tb1=tcm(2901), eval(!hasButtonBar), tb0 ; Buttonbar Show
= Successful


When I press the specific key, the button bar shows up, and after 5 seconds it hide it self's,

My question is:
How can I make to hide it automatically when I click an button from the buttonbar?

THANKS!!!
First of all, I don't recommend to replace standard TCFS2.ini commands like tb1 and tb0, you may always create an item with another name.

As I got it, you want to have a command that shows BB for 5 secs or hides it immediately if it is visible, correct? It is possible to create single user-command that will do both things (note that I'm using standard tb0 command from sample TCFS2.ini here):

Code: Select all

Command: TCFS2.exe
Parameters: /ef "run_item(tb0), eval(hasButtonBar) | tcm(2901) delay(5000) run_item(tb0)"

Code: Select all

Command: TCFS2.exe
Parameters: /ef "if(hasButtonBar, run_item(tb0), tcm(2901)+delay(5000)+run_item(tb0)"
Both examples do the same thing, it is matter of taste which one to use.
You don't need to modify TCFS2.ini at all, just create user-command with suggested parameters. You may then add it onto BB and assign a hotkey for it. And TCFS2 will hide BB on button click or hotkey press.

rilley
Junior Member
Junior Member
Posts: 39
Joined: 2008-08-24, 16:42 UTC

Post by *rilley » 2012-02-16, 10:04 UTC

Hi back,

MVV: If I use one of your param, it help me a lot, if I press twice the same hot key, the buttonbar hide it self back, and it is good. (first time when I did it with my method of modify tcfs.ini was very buggy)

One question, is there any way, when I click an randomly button from the button bar, then to hide the buttonbar immediately, so I will not need to wait 5 seconds?





Thanks for support!

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

Post by *MVV » 2012-02-16, 10:08 UTC

rilley wrote:One question, is there any way, when I click an randomly button from the button bar, then to hide the buttonbar immediately, so I will not need to wait 5 seconds?
You can't do it using just TCFS2. You need a hook.

rilley
Junior Member
Junior Member
Posts: 39
Joined: 2008-08-24, 16:42 UTC

Post by *rilley » 2012-02-16, 10:09 UTC

So in that case I need to drop the case :D

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

Post by *MVV » 2012-03-12, 10:04 UTC

TCFS2Tools is updated. Now separator functions work with vertical panels arrangement.

TCFS2Tools 1.4.2.150

sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp » 2012-08-28, 16:50 UTC

Hi MVV, I need to understand something. I want to create a toolbar button that cycles between several view states.
Simplest case is a thumbnails view toggle: click and it turns on thumbnails, click again and it turns on full list, click again for thumbnails, click again for full list, and so on. Is doing a toggle like this possible with your tools?
Second case, three way toggle, click for thumbnails, click again for full list, click again for brief list, repeat ... Is this possible?
If so, do you have some examples to start from?
Thanks.

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

Post by *MVV » 2012-08-28, 18:54 UTC

It is possible except changing toolbar button icon. TCFS2Tools provides some commands to detect current view mode and you can use cm_commands to change mode so it is possible to create such buttons (some people already did them).

You can look how command switch_viewmode_S works (in sample TCFS2.ini), it uses macroses L_viewMode and R_viewMode. But AFAIK not all modes can be detected in such way (read description for command LeftGetViewMode in TCFS2Tools Readme).

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

Post by *MVV » 2012-11-17, 16:28 UTC

TCFS2 2.0.5.310:
+ set ini string values
+ remove ini keys

E.g. set new default bar:
TCFS2 /ef "set_tcini(`Buttonbar`, `Buttonbar`, `%COMMANDER_PATH%\Bars\Default.bar`)"
E.g. delete 20th entry from [MkDirHistory]:

Code: Select all

TCFS2 /ef "set_tcini(MkDirHistory, 20, )"

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

Post by *MVV » 2013-05-24, 18:22 UTC

New version has been released. Main addition is send command that allows sending keypresses to active TC window. Also new tcd command allows to change dirs in TC panels. There are some examples in sections 1.2 and 2 of Readme file.

TCFS2 2.1.0.394:
+ tem function is now able to pass parameters
+ send function allowing to pass keypresses
+ additional parameters for tcm, tem and msg functions allowing to send messages asynchronously
+ findwnd function finds TC window
+ sendmsg function sends messages to specific TC window
+ optional parameter for send function allows to specify window
+ tcd function changes dir(s) in TC
+ terminate button in report error message
* strings may now contain syntax characters like ';', '|' and '('
* strings may now be passed as substituted parameters

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

64-bit Tcfs2Tools Glitch

Post by *SWZ » 2013-07-07, 00:55 UTC

Hi,

First of all, many thanks for these little charming apps. I love them, especially Tcfs2Tools, it works great except one thing.

I hide TC's Main Menu using Tcfs2Tools, then call the Main Menu pressing alt key, and works flawlessly so far. Selecting a menu item after, however, does nothing in 64-bit TC, nothing happens at all. It behaves as expected in 32-bit TC, btw. And, the same symptom with TrackMainMenu.

On the other hand, although there is no more to report in behavioral aspect, there exist one for display aspect. No 'underline' to acceleration keys in temporary main menu popped up by alt key. What I mean is: When the main menu enabled/shown, if you press alt key, underlines to the acceleration keys appear, like 'F&TP'. However, none with the temporary popped up main menu when the main menu is disabled/hidden via Tcfs2Tools, just plain like 'FTP', with both 32-bit & 64-bit TC.

Would you take a look into this? Thanks again.

SWZ

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

Post by *MVV » 2013-07-07, 09:56 UTC

Great that you like it. :)
Selecting a menu item after, however, does nothing in 64-bit TC, nothing happens at all.
Thank you for your report, I can reproduce it with TCx64 so I'll try ti fix it.
No 'underline' to acceleration keys in temporary main menu popped up by alt key.
I can't control underlining. Maybe you have enabled Windows option to hide shortcut keys? With this option shortcut keys are only visible when you open menu via keyboard (and I don't know how it works with programmed displaying). I always disable this stupid option in all Windows versions I work with and I always see underlined letters.

Posted after 2 hours 30 minutes:

I'm afraid menu items doesn't work in TCx64 because of some Lazarus stuff... If I don't hide menu after choosing menu items all work fine...

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

Post by *SWZ » 2013-07-07, 13:04 UTC

Great that you like it. :)
I also love your autorun plugin. :)
I've been using AHK script to do the job via (G)SetMenu and TrackPopupMenu APIs, but, it became a little tedious in multiple TC's environment which I've been frequently exposed to after upgrading to Windows 8 recently, but more than that I prefer in-process to out-of-process control. The only concern about in-process control is that it may cause the process unstable, but, I've never observed any instability with your plugins, and they have small foot prints, almost felt like native TC functionality. Great job!
I can't control underlining. Maybe you have enabled Windows option to hide shortcut keys?
I used to turn on underline which was set to off defaultly. But, I decided to leave it to the default after upgrading to Windows 8. I can turn it on, back to old habit, but before doing that I got an idea. How about this?
When showing the menu after intercepting alt key press: 'enable the menu' then send/simulate (another) 'alt key' press

The simulated alt key press should not be intercepted, of course. Although I don't know if it's possible to differentiate simulated keys from actual key presses without hook, maybe can simply ignore the 'first' alt key after simulating alt key... What do you think about it?
I'm afraid menu items doesn't work in TCx64 because of some Lazarus stuff...
Oh, I wasn't aware of the Lazarus stuff.
If I don't hide menu after choosing menu items all work fine...
No closing of the menu bar after selecting a menu item would be fine with me.
Thank you very much for taking a look into it.

SWZ

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

Post by *MVV » 2013-07-07, 16:06 UTC

I also love your autorun plugin.
It's not mine BTW. :)
When showing the menu after intercepting alt key press: 'enable the menu' then send/simulate (another) 'alt key' press
That's how I do it. I catch (no hooks but subclass so I can do anything) system menu command (uMsg==WM_SYSCOMMAND && wParam==SC_KEYMENU) and then show menu and pass it to TC so it can show and process menu normally. After processing I hide menu back.
Oh, I wasn't aware of the Lazarus stuff.
TCx64 is built with Lazarus, not Delphi, so I think it has some non-standard side effects... For some strange reason TCx64 doesn't process menu messages if menu is absent.
No closing of the menu bar after selecting a menu item would be fine with me.
But this means that it won't hide after tracking... Maybe you can try to send two commands in sequence using TCFS2: show menu and simulate Alt keypress (or send track command to TCFS2Tools) so it will work already now.

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

Post by *SWZ » 2013-07-08, 00:05 UTC

That's how I do it. I catch (no hooks but subclass so I can do anything) system menu command (uMsg==WM_SYSCOMMAND && wParam==SC_KEYMENU) and then show menu and pass it to TC so it can show and process menu normally. After processing I hide menu back.
I see. Thanks for the explanation.
But this means that it won't hide after tracking...
I now understand what it was implying...
Maybe you can try to send two commands in sequence using TCFS2: show menu and simulate Alt keypress (or send track command to TCFS2Tools) so it will work already now.
Actually I've been using a similar method which was supposed to be temporary. I assigned F9 hotkey to SwitchMainMenu, then, press hotkeys F9 F10 consecutively, which almost felt like a single hotkey.

SWZ

Post Reply