2 Replies Latest reply on May 16, 2018 10:26 AM by flaviogomes_script

    Replace keywords with CC Library files

    flaviogomes_script Level 1

      var doc = app.activeDocument;

      app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;



      app.findGrepPreferences.properties = {findWhat: "((?i)PAIR WORK)", appliedParagraphStyle: doc.paragraphStyleGroups.item("ATIVIDADES").paragraphStyles.item("linha_questão")};



      var foundEscrita = app.activeDocument.findGrep();



      for (var i = 0; i < foundEscrita.length; i++) { 

                 foundEscrita[i].paragraphs.everyItem().characters.firstItem().place(File("~/Desktop/TESTE _VINHETAS/PAIRWORK.ai"));



      Hello friends, I work on a script to replace keywords with files.

      I succeeded in the script, it worked perfectly.

      But I need the help of friends for a mission that I can not solve, I need the script to do what it has been doing, but instead of searching the file on some network path, it searches the CC Library.

      Thanks with the help of friends.