Label Multi files, What am I missing here?

Things you’d like to miss in the future...
karimmaster101
Posts: 158
Joined: 20 May 2011 14:34

Label Multi files, What am I missing here?

Post by karimmaster101 »

Hello, I am trying to label list of files (different location) but it seems my code has a problem. Here it is

Code: Select all

tag "Red"," 
 E:\Files01\loremimpsu.mp4|
 D:\Pictures\Example22.jpg
 " ,0,0;
It works fine in case I am using one line format, like:

Code: Select all

tag "Red","E:\Files01\loremimpsu.mp4|D:\Pictures\Example22.jpg" ,0,0;
How can I fix the syntax so I can use the multi line format?

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Label Multi files, What am I missing here?

Post by highend »

Look up the Heredoc/Nowdoc syntax in the help file

but this won't work in a single line like in your example...
One of my scripts helped you out? Please donate via Paypal

karimmaster101
Posts: 158
Joined: 20 May 2011 14:34

Re: Label Multi files, What am I missing here?

Post by karimmaster101 »

Unfortunately, I didn't understand clearly what should I do. I used to use my script "The first format" with no problem with older version ver16 for example. Now with ver18 it didn't work. Should I roll back the upgrade?

If you wouldn't mind, more hints will be much appreciated

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Label Multi files, What am I missing here?

Post by highend »

There aren't many more hints :eh:

These multiline script were working until 17.40.0200
and stopped working with 17.40.0201

The changelog doesn't mention any changes regarding this behavior...

Don, is this a bug?
One of my scripts helped you out? Please donate via Paypal

karimmaster101
Posts: 158
Joined: 20 May 2011 14:34

Re: Label Multi files, What am I missing here?

Post by karimmaster101 »

highend wrote:There aren't many more hints :eh:

These multiline script were working until 17.40.0200
and stopped working with 17.40.0201

The changelog doesn't mention any changes regarding this behavior...

Don, is this a bug?
I installed the 17.40 version and it works as expected without any problem at all. It seem to me it is a bug in next versions, specially because Xyplorer didn't show any errors during the process. Even it shows that the process completed successfully and labels added to the files meanwhile they didn't.

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Label Multi files, What am I missing here?

Post by PeterH »

From my point of view New Lines inside "" are not supported.

So maybe the first version only worked by chance? Or am I wrong?
Win11 Pro 223H2 Gerrman

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Label Multi files, What am I missing here?

Post by highend »

I've tried 6 versions up to and including 17.40.0200 and in all of them
the new lines were working fine.

And if it isn't supported any more on purpose, at least a script
error should occur
One of my scripts helped you out? Please donate via Paypal

karimmaster101
Posts: 158
Joined: 20 May 2011 14:34

Re: Label Multi files, What am I missing here?

Post by karimmaster101 »

highend wrote:I've tried 6 versions up to and including 17.40.0200 and in all of them
the new lines were working fine.

And if it isn't supported any more on purpose, at least a script
error should occur
Can't agree more, should I post a bug report now?

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Label Multi files, What am I missing here?

Post by highend »

Don will read this thread anyway, so you can expect an answer here
One of my scripts helped you out? Please donate via Paypal

karimmaster101
Posts: 158
Joined: 20 May 2011 14:34

Re: Label Multi files, What am I missing here?

Post by karimmaster101 »

Any news that the issue has been solved in latest version?

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Label Multi files, What am I missing here?

Post by bdeshi »

Nope.

btw, I moved this topic to bug reports, because this apparently used to work.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Label Multi files, What am I missing here?

Post by PeterH »

Still I think, the correct form should be
(if it must be multiline, and without heredoc):

Code: Select all

tag "Red",
  "E:\Files01\loremimpsu.mp4|"
 ."D:\Pictures\Example22.jpg"
 ,0,0;
At least I think the exact result of the original (in matter af spaces etc.) is undefined.

OK: with syntax check on, an error should be shown :whistle:
Win11 Pro 223H2 Gerrman

admin
Site Admin
Posts: 60601
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Label Multi files, What am I missing here?

Post by admin »

1) You can see in the Step Mode dialog that one space is inserted between concatenated lines. This is done since 20120624.

2) In the tagging function I removed an auto-removal of flanking spaces on 20161221 (between v17.40.0200 and v17.40.0201).

The combination of this with the strange syntax used in the OP leads to the issue. :)



I will now reinvoke the auto-removal of flanking spaces (it did not make much sense anyway). So the issue will disappear for THIS context (SC tag).
BUT: Spaces will still be inserted generally (all contexts), so I cannot really recommend this syntax unless you are aware of what will happen (Step Mode is your friend)!

The parser cannot detect the possible problems here (too complex), so there cannot be any "Dubious Syntax" warning.

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Label Multi files, What am I missing here?

Post by PeterH »

For me the question is: should it really be allowed to continue a string over lines. I don't remember any language that allows this. And this wouldn't be so hard to test for a syntax warning.
I even seem(!) to remember that in the beginning of scripting you said that it's not allowed.

But I know - now that it was possible it might break old code...

( :ghost: Should you ever create a new language: be more restrictive from the start! Only allow what's explicitely allowed. :mrgreen: )
Win11 Pro 223H2 Gerrman

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Label Multi files, What am I missing here?

Post by bdeshi »

admin wrote:I will now reinvoke the auto-removal of flanking spaces [...] for THIS context (SC tag).
BUT: Spaces will still be inserted generally (all contexts)
Why such an arbitrary exception?
The original script should be updated, and this should not be valid, as peterH suggested. Or if syntax detection is too difficult for this case, then just keep things as-is. The indenting space can be considered part of the continued string because it's within the quotes, logical.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply