Hello guy! Sorry to trouble you with the same problem again,
but i still need help!
"I am trying to create a scrypt that will compare a String
with an editable text that the user should type to match that
String. I was able to do that, but the problem is that is not case
sensitive, even with the adobe help telling me that strings are
case sensitive. Do you guys know how to make that comparison match
only if all the field has the right upper and lower case letters?
if field "t:texto1" = "Residencial Serra Verde"then
go to next
|----> thats the one Im using!"
There were 2 replys but both of them didnt work, and the
second one even made the director crash, corrupting even previously
files that had nothing to do with the initial problem..
first solution given --
If you put each item that you are comparing into a list, it
makes it case sensitive. Just put list brackets around each
if [field "t:texto1"] = ["Residencial Serra Verde"] then
go to next
Second solution given--
The = operator is not case-sensitive when used on strings,
but the < and > operators are case-sensitive.
So another way to do this is to check if the string is
neither greater than nor less than the target string:
vExpected = "Residencial Serra Verde"
vInput = field "t:texto 1"
if vExpected < vInput then
else if vExpected > vInput then
-- vExpected is a case-sensitive match for vInput
The first solution does in fact work and is probably the most
of doing it. You can verify that it works by starting with a
movie and adding a field named "t:texto1" into the cast with
"Residencial Serra Verde" in the field. Next type the
following command in
the message window and press Enter
put [field "t:texto1"] = ["Residencial Serra Verde"]
You will see it return 1 which means True. Next, make the R
in the field
lower case and execute the command in the message window, it
will return 0
Now that you know this works, you need to dig deeper in your
code to find
what the problem is. Any more info you can supply?