Copy link to clipboard
Copied
Hi i have JSXBIN script & i Want To apply it on all pages,
all pages basically have TextBoxs & script basically just change size of the Text.
since it is in JSXBIN format, i cannot edit it.
what should i do.
plz help me
Try the following
var myLayer = app.activeDocument.layers.itemByName("FitWord");
for(var counter = 0; counter < myLayer.textFrames.length; counter++)
{
app.select(myLayer.textFrames[counter])
app.doScript("/Users/katrodiyadhaval/Desktop/jsxbintest.jsxbin"); //Change this to the path of your jsxbin
}
Copy link to clipboard
Copied
If the jsxbin works fine on a single page then you can write an new script that calls up the jsxbin on all the pages. Look for doScript method it should be of use to you in this case.
-Manan
Copy link to clipboard
Copied
hi thanx for such a quick reply, & yes the script works perfectly fine on single page
let Me describe how this script is working :
First, I have to select TextBox & then the Script do its job.
If you run Script without selecting the TextBox, it say's [ No Text Selected! ]
I don't know about scripting, plz help
Copy link to clipboard
Copied
Try the code below
for(var i = 0; i < app.activeDocument.textFrames.length; i++)
{
app.select(app.activeDocument.textFrames)
app.doScript("/Users/katrodiyadhaval/Desktop/jsxbintest.jsxbin"); //Change this to the path of your jsxbin
}
This should work if all the jsxbin needs is a text frame selected.
-Manan
Copy link to clipboard
Copied
ok let me try
Copy link to clipboard
Copied
i have tried your code,but it worked for 1st & 2nd Page. but then on 3rd page process stuck on continuous loop.
by the way, i am using Indesign CC 2018
& Textbox is inside a layer named "FitWord"
& the Script i am using is FillTextFrame.jsxbin
Copy link to clipboard
Copied
I don't see why it should get stuck in a loop. Send me the document that has this issue, i will have a look.
Copy link to clipboard
Copied
ok, here is the file
https://drive.google.com/open?id=1Uqukwh9OZwidfT3jr-o9cu0Elwa3i7za
here is the jsxbin script
https://drive.google.com/open?id=1kWy16dSm5LhgajAs3gNaSCKjCblMrigw
here is your script
https://drive.google.com/open?id=1PRfOENmpZqJbbjHFc78OSQ8yvBxBUkPM
Copy link to clipboard
Copied
change the variable from i to counter in the code that i gave and then run it, it should work.
Copy link to clipboard
Copied
Yes it worked thank you so much.
but your script select all textBoxs, i just want to select : a Textbox, that is inside a layer named "FitWord"
because there will be many other textboxs in same page, i don't want to appy JSXBIN script to all textboxes of same page.
Copy link to clipboard
Copied
Try the following
var myLayer = app.activeDocument.layers.itemByName("FitWord");
for(var counter = 0; counter < myLayer.textFrames.length; counter++)
{
app.select(myLayer.textFrames[counter])
app.doScript("/Users/katrodiyadhaval/Desktop/jsxbintest.jsxbin"); //Change this to the path of your jsxbin
}
Copy link to clipboard
Copied
You made my day, thank you thank you so much
Copy link to clipboard
Copied
Hi i am using Batch processor script to run my script.
but as i mention above first i need to select all textboxs on all pages.
otherwise script says [ No Text Selected! ]
So how can i select all TextBox ?
by the way the Textbox is inside a layer named "FitWord"
Link : Batch processor