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

Re: Select Image after Placing

$
0
0

Try this,

 

//to get image path 
var myFilePath = app.activeDocument.filePath; 
var myLinksPath = myFilePath + "/" + "links"; 
var myArtPath = File(myLinksPath); 
var myArtFiles = myArtPath.getFiles("*.eps"); 
app.findGrepPreferences = app.changeGrepPreferences = null; 
app.findGrepPreferences.findWhat = "<<<.+?>>>"; 
var _equFound = app.activeDocument.findGrep(); 


for(e=0; e<_equFound.length; e++) 
{     var _equ_Content = _equFound[e].contents;                         //1     var myFinalContents = String(_equFound[e].contents).replace(/>>>/, "").replace(/<<</,"");         for(j=0; j<myArtFiles.length; j++)         {             var myArtName = myArtFiles[j].name;             var myReplace = myArtName.replace(/\.eps/, "")             var myFinalImageName = String(myReplace);               if(myFinalContents.indexOf(myFinalImageName) != -1)             {                     var eqFrame = _equFound[e].place(File(myArtFiles[j]));     //place the image                                          eqFrame[0].parent.select();                    app.selection[0].anchoredObjectSettings.anchorYoffset = 10;    //Now it is working fine                     }                }            }

 

 

Vandy


Viewing all articles
Browse latest Browse all 87561

Trending Articles



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