Windows > Third Party Plug-ins, Programs, and Skins

ZELDA v1.0 released (Expression Language editor)

<< < (19/45) > >>

zybex:
Good :)
You can still have non-PNG files in the tooltip folder, but then you need to specify the full path (doesn't work with "tooltip:" in MC).
Like so:
<img src="C:\Program Files\J River\Media Center 27\data\tooltip\logo.jpg">

wer:
Zelda gives different results from MC for this:

--- Code: ---regex([Name],/#(?=:)(.*)#/,-2)
--- End code ---

zybex:
That's very unlikely (but not impossible), as Zelda is only passing the expression to MC for evaluation and then displaying the returned value unmodified. The only way I can think of where they could differ is if the evaluation codepath in MC is different for UI evaluation versus API evaluation. It's possible, but then it would be an MC bug.

I can't reproduce it on MC 27.0.47. Can you provide a sample [Name] where you see this happening, and what are the results shown in MC and in Zelda for that string?

Starting a regex with a positive lookahead is unusual, perhaps MC's regex engine is producing non-deterministic output because of that. The expression you wrote is basically the same as "(:.*)", or ": (.*)" if you don't need the colon (had to add an extra space there because the forum was showing it as a sad smiley). Also, mode -2 here doesn't make much sense - the expression will only ever return 1 capture due to the (.*), unless the [Name] has multiple lines of text.

wer:
Squirrels often achieve things that others think are very unlikely (or impossible).   ;D

I didn't say it was a good regex. It's just some intermediate junk I accidentally had in there while testing something.  It's the fact that there was a difference that caught my attention.

Here's a [Name]

--- Code: ---Cello Suite 4 in E-flat major, BWV 1010: I. Prelude
--- End code ---

Note the leading : (followed by a space) in the MC output, which is absent from the Zelda output.
Interestingly, and also impossible, both MC and Zelda consider the length of their output to be 12.  12 is the wrong answer for the output displayed by Zelda.

You can test that with this:

--- Code: ---regex([Name],/#(?=:)(.*)#/,-2) Length(regex([Name],/#(?=:)(.*)#/,-2))
--- End code ---

Here's the comparison:

zybex:
Interesting. It shows correctly for me, with the leading colon. The length check also confirms that the colon is there... only not visible to you for some reason. Does the colon show up if you just type ": something" in Zelda? This issue would not be caused by any given expression or function, so just trying to print the text directly should also have the same result.

2 or 3 possibilities occur to me:
- did you change the Font in Zelda settings? If so, try another one with "regular" style, size 10 or 12. Default is "Consolas 10, regular"
- Are you sure that's a regular ":" symbol and not a visually-identical unicode colon? If it's a non-standard colon symbol, then the selected font in Zelda must have it, or it won't be rendered. Changing the font could also fix it in this case.
- do you have any Zoom/Scaling factor enabled in windows? If so, can you tell me exactly which settings you use so I can try replicating it - there are several ways to enable Scaling in Windows 10, and some of then interfere quite heavily in how text is rendered by applications.

Also try a string with multiple colons like "::: test ::: test :::" to check if it's all colons being suppressed (font issue) or just the leading one.

Is the colon supressed both in the Playlist (datagrid) and "Text Output" tabs, or just in the Playlist tab?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version