Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 97529

Re: function call another function variable

$
0
0

little bit, coz I'm the new learner in javascript, I try to put the concept in my script my not work:

 

below is not the full version of my script, coz it to long, so I make it simple, I juz want to alert(myA) and the result should be "Test" without changing myFun3(eachFrames) name, coz it related to myFun1

myFun2();

myFun1("LowRes", "PDF_fit on paper", "Smallest File Size PDF");

 

 

function myFun1(psFolder, preset, description, filePrefix) {

  for (var i = app.documents.length -1;  i >= 0; i--) {

  var aDoc = app.documents[i];

 

 

  for (k=0; k<aDoc.pages.length; k++) {

        if (myFun3(aDoc.pages[k].textFrames)){

  PageList += aDoc.pages.item(k).name + ", ";

  }

  }

 

 

    }

}

function myFun2(){

var myA = "Test";

}

function myFun3(eachFrames){

    alert(myA);

   

    }


Viewing all articles
Browse latest Browse all 97529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>