This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Wrong values passed for %C, %C1, %C2, %c, %c1, %c2
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed Printable version
View previous topic :: View next topic  
Author Message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8037
Location: Russian Federation

PostPosted: Fri Jan 12, 2018 5:57 am    Post subject: Wrong values passed for %C, %C1, %C2, %c, %c1, %c2 Reply with quote

Unexpected results (marked red):
Flasher (Russian board) wrote:
TC 9.12 32 bit. %C,%C1/%c,%c1 should return physical paths like %P%N/%p%n, but...
1. No selection. File is focused.
    a) Left panel - physical dir, right (active) - virtual dir.
    %c or %c2: "D:\Right\Path\to\File Name.ext"
    %C or %C2: "\\\Virtual Panel\Virtual\Folders\Names\D:\Right\Path\to\File Name.ext"
    %C1 or %c1: "C:\Left\Path\D:\Right\Path\File Name.ext"

    b) Left panel (active) - virtual dir, right - physical dir.
    %c or %c1: "C:\Left\Path\to\File Name.ext"
    %C or %C1: "\\\Virtual Panel\Virtual\Folders\Names\D:\Left\Path\to\File Name.ext"
    %C2 or %c2: "D:\Right\Path\C:\Left\Path\to\File Name.ext"

    c) Left - virtual dir, right (active) - physical dir.
    %C or %c or %C2 or %c2: D:\Right\Path\RightFileName.ext
    %C1 or %c1: "\\\Virtual Panel\Virtual\Folders\Names\RightFileName.ext"

    d) Left - physical dir, right (active) - physical dir.
    %C or %c or %C2 or %c2: D:\Right\Path\RightFileName.ext
    %C1 or %c1: "C:\Left\Path\RightFileName.ext"


2. One file selected (not focused).
    a) Left - physical dir, right (active) - virtual dir.
    %c or %c2: SelectedFileName.ext (Another file is focused.)
    %c or %c2: "\\\Virtual Panel\Virtual\Folders\Names\SelectedFileName.ext" (Item [..] is focused.)
    %c1: C:\Left\Path\FileNameUnderTheCursor.ext (Another file is focused.)
    %c1: C:\Left\Path\ (Item [..] is focused.)

    b) Left (active) - virtual dir, right - physical dir.
    %C or %C1: "\\\Virtual Panel\Virtual\Folders\Names\SelectedFileName.ext"
    %c or %c1: SelectedFileName.ext (Another file is focused.)
    %c or %c1: "\\\Virtual Panel\Virtual\Folders\Names\SelectedFileName.ext" (Item [..] is focused.)
    %C2: D:\Right\Path\SelectedFileName.ext
    %c2: D:\Right\Path\FileNameUnderTheCursor.ext (Another file is focused.)
    %c2: D:\Right\Path\ (Item [..] is focused.)

    c) Same as 1.c but %c1: "\\\Virtual Panel\Virtual\Folders\Names\FileNameUnderTheCursor.ext"

    d) Same as 1.d but %c1: "C:\Left\Path\FileNameUnderTheCursor.ext"


Test environment:
- Virtual Panel plugin.
- Subfolders C: and D: in \\\Virtual Panel\Virtual\Folders\Names\ folder contain directories Left from C:\Left and D:\Right.
- Some mentioned files are added to folder \\\Virtual Panel\Virtual\Folders\Names\.
- Sample buttonbar button for test:
Code:
cmd.exe
/c "echo c: %c & echo c1: %c1 & echo c2: %c2 & echo C: %C & echo C1: %C1 & echo C2: %C2 & pause"


So, sometimes virtual paths are not resolved to physical ones, sometimes TC mixes path parts incorrectly.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35752
Location: Switzerland

PostPosted: Mon Jan 15, 2018 10:01 am    Post subject: Reply with quote

%C parameters don't currently support virtual paths/plugins. I will consider adding it.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8037
Location: Russian Federation

PostPosted: Mon Jan 15, 2018 1:40 pm    Post subject: Reply with quote

Thank you!
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
raytc
Senior Member
Senior Member


Joined: 28 Jun 2004
Posts: 241

PostPosted: Mon Mar 26, 2018 3:11 am    Post subject: Reply with quote

This does also work if I select two different files in the same panel (p.e. 2 files in the right panel):
"%C1" "%C2"
Very Happy

What would be the "C" parameters to compare 2 directories?
Can I adapt it in order to use also 2 directories in the same panel?
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35752
Location: Switzerland

PostPosted: Mon Mar 26, 2018 8:18 am    Post subject: Reply with quote

"%C1" "%C2" should return the same names as you get when using "Compare by content".

To pass the left and right directories to a program, use
"%P" and "%T" .
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
raytc
Senior Member
Senior Member


Joined: 28 Jun 2004
Posts: 241

PostPosted: Mon Mar 26, 2018 8:35 am    Post subject: Reply with quote

Thank you. Smile
Yes indeed if I select 2 directories it compares 2 directories.
If I select 2 files it compares 2 files.

Maybe better to use "%C1" "%C2" for both (comparing directories and files)

I don't understand the difference between "%C1" "%C2" and ""%P" "%T"
except that the last one passes left and right directory and the first one
whatever 2 directories.
Is that correct?
Back to top
View user's profile Send private message
raytc
Senior Member
Senior Member


Joined: 28 Jun 2004
Posts: 241

PostPosted: Wed Mar 28, 2018 3:28 am    Post subject: Reply with quote

Does anyone know the difference between "%C1" "%C2" and ""%P" "%T"?
Back to top
View user's profile Send private message
Stefan2
Power Member
Power Member


Joined: 13 Sep 2007
Posts: 1928
Location: Europa

PostPosted: Wed Mar 28, 2018 3:54 am    Post subject: Help: button settings and parameters. Reply with quote

raytc wrote:
Does anyone know the difference between "%C1" "%C2" and ""%P" "%T"?


For first idea read the help:

- open a button for editing
- press F1 key on your keyboard
- read
- cancel the button


- - - EDIT for clarification:
Any button will do, just one of the existing ones.

This will open the 'context sensitive' help page for the button settings and parameters.
That way you don't have to search the help yourself, TC will do that for you.




 HTH? Very Happy
_________________
The destination is one thing. Getting there is everything.


Last edited by Stefan2 on Wed Mar 28, 2018 6:20 am; edited 1 time in total
Back to top
View user's profile Send private message
raytc
Senior Member
Senior Member


Joined: 28 Jun 2004
Posts: 241

PostPosted: Wed Mar 28, 2018 4:30 am    Post subject: Reply with quote

Searched in Help file: Found nothing
Back to top
View user's profile Send private message
Horst.Epp
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 2922
Location: Germany

PostPosted: Wed Mar 28, 2018 4:50 am    Post subject: Reply with quote

raytc wrote:
Searched in Help file: Found nothing

And why don't you follow the advice from Stefan2 ?
The help is exactly at the place whre parametsrs are configured.
So whats the problem to use it ?
_________________
Windows 10 x64 Version 1803
April 2018 Update (OS Build 17134.112)
TC 9.20rc2 x64 and x86
Back to top
View user's profile Send private message
raytc
Senior Member
Senior Member


Joined: 28 Jun 2004
Posts: 241

PostPosted: Wed Mar 28, 2018 5:30 am    Post subject: Reply with quote

Are you supporting Stefan2?

I don't have a button associated with it. Where to open a button?
I just asked a question.

Tried to find it in the help but couldn't find anything.
no problem
Have a good day
Back to top
View user's profile Send private message
Horst.Epp
Power Member
Power Member


Joined: 06 Feb 2003
Posts: 2922
Location: Germany

PostPosted: Wed Mar 28, 2018 5:35 am    Post subject: Reply with quote

raytc wrote:
Are you supporting Stefan2?

I don't have a button. I just asked a question.

Tried to find it in the help but couldn't find anything.
no problem
Have a good day

I don't support Stefan2 but I fight against users like you,
which ask for help but are not willing to try anything.
If you don't have any button why are you posting on this thread ?
_________________
Windows 10 x64 Version 1803
April 2018 Update (OS Build 17134.112)
TC 9.20rc2 x64 and x86
Back to top
View user's profile Send private message
Ovg
Power Member
Power Member


Joined: 06 Jan 2014
Posts: 532
Location: MOW

PostPosted: Wed Mar 28, 2018 5:46 am    Post subject: Reply with quote

2raytc
it isn't a rocket science - F1, Search for Button, press list topics and choose Button Bar. Read the topic carefully.
http://rgho.st/7RPv2ZqSh
_________________
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.20 RC1 x64, Windows 7 SP1 x64


Last edited by Ovg on Wed Mar 28, 2018 5:49 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
raytc
Senior Member
Senior Member


Joined: 28 Jun 2004
Posts: 241

PostPosted: Wed Mar 28, 2018 5:47 am    Post subject: Reply with quote

Stefan2 can do it himself.
I've added it to the start menu.
But you're not here to help me, you're just want to make you own point.
Back to top
View user's profile Send private message
tuska
Power Member
Power Member


Joined: 21 May 2007
Posts: 1091

PostPosted: Wed Mar 28, 2018 5:47 am    Post subject: Reply with quote

... OR ...
Press F1 for Help
Click on the "Search" tab
Search for: Dialog box: Configuration - Change button bar <ENTER>
Double-click on: Dialog box: Configuration - Change button bar
Click in the text
Press Ctrl + F
Type in what you are looking for, e.g. %C1, %P,...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group