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

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

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

Post by *kesdoputr » 2019-11-16, 02:31 UTC

Hello, just post here to see if it's problem with TCFS2 or TCFS2Tools or Maybe it's about TC itself.

Now i use darkmode in TC 9.5b5, use TCFS2&TCFS2Tools hide the menu and caption
And i create a TCFS2Tools.ini and it's content is

Code: Select all

[HideMenu]
MenuMode=1
To let the main menu display as popup.

I found in the dark mode, the menu size is different with normal mode.

When in normal mode(main and with submenu)
https://i.imgur.com/3aUIxyY.png
https://i.imgur.com/8hLStOR.png
My mnu has HELP_BREAK to let some menu show in right side
So there is a blank line between Configuration and Help

When in dark mode(main and with submenu)
https://i.imgur.com/vkEySPp.png
https://i.imgur.com/imGCroe.png
I found:
●The main menu size is smaller then the normal mode(sub menu is just a little smaller)
●The blank line shows as bright backcolor.
And i don't know if it's possible to drcrease the border thickness(with bright color) arround the menu.

Thanks for your watching.

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

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

Post by *MVV » 2019-11-18, 06:16 UTC

Wow, my menu is even dark in dark mode w/o any my action. :lol:
Unfortunately I have no any control of size and color of menu, TCFS2Tools just calls Windows function that displays a context menu, just like any other context menu.

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

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

Post by *kesdoputr » 2019-11-18, 10:02 UTC

OK, thanks your reply, now i use the default MenuMode=0 :D

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

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

Post by *kesdoputr » 2019-11-19, 19:36 UTC

Hello, i want to use TCFS2 change source dir to desktop, i try this command and it's work

Code: Select all

TCFS2.exe /u- /ef "tcd(`%$DESKTOP%`, , s)"
But when i write it to a em command i see the error message

Code: Select all

[em_test]
cmd=%COMMANDER_PATH%\PLUGINS\ETC\TCFS2.exe
param=/u- /ef "tcd(`%$DESKTOP%`, , s)"
https://i.imgur.com/tcdNRzk.png

Is there any wrong about my cmd? Thank you.

User avatar
Dalai
Power Member
Power Member
Posts: 6778
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

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

Post by *Dalai » 2019-11-19, 19:55 UTC

2kesdoputr
In the Parameters field you need to double percent signs because TC sees them as placeholders like %C, %P and so on. In other words %%$DESKTOP%% should work.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups

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

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

Post by *kesdoputr » 2019-11-19, 20:10 UTC

Dalai wrote:
2019-11-19, 19:55 UTC
2kesdoputr
In the Parameters field you need to double percent signs because TC sees them as placeholders like %C, %P and so on. In other words %%$DESKTOP%% should work.

Regards
Dalai
Oh %%$DESKTOP%% is work, thanks for you reply. :D

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

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

Post by *dindog » 2019-11-22, 08:51 UTC

2MVV
would you please detail a bit what is the data structure of sending em_command with parameters when the the string contain non-ascii characters.
it's ok to send unicode parameter by your tcfs2 with :

Code: Select all

tcfs2 /ef "tem(`em_cd C:\中文\`)"
but I didn't know how to convert the command string. I am using AHK unicode with:

Code: Select all

F10::
TC_SendData( "em_cd E:\测试2\", "EM")	 ; EM_ it's defined in usercmd [em_cd] cmd=cd  param=%A
return

F11::
TC_SendData(Chr(0xFEFF) "d:\tc\" "`r" Chr(0xFEFF) "E:\测试2\ビデオゲームミュージック\", "LR")	 ; CD   Command: (SourceDir - TargetDir)
return

/*
TESTED AND WORKING ON: AHK_L v1.1.21.03 UNICODE X32 + Win7 X32 + TC 8.51a
-------------------------------------------------------------------------
TC_SendData("em_FOO"         	     , "EM") ; User Command
TC_SendData("em_APPENDTABS C:\my.tab", "EM") ; User Command with parameters (usercmd.ini as following)
															;				[em_APPENDTABS]
															;				cmd=APPENDTABS
															;				param=%A

TC_SendData("cmd") 								  ; Ask TC :     (cmd one of the following varues:)
															; A  = Active Side
						
															; LP = Left Path            RP = Right Path
															; LC = Left List Count      RC = Right List Count
															; LI = Left Caret Index     RI = Right Caret Index
															; LN = Left Name Caret      RN = Right Name Caret

															; SP = Source Path          TP = Target Path
															; SC = Source List Count    TC = Target List Count
															; SI = Source Caret Index   TI = Target Caret Index
															; SN = Source Name Caret    TN = Target Name Caret

TC_SendData("C:\tc" "`r" "D:\data", "LR")	 ; CD   Command: (LeftDir - RightDir)
TC_SendData("C:\tc" "`r"          , "LR")	 ; CD   Command: (LeftDir)
TC_SendData(        "`r" "D:\data", "LR")	 ; CD   Command: (          RightDir)

TC_SendData("C:\tc" "`r" "D:\data", "ST")	 ; CD   Command: (SourceDir - TargetDir)
TC_SendData("C:\tc" "`r"          , "ST")	 ; CD   Command: (SourceDir)
TC_SendData(        "`r" "D:\data", "ST")	 ; CD   Command: (            TargetDir)
*/
TC_SendData(Cmd, CmdType="", msg="", hwnd="") {
   Critical   ; Define "OnMessage" as STATIC it is registered at Script startup.
   STATIC om:=OnMessage(0x4a, "TC_SendData"), TC_ReceiveDataValue:="", TC_DataReceived:=""	; 0x4a is WM_COPYDATA

   IF ((msg=0x4A) AND (hwnd=A_ScriptHwnd)) ; EnSure is trigered by this Script.
      EXIT (TC_ReceiveDataValue:=StrGet(NumGet(CmdType + A_PtrSize * 2)), TC_DataReceived:="1")

   VarSetCapacity(CopyDataStruct, A_PtrSize * 3), TC_ReceiveDataValue:=1, TC_DataReceived:=""
   IF CmdType IN LR,ST			; CD   Command
	DirType:=CmdType, CmdType:="CD"
   ELSE IF (CmdType="")			; Ask TC
	CmdType:=(A_IsUnicode ? "GW" : "GA"), TC_ReceiveDataValue:=""

   If( A_IsUnicode ) {
      ;;;;;;VarSetCapacity( cmdA, StrPut(cmd, "cp0"),0) ; 3rd parameter "0" is necessary for CD "LeftPath only"
      VarSetCapacity(cmdA, StrPut(cmd, "UTF-8"), 0)	,	Len:=StrPut(cmd, &cmdA, "UTF-8")
     ; Loop, % StrLen(cmd)
         ;NumPut( Asc(SubStr(cmd, A_Index, 1)), cmdA, A_Index - 1, "Char")
   }
   else
   		Len:=StrLen(cmd)

   ;	MsgBox, % len ; ansi 14 40  Unicode 22/80
   NumPut( Asc(SubStr(CmdType,1,1)) + 256 * Asc(SubStr(CmdType,2,1)), CopyDataStruct,0 )
   NumPut( Len + (CmdType="CD" ? 5 : 0) * (A_IsUnicode ? 2 : 1) , CopyDataStruct, A_PtrSize )
   NumPut((A_IsUnicode ? &cmdA : &cmd), CopyDataStruct, A_PtrSize * 2)
   Loop, % (CmdType=="CD" ? 2 : 0)
      NumPut(Asc(SubStr(DirType,A_Index,1)), (A_IsUnicode ? cmdA : cmd),Len+A_Index-1, "Char")
   SendMessage, 0x4A,%A_ScriptHwnd%, &CopyDataStruct,, ahk_class TTOTAL_CMD
   
   While (TC_ReceiveDataValue="") {
      IfEqual, TC_DataReceived,    1, Break
      IfGreaterOrEqual, A_Index, 500, Break
      Sleep,10
   }
   Return TC_ReceiveDataValue
}
or is there any tool can capture the actual data sent to TC? Then (maybe) I can capture the tcfs2 sent data and figure how by myself

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

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

Post by *MVV » 2019-11-24, 10:03 UTC

Since TC 8.52 WM_COPYDATA for EM-commands supports Unicode, you just should send UTF-8 command with BOM prefix, just like you can use UTF-8 paths with BOM prefix for CD command.

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

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

Post by *dindog » 2019-11-24, 12:06 UTC

2MVV
Thanks, it works now. I now have a full wm_copydata weapon now:)

MVV, did you remember you posted an em_cdUnique in the other thread, and I tried it, the send [key] seem not work. I also tried add a key short-cut "&D" for the close duplicate tab in my language file
1571="关闭重复的标签(&D)"
and send

Code: Select all

Command: TCSF2.exe
Parameters: /ef "eval(tcd(`%A`,,S)+msg($433,3009,,1)+send(`D`))"
the send key part not working too.

Tested in TC9.5b6 tcfs2 2.4.3.584

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

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

Post by *MVV » 2019-11-25, 05:48 UTC

Well, I think that this command won't work in its original version in modern TC because of view modes that are added to the end of tab context menu (this command expects that close duplicate tabs command is the last in tab context menu). Unfortunately there is still no cm-command for this command.

But it should work with send... Does it work when you type D manually? I.e. execute cm_DirTabsShowMenu from e.g. TC command line and then press D?

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

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

Post by *dindog » 2019-11-25, 08:04 UTC

MVV wrote:
2019-11-25, 05:48 UTC
Well, I think that this command won't work in its original version in modern TC because of view modes that are added to the end of tab context menu (this command expects that close duplicate tabs command is the last in tab context menu). Unfortunately there is still no cm-command for this command.

But it should work with send... Does it work when you type D manually? I.e. execute cm_DirTabsShowMenu from e.g. TC command line and then press D?
yes, cm_DirTabsShowMenu in commandline, manually press "D" works.

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

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

Post by *MVV » 2019-11-26, 10:59 UTC

Maybe add some delay before sending D?

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

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

Post by *dindog » 2019-11-28, 06:21 UTC

MVV wrote:
2019-11-26, 10:59 UTC
Maybe add some delay before sending D?
Delay don't make it work. I test this command,

Code: Select all

tcfs2 /ef "eval(msg($433,3009,,1)+delay(500)+send(`d`)+delay(1500)+send(`d`))"
the menu wil popup, then 500ms later close without running the close the duplicate tab, then 1500ms later, another "d" was sent to the quick search input box..

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

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

Post by *MVV » 2019-12-03, 13:50 UTC

Is TC window focused during entire test? Maybe some third-party app steals focus so menu closes... It would be good to test on another PC or a virtual machine.

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

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

Post by *dindog » 2019-12-05, 09:48 UTC

MVV wrote:
2019-12-03, 13:50 UTC
Is TC window focused during entire test? Maybe some third-party app steals focus so menu closes... It would be good to test on another PC or a virtual machine.
oh... I don't know that. I thought the "D" can sendd to quick search, then the former "d" will send to TC too, but it's not. The problem solved..

Another question, would you please tell me what exactly the binary strings tcfs2.exe will send by wm_copydata in this command :
tcfs2 /ef "tcd(`d:\foo.zip`,A)"

I am having problem with the "A", sometime it will open the archive, sometime it won't. While tcfs2 seem always won't open the archive.
The exact binary string I send to TC is:

Code: Select all

EF BB BF 64 3A 5C 66 6F 6F 2E 7A 69 70 0D EF BB BF 00 41 00 00 00
should be
UTF8 bom d:\foo.zip \r UTF8 bom \0 A \0 \0
The way I am using is:
viewtopic.php?f=3&t=55075

Post Reply