(Этот код - javascript в Adobe PDF-файле dc)
у меня 52 строки и 52 текстовых поля с некоторыми параметрами .. и понимаю, что код не поддается управлению ... :( (так много пишет)
это возможно для более разумного решения? если я использую массивы? что-то еще?
var A0 = this.getField("Dropdown14.0").value
var A1 = this.getField("Dropdown14.1").value
var A2 = this.getField("Dropdown14.2").value
var A3 = this.getField("Dropdown14.3").value
.
.
.
var A52 = this.getField("Dropdown14.52").value
var J1 = this.getField("Text58").value
var num = 0;
var num1 = 0;
var al = user;
var als = users;
.
.
.
if (num!=0 && A0==" check" && A1!=" check" && A2!=" check" && A3!=" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text1").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A0==" check" && A1!=" check" && A2!=" check" && A3!=" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text1").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A1==" check" && A2!=" check" && A3!=" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text2").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A1==" check" && A2!=" check" && A3!=" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text2").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A2==" check" && A3!=" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text3").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A2==" check" && A3!=" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text3").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A3==" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text4").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A3==" check" && A4!=" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text4").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A4==" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check"&& A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text5").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A4==" check" && A5!=" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text5").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A5==" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text6").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A5==" check" && A6!=" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text6").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A6==" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text7").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A6==" check" && A7!=" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text7").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A7==" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text8").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A7==" check" && A8!=" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text8").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A8==" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text9").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A8==" check" && A9!=" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text9").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A9==" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text10").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A9==" check" && A10!=" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text10").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A10==" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text11").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A10==" check" && A11!=" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text11").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A11==" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text12").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A11==" check" && A12!=" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text12").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A12==" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text13").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A12==" check" && A13!=" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text13").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A13==" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text14").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A13==" check" && A14!=" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text14").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A14==" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text15").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A14==" check" && A15!=" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text15").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A15==" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text16").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A15==" check" && A16!=" check" && A17!=" check" && A18!=" check") this.getField("Text16").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A16==" check" && A17!=" check" && A18!=" check") this.getField("Text17").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A16==" check" && A17!=" check" && A18!=" check") this.getField("Text17").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A17==" check" && A18!=" check") this.getField("Text18").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A17==" check" && A18!=" check") this.getField("Text18").value=J1+", check ("+num1+")"+" "+al+" with info :"
if (num!=0 && A18==" check") this.getField("Text19").value=J1+", check ("+num+")"+" "+hm+" "+"and"+" "+"("+num1+")"+" "+al+" with info :"
if (num==0 && A18==" check") this.getField("Text19").value=J1+", check ("+num1+")"+" "+al+" with info :"