regarding comparaison elements

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
Hello,

I sometime struggle with this:

'{-FieldData.FieldData-|-●6●9●3●9●6●3●-|-≡1≡7≡7≡8≡1≡7≡5≡1≡6≡5≡-}'=='

and that:

'{-FieldData.FieldData-|-●6●9●3●9●6●3●-|-≡1≡7≡7≡8≡1≡7≡5≡1≡6≡5≡-}'!='

Does

'{-FieldData.FieldData-|-●6●9●3●9●6●3●-|-≡1≡7≡7≡8≡1≡7≡5≡1≡6≡5≡-}'=='

Means that is the filed date above is present on the page(equal) then we can come out of the green cercle and go to whatever we want?



does

'{-FieldData.FieldData-|-●6●9●3●9●6●3●-|-≡1≡7≡7≡8≡1≡7≡5≡1≡6≡5≡-}'!='

Means that is the Field data is not found then we can come out of the green cercle and go to wherever we want?


If I am wrong could you please explain it in simple English rather than using technical Jargon :-)


These are the definitions I have found on the net:
Equal (= =): returns true if the operands are equal.
Not equal (!=): returns true if the operands are not equal.

Does true means we can go out of the green cercle?

Thank you,


Ben
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Ben

'{-FieldData.FieldData-|-●6●9●3●9●6●3●-|-≡1≡7≡7≡8≡1≡7≡5≡1≡6≡5≡-}'!='' when you do the selected text presence check or regex means that 'it does NOT return an empty string'. So in the branch I put in your template yesterday, I am checking that the regular expression is NOT returning an empty value. If it does, you know that it has reached the last site that you are scraping and need to go do something else.

If you are dealing with numbers, then you would not put the apostrophes around the values. The apostrophes are for dealing with strings(text). So if you had a logic branch to see if you had looped through 5 times you would put {-Counter.Get-|-YourCounterName-}==5 if you set the counter value to 1 to begin with.
 

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
Hi BigCaJones,

I understand now, thank you, I really thought that both "!=" and "==" meant "is not equal to" and "is equal to".

So in fact if you right this:
'{-FieldData.FieldData-|-●1●5●7●8●1●4●-|-≡1≡6≡2≡2≡5≡4≡6≡1≡7≡6≡-}'!='

What I do find confusing is the Javascript comparator explanations as I found them on the net:

JAVASCRIPT Comparison Operators

Comparison Operators (= =, >, >=, <, <=, !=)

A comparison operator compares its operands and returns a logical value based on whether the comparison is true or not. The operands may be numerical or string values. When used on string values, the comparisons are based on the standard lexicographical ordering.

The operators are:

Equal (= =): returns true if the operands are equal.
Not equal (!=): returns true if the operands are not equal.
Greater than (>): returns true if left operand is greater than right operand. Example: x > y returns true if x is greater than y.
Greater than or equal to (>=): returns true if left operand is greater than or equal to right operand. Example: x >= y returns true if x is greater than or equal to y.
Less than (<): returns true if left operand is less than right operand. Example: x < y returns true if x is less than y.
Less than or equal to (<=): returns true if left operand is less than or equal to right operand. Example: x <= y returns true if x is less than or equal to y.


Now how could you have 2 operands instead of 1?

IE: if {-FieldData.FieldData-|-●1●5●7●8●1●4●-|-≡1≡6≡2≡2≡5≡4≡6≡1≡7≡6≡-} is equal to {-FieldData.FieldData-|-●1●5●7●5●6●7●-|-≡1≡6≡2≡2≡5≡4≡9≡9≡9≡9≡-} then do this or that?
or
if {-FieldData.FieldData-|-●1●5●7●8●1●4●-|-≡1≡6≡2≡2≡5≡4≡6≡1≡7≡6≡-} is not equal to {-FieldData.FieldData-|-●1●5●7●5●6●7●-|-≡1≡6≡2≡2≡5≡4≡9≡9≡9≡9≡-} then do this or that?

I would find it much better to have 2 objects to compare to each others, is there a way to do this please?


Let's say you have a text presence for the words "Play now"

I would have loved(and prefer) to see something like:
if {-FieldData.FieldData-|-●1●5●7●8●1●4●-|-≡1≡6≡2≡2≡5≡4≡6≡1≡7≡6≡-} is equal to "Play now" then output this or that.......


Any idea what I mean?


Thanks,


Ben
 

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
Thanks for the Skype explanations :-)

Ben
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)