How to subtract numbers in ZennoPoster

  • Автор темы Автор темы helpot80
  • Дата начала Дата начала
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
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
 
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
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
 
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?
 

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