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

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

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

Post by *MVV »

So how have you solved the problem? I haven't got it. :)
Another question, would you please tell me what exactly the binary strings tcfs2.exe will send by wm_copydata in this command :
Well, what TCFS2 sends for CD command, may be built like this:

Code: Select all

sprintf(buf, "%s%s\r%s%s\0%s", leftPath ? "\EF\BB\BF" : "", leftPath, rightPath ? "\EF\BB\BF" : "", rightPath, flags)
Where leftPathUtf8WithBom or rightPathUtf8WithBom is empty when no path is needed, or a path with BOM prefix.
So for your command TCFS2 sends this:

Code: Select all

ef bb bf 64 3a 5c 66 6f 6f 2e 7a 69 70 0d ef bb bf 41 00
Your problem is that you pass "A" as a right path, not as the flags. You should send this command like this instead:

Code: Select all

TCFS2 /ef "tcd(`d:\foo.zip`,,A)"
So TCFS2 will send this instead:

Code: Select all

ef bb bf 64 3a 5c 66 6f 6f 2e 7a 69 70 0d 00 41 00

User avatar
dindog
Senior Member
Senior Member
Posts: 277
Joined: 2010-10-18, 07:41 UTC

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

Post by *dindog »

MVV wrote:
2019-12-09, 06:23 UTC
So TCFS2 will send this instead:

Code: Select all

ef bb bf 64 3a 5c 66 6f 6f 2e 7a 69 70 0d 00 41 00
strange... I try sending ef bb bf 64 3a 5c 66 6f 6f 2e 7a 69 70 0d 00 41 00, TC still response randomly, sometimes it open the archive, sometime it doesn't.

MVV wrote:
2019-12-09, 06:23 UTC
So how have you solved the problem? I haven't got it. :)
I was testing in cmd console, and I can see TC, in background, show the menu, then close without response to the "d", and then a "d" can send to quick search input... Now I am calling tcfs2 in TC's button:
cmd: tcfs2.exe
param: /ef "tcm(3009,1) send(`d`) delay(50) tcm(4006,1) delay(20) tcm(3009,1) send(`d`) delay(50) tcm(4006,1)"
It works. First source panel tab right-menu show, and the "d" send, then switch to target panel, repeat the manueveur, then switch back to the original source panel, all action were done correctly
I reckon your TC didn't have the focus thinking is correct

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

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

Post by *MVV »

Yes, if you test from console, probably it could take focus. This is the reason why it is hard to debug send command problems. :)

User avatar
kesdoputr
Member
Member
Posts: 159
Joined: 2007-12-27, 12:38 UTC

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

Post by *kesdoputr »

2MVV
Hello, i have one question, if i want to send a command use TC's command line switch, how can i do?

ex.i want to locate to a file name playlist.mpl and then use lister to view it

Code: Select all

%COMMANDER_PATH%\TOTALCMD.EXE /O /A /S "%SystemDrive%\Working\playlist.mpl"
how can i insert above command into the below command? I want to put it before the delay

Code: Select all

param=/u- /ef "delay(150) tcm(903)"
Thanks for your watching.

User avatar
kesdoputr
Member
Member
Posts: 159
Joined: 2007-12-27, 12:38 UTC

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

Post by *kesdoputr »

Reply by myself, it seems ok to use

Code: Select all

tcd(`%%SystemDrive%%\Working\playlist.mpl`,, s)
to locate the file.

User avatar
kesdoputr
Member
Member
Posts: 159
Joined: 2007-12-27, 12:38 UTC

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

Post by *kesdoputr »

2MVV
Sorry for a problem, i use this command to create a list file to target panel , focus traget and use lister to view it

Code: Select all

param=/u- /ef "tcd(, `%%SystemDrive%%\Working`, s) delay(150) tem(`em_MakePlaylist`) delay(150) tcd(, `%%SystemDrive%%\Working\playlist.mpl`, s) delay(500) tcm(4006) delay(500) tcm(903)"
It's work fine, but in some condition(maybe pc is busy), i can't see tc focus to target panel(with tcm 4006)
and then the lister view(tcm 903) will perform on incorrect file.

I have try to increase the delay time but the error still will occur sometimes, is there a improvement of my command to prevent this condition?

Thanks for your reading.

PS.I find in readme, is the async_mode will help? But i have no idea where to add the async_mode switch.

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

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

Post by *MVV »

Well, async mode is only required when you want to start some long command (e.g. one that shows configuration dialog) and need to do some other commands before that command's finishing (e.g. send some keypresses).
So you don't need async mode for your current task. On the contrast, you need to do all commands one by one, when a previous command is finished.

You should try playing more with delays, I'm not sure if TC executes EM-commands synchronously, i.e. if TC waits until your playlist is really created before executing CD to it. Or you can just try executing TOTALCMD.exe with /S=L switch to open Lister in separate process, it doesn't require jumping to the file, but it requires a EM-command for executing Lister in separate process or a generic EM-command for executing arbitrary process (that will accept program name and arguments from its %A parameter).

User avatar
kesdoputr
Member
Member
Posts: 159
Joined: 2007-12-27, 12:38 UTC

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

Post by *kesdoputr »

Thanks for your reply, i will try to use /S=L for my condition to see if it's better.

Post Reply