Find and place CS4 JS
Hi all,
I would like the script to run through each line of the file, search the InDesign file for that number, and if it finds it place the icon I specify after the text it just found. Here is some pseduo code I've been trying to figure out by piecing together other scripts.
while(input.hasNext())
{
var text = input.nextLine();
if(textExists == true)
app.findTextPreferences.findWhat = text;
app.changeTextPreferences.changeTo = text + " " + place("C:\\catalog\\icons\\Icon_install.ai") after the text found;
myDocument.changeText();
else
go to the next line
}
I would be using a text file that has part numbers in it like
4005
4003
5007
etc
I know a bit of java from school but not much JS. I'm really sorry for being so sloppy, but I'm new to JS. Any help would be appreciated.