How to subtract numbers in ZennoPoster

helpot80

Client
Регистрация
28.05.2011
Сообщения
48
Благодарностей
0
Баллы
6

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
This Javascript takes the attribute=length of a dropdown list element and subtracts 1 - Therefore this JS will always click on the last dropdown selection...

{-JS.Execute-|-var x={-FieldData.FieldData-|-●1●7●6●1●9●8●-|-ga-8032-}; x-1;-}
 
  • Спасибо
Реакции: helpot80

helpot80

Client
Регистрация
28.05.2011
Сообщения
48
Благодарностей
0
Баллы
6
I dont have any drop down list elements, I get a number in the previous step, and now I want to subtract one from it and get a new number.

So if it is 19 in previous step i want to get 18.


The reason why I need this is I want to read the last line of the file.
ZP returns total number line from 1 to N
But when reading a line from a file ZP takes from 0 to N
 

Stereomike

Client
Регистрация
29.03.2011
Сообщения
221
Благодарностей
30
Баллы
0
gcomm already told you the solution, give him a thank you and use his code.

Just simply insert your {previous step (19)} where he has written {-FieldData.FieldData-|-●1●7●6●1●9●8●-|-ga-8032-}

Don't write {previous step (19)}, you should insert the step from your template.
 
  • Спасибо
Реакции: helpot80

helpot80

Client
Регистрация
28.05.2011
Сообщения
48
Благодарностей
0
Баллы
6
i didnt got the concept and didnt understood it, but i have understood it now.

var x = (previous step value), var y = 1; x - 1

and then simply put in JS converter to get the JS script which we need to execute.

Thanks
 

cool.guy

Новичок
Регистрация
23.07.2011
Сообщения
10
Благодарностей
0
Баллы
0
But is there any option why which we can solve a simple equation like if there's already written

1+1=

And we need to solve and post it in another box then?
 

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28

cool.guy

Новичок
Регистрация
23.07.2011
Сообщения
10
Благодарностей
0
Баллы
0

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