PDA

View Full Version : If [variable] doesn't have contains



NewsArchive
09-19-2006, 03:06 AM
I'm using Developer edition 5.5.1589.
In the script editor if I choose the "If ..." item, and press F1 for
help, it lists a number of conditions including:
Contains, Does Not Contain

But the dropdown list of conditions for the "If Statement" is missing
the "Contains, Does Not Contains" choices.

Is the HELP describing a feature which hasn't yet been implemented, or
has this condition disappeared from the "if statement".

I was trying to add my program path into the system path variable by
reading the system PATH into a variable, checking to see if my program
folder was in the path (using contains), and then conditionally add my
progrma folder onto the path.

Regards,
Alan
Alan Telford
Development Manager
Maxtel Software Ltd
http://www.maxtelsoftware.com

NewsArchive
09-19-2006, 03:07 AM
Alan,

I cannot reproduce this here on any of our machines and we have not received
a similar bug report.

This is what I see here on our machines (see screenshot).

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
09-19-2006, 03:07 AM
Friedrich,

That's what my screen shot shows too.
However, the help file on the IF statement has more options.

Your screen shot shows the "Contains Any Letters In/Contains Letters
Not In" option, but it doesn't have the "Contains, Does Not
Contain-The value of the variable must (or must not) contain the text
given in the Value field. " option which is listed in the help file.

(see attached screenshot for help section).
I was hoping to use the CONTAINS option to search for a string, rather
than "CONTAINS ANY LETTERS".

Alan

NewsArchive
09-19-2006, 03:25 AM
Alan,

You are absolutely right. I am sorry for that. It's a documentation issue.

The following works fine:

Set Variable %TEST% to "THISISATEST"
If %TEST% Contains Any Letters In "IS" Then
Display Message Box "IS found!" -- "it's there"
End

Does this help?

Friedrich