[TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

[TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *Fla$her »

Press the button with the command: cm_Edit /CGL0N="<120>test_[C].txt",cd "test_120.txt"
Files have been created, the cursor has been set to the specified file, but an error window appears:

Code: Select all

---------------------------
File not found!
cm_Edit /CGL0N="<120>test_[C].txt",cd "test_120.txt"
---------------------------
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *Horst.Epp »

Confirmed
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *ghisler(Author) »

The following happens:
1. TC executes cm_Edit /CGL0N="<120>test_[C].txt"
-> success
2. TC executes cd "test_120.txt"
-> Failure, you cannot cd to a file
3. TC assumes that the entire command line couldn't be executed and tries to launch it directly.
-> Error message

If you create a directory "test" and change the button command to
cm_Edit /CGL0N="<120>test_[C].txt",cd "test"
then it will run as it should.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *white »

ghisler(Author) wrote: 2023-08-22, 07:12 UTC 2. TC executes cd "test_120.txt"
-> Failure, you cannot cd to a file
HISTORY.TXT wrote:02.12.09 Added: Command line: Command "cd filename" places cursor directly on file with name "filename"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *ghisler(Author) »

I see, I didn't know that this was your intention. The function returns FALSE because there was no directory change. When I change this to TRUE, then there is no problem.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *petermad »

I don't get any error using /CGL0N="<120>test_[C].txt",cd "test_120.txt" - but TC does not place test_120.txt under the cursor as it should (as white has pointed out).

NOTE: cd "test_120.txt" by itself does place the cursor on the file.

I tried with /CGL0N="<120>test_[C].txt",cd "%Q%Ptest_120.txt" With a clean wincmd.ini, that results in 120 Notepad windows beeing opened with some binary content inside!

I tried with /CGL0N="<120>test_[C].txt",cm_Wait 1000,cd "test_120.txt" - but the cd command is still not carried out.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *white »

2petermad
Did you try using the command in a button?
petermad wrote: 2023-08-22, 09:03 UTC I tried with /CGL0N="<120>test_[C].txt",cm_Wait 1000.cd "test_120.txt" - but the cd command is still not carried out.
You used a dot instead of a comma?
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *petermad »

You used a dot instead of a comma?
I didn't in the actual button - there I used: /CGL0N="<12>test_[C].txt",cm_Wait 1000,cd "test_12.txt" - to no avail.

I have now changed the dot to a comma in the previous post.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *white »

petermad wrote: 2023-08-22, 09:03 UTC I don't get any error using /CGL0N="<120>test_[C].txt",cd "test_120.txt" - but TC does not place test_120.txt under the cursor as it should (as white has pointed out).
You are using the parameter field and include commands in the parameter field?
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *Fla$her »

ghisler(Author) wrote: 2023-08-22, 07:12 UTC 2. TC executes cd "test_120.txt"
-> Failure, you cannot cd to a file
It's not that. I use this command almost every day through a script. I am surprised that you forgot about this possibility.
I also want to remind you about my request, the expected solution, where the first paragraph hints that there are no problems in normal folders to navigate to a file by name.
ghisler(Author) wrote: 2023-08-22, 07:12 UTC 3. TC assumes that the entire command line couldn't be executed and tries to launch it directly.
-> Error message
That's what I understood. It needs to be corrected so that there is no error.


2petermad
The command is specified for the first field in the button. That's how it should be called.
You can replace test_120.txt with test_1.txt. It will be the same, the cursor will be placed on the first file instead of the last.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *petermad »

white wrote: 2023-08-22, 10:14 UTC
petermad wrote: 2023-08-22, 09:03 UTC I don't get any error using /CGL0N="<120>test_[C].txt",cd "test_120.txt" - but TC does not place test_120.txt under the cursor as it should (as white has pointed out).
You are using the parameter field and include commands in the parameter field?
Yes - silly me - of course the cd command cannot be executed from the Parameters field.

With cm_Edit /CGL0N="<120>test_[C].txt",cd "test_120.txt" in the Commands field I can confirm that I get the error message:
---------------------------
Total Commander
---------------------------
File not found!

cm_Edit /CGL0N="<12>test_[C].txt",cd "test_12.txt"



"Den angivne fil blev ikke fundet."
---------------------------
OK
---------------------------
Interesting with the Danish message in the last line, when I am running TC with English language.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *Fla$her »

petermad wrote: 2023-08-22, 09:03 UTCbut TC does not place test_120.txt under the cursor
And after clarifications?
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *petermad »

And after clarifications?
The cursor IS placed at the file, before the error message is shown.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *ghisler(Author) »

The cursor IS placed at the file, before the error message is shown.
Yes, the "cd" command is being executed, but it returns FALSE by mistake (because there is no directory change).
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [TC 11.01RC1] After creating the files and positioning the cursor, an error window appears

Post by *Fla$her »

ghisler(Author) wrote: 2023-08-23, 08:18 UTCbecause there is no directory change
In this case, there are 2 ways out:
1. Disable this check.
2. In addition to checking the directory change, check whether the specified file name matches the one under the cursor. The error should not be displayed if one of the two conditions is met.
Overquoting is evil! 👎
Post Reply