[F] Web Sources Scripts: "If" is being treated as case-sensitive

Hi there, guys!

First of all, let me thank you so much for having such fun with this great piece of software! And I'm really sorry if this bug should have been posted in the Development forum, I was just not sure.

I'm in process of developing a web source script (soon I'll be posting it), and had a bad time trying to figure out what was going wrong (I was having an exception after a certain modification).

It turns out that the conditional If commands are causing an exception if you don't write them strictly as lowercase words.

I understand that most of the web sources scripts I've seen are written entirely in lowercase (when it comes to commands), but afaik, script commands are case-insensitive.

I have the habit of writing commands as they are described in the documentation. If I use, for example, FindInLine or findinline, I always have the same results, and no problem with that.

But if I use If, IfNot, Else or/and EndIf (notice the capital first letters), MP3Tag does not run the script correctly and shows an exception message. Please notice that the documentation shows these words as I wrote them in this message.

The workaround is pretty simple: you must write them always as lower-case words. I recognize that this is a pretty low priority bug, but knowing it could save time from other guys, since I took about two hours to find it out.

As far for all of the other commands I've used through my script, they seem to act perfectly in mixed-case words. I just found this problem with if/ifnot/else/endif.

Reproducing the bug:
Edit any script you might have with you already, "Amazon.com (cover-only)", for example. Replace all if statements with If (capital first letter). Do a search and you'll have the exception. Undo the replacements and it'll work fine again.

In the error log:

File:        .\mtonlineselectdlg.cpp
Line:        96
Expression:    items.get_count() != 0
LastError:    00000000 The operation completed successfully.

File:        .\mtonlineselectdlg.cpp
Line:        135

I received the same error state after modifying an existing script.
I've reported this to Florian on 2006-09-03.

I think the problem is not the spelling of keywords at all, but there might be a failure on evaluating of incoming webpagelines that do not include the data that would be expected to be there.

To be sure, what there is going on I will try your test scenario in the next days.

DD.20061225 - Merry Christmas to all Mp3tag friends -

Uh, sorry buddy, I swear I did some searches to see if I located something similar, but it seems I didn't try hard enough or the right way. I apologize to everyone for having posted a dupe. :stuck_out_tongue:

Oh yeah, I forgot to say: I've tested this problem both on v2.36a and v2.37a.

No problem at all, ... I sent the error warning by private email to Florian.
And your posting now understrikes that I was not the only one, who experienced this behaviour.

DD.20061226 - Merry Christmas to all Mp3tag friends -

This problem has been fixed with the latest Development Build.

Thanks for reporting!

Kind regards,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.