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

Re: Re: function call another function variable

$
0
0

Hi creativejoan0425,

still much to learn.

… I try to put the concept in my script

I don't see your try.

You see my example, but you don't use this information – why not?

 

All the same.

Does this work for you?

var myA = null; // declare at first your variable myA
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 + ", ";                $.writeln(PageList)                }            }             }    }

function myFun2() {
    // give now myA the new value    myA = "Test";    // it is necessary  to "return" the new value of myA    return myA;    }

function myFun3(eachFrames) {
    alert(myA);    return; // every function should be "returned" !    }

Viewing all articles
Browse latest Browse all 85594

Trending Articles



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