how to create a list of text(String) and use it in illustrator script.
Hello, I would like to find/replace words. For that i am trying to create a list of words(for as many as I have) and then use them in the script in a loop. so, I modified the script but can't figure out how to make it work my way.
*so the parts of the initial script are this (which is working):
layers = app.activeDocument.layers
var config = {
targets: [
{
find: "textA",
replace:"TextB",
.
.
.
frame.contents = frame.contents.replace(target.find, target.replace);
*I modified to smth like this:
layers = app.activeDocument.layers
var config = {
targets: [
{
find: [],
replace:[],
find[0]:"TextA1"
replace[0]:"TextB1"
find[1]:"TextA2"
replace[1]:"TextB2"
.
.
.
for (var i=0;i<=1;i++){
frame.contents = frame.contents.replace(target.find[i], target.replace[i]);
}
I am really stuck in this issue. Thank you in advance for your usual help.
