Skip navigation
Currently Being Moderated

script pulling over another file

Jun 8, 2012 5:28 AM

anyone have a problem where a script will open another script file? I am thinking ES is storing a function somehow across files in a global variable and is trying to run another file to get it rolling. never had this happen really.


any ideas?

  • Currently Being Moderated
    Jun 8, 2012 9:17 AM   in reply to hilukasz

    Is the other script file one of your includes? Does it have any $.write() or $.writeln() that have not been commented out? Have you set any $.level options?

    Mark as:
  • Currently Being Moderated
    Jun 9, 2012 12:34 AM   in reply to hilukasz

    no idea, it just happens randomly?

    Mark as:
  • Currently Being Moderated
    Jun 12, 2012 7:03 AM   in reply to hilukasz

    From the Illustrator scripting read me


    "An Illustrator error occurred: 1346458189 ('PARM')" alert (1459349)


      Affects: JavaScript



        This alert may appear when carelessly written scripts are repeatedly

        run in Illustrator from the ExtendScript Toolkit.


        Each script run is executed within the same persistent ExtendScript

        engine within Illustrator. The net effect is that the state of

        the ExtendScript engine is cumulative across all scripts that

        ran previously.


        The following issues with script code can cause this problem:


          - Reading uninitialized variables.

          - Global namespace conflicts, as when two globals from different

            scripts have the same name.



        Be very careful about variable initialization and namespace conflict

        when repeatedly pushing a batch of Illustrator scripts

        for execution in Illustrator via the ExtendScript Toolkit (ESTK) in a

        single Illustrator session.


        Initialize variables before using them, and consider the scope of

        your variables carefully. For example, isolate your variables by

        wrapping them within systematically named functions. Instead of:


          var myDoc = app.documents.add();

          // Add code to process myDoc


        Wrap myDoc in a function that follows a systematic naming scheme:


          function myFeatureNameProcessDoc() {

            var myDoc = app.documents.add();

            // Add code to process myDoc



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points