Does no one have a solution to this? I'm frustrated :/
Re: How to delete xml content without deleting the content of the object?
Re: find specific hyphenated word
Jong, something is curious as premio_oscar admitted the script is working.
Yes, of course I will check.
Thanks for your time.
Re: find specific hyphenated word
hi camilo umana,
I select a word and than start the script.
in this way the script doesn't give any error message.
If I don't select nothing and start the script then I have the same error message as your.
Re: ID CC 2014 plus ExtendScript (Yosemite) slow to the point of not working...
So, I am glad I am not alone. If this makes sense. I am thinking of using a different editor. But it seems to me Adobe should help.
Ralf
Re: find specific hyphenated word
Premio,
Thanks.
You may find P. Kahrel's scripts mentioned before also very interesting.
For example, you get in a whistle a list like this:
Kaka_nia
illu_sion
after_ward
kill_ings
with_in
cul_tivated
haphaz_ard
uni_fying
we need a script that will select clipping path for multiple images in indesign
this is what we have, but it's not working:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
app.doScript(resetAllClippingPathsToActiveDoc, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Reset all Clipping Paths of the Active Document");
function resetAllClippingPathsToActiveDoc(){
var d=app.activeDocument;
var allGraphicsInDoc = d.allGraphics;
for(var n=0;n<allGraphicsInDoc.length;n++){
if(allGraphicsInDoc[n].hasOwnProperty("clippingPath")){allGraphicsInDoc[n].clippingPath.c lippingType = ClippingPathType.PHOTOSHOP_PATH};
allGraphicsInDoc[n].clippingPath.appliedPathName = "Path 1";
};
};
Re: find specific hyphenated word
Thank you camilo for the Kahrel's script.
Bulk anchor images
Hi there,
My first post here, thanks for having me!
I've just received an indd file holding 200+ image files. The publisher has asked me to create an epub. Now, on export, all the images end up appended to the back of the book. I could go and manually anchor all these object frames to their relevant positions, thereby including them in the text flow, but I am a human being: LAZY.
There should be a way to automate this. The images are in the correct position on the page and it shouldn't be all that hard to anchor them to empty paragraphs on the same page, or to the relevant subtitle which happens to be in the text flow.
I've done several google searches, but as of right now, I'm confident that no-one has written a script that performs this task. Or at least, if someone has, they have not made it publicly available.
Now, I've dabbled in JS for a while last year, and I'd like to take a stab at writing this. But I'm not clear on where to start. The ID Script documentation does not mention object frames, images, or anchoring with respect to either.
Could you point me in the right direction?
Re: Need grep expression to change index page numbers
The answer to your original question is "no". Regular expression (the RE in GREP) is purely syntactical and doesn't work on a semantic level. To it, "12" is a series of two characters which happen to be digits, it has no way of interpreting it as the number "twelve", let alone processing it any further with arithmetic operation like addition.
Line number of selected text from footnote
Hi,
I can get the line number of selected text from document but throwing the error for footnote. How can i get the line number for text from footnote.
Can anyone guide me...
function getLineNumber(myText)
{
try{
var myTF = myText.parentTextFrames[0];
//myTF.select()
line_number = myTF.characters.itemByRange(myTF.characters[0], myText).lines.length;
line_number = line_number-1;
return line_number;
}catch(e){return null;}
}
Thanks in advance,
Sudha K
I have two textframes on one page. But when iterating using everyitem() it picks second prior to first?
Hi Expert's
I have two textframes on one page. But when iterating using everyitem() it picks second prior to first?
var ObjDoc = app.activeDocument;
var LstPara = ObjDoc.pages.everyItem().textFrames.everyItem().paragraphs.everyItem().getElements();
for(var c1=0;c1<LstPara.length;c1++)
{
var par = LstPara[c1];
$.writeln(par.contents.toString());
}
is there any specific reason for that? Please explain
Re: I have two textframes on one page. But when iterating using everyitem() it picks second prior to first?
To solve your issue, try the below code:
var ObjDoc = app.activeDocument; var LstTxtFrame = ObjDoc.pages.everyItem().textFrames.everyItem().getElements(); for(var c1=LstTxtFrame.length-1;c1>=0;c1--) { var LstPara = LstTxtFrame[c1].paragraphs.everyItem().getElements(); for(var c2=0;c2<LstPara.length;c2++) { var par = LstPara[c2]; $.writeln(par.contents.toString()); } }
I have two textframes on one page. But when iterating using everyitem() it picks second prior to first?
is there any specific reason for that? Please explain
InDesign text frames will work in LIFO (Last in first out) method, i.e., the last created text frame will be treated as a first frame in for loop, hence try the above code.
Vandy
Object Layer Visibility - change layer visibility of linked files
Hello guys ,
can you, please, help me out?
I have indesign file(catalogue) with bunch of other linked indesign files(product cards). In those linked indesign files I have several different text layers that I control (show/hide) in main indesign file (catalogue) using "Object Layer Options". I've also selected "Keep Layer Visibility Overrides" so that if I accidentaly hide layer in linked file(product card), it does not affect my catalogue.
Now I need a script, that goes through my catalogue, finds all links(product cards) and makes one layer visible, and another layer invisible. But here's a catch: I dont want to do it in source files(product card), but in the main (catalogue) file (via "Object Layer Options").
Layers in all product cards has same names.
Do you think that there's a script that can make it?
Thank you for all your help
(For further understanding, those text layers I need to show/hide contains different translations)
Set top and bottom inset spacing values in Text Frame Options via jsx script
I am looking for a way to set the top and bottom inset spacing values only to 2 points in Text Frame Options via a .jsx scrpt.
For years, I have used a script that sets Preferences, such as:
with(app.storyPreferences){
opticalMarginAlignment = false;
opticalMarginSize = 12; // pts
I would like to add the code to this same script that would make Top = 0p2 and Bottom 0p2 but leave Left and Right as 0p0.
Any help would be greatly appreciated.
Re: Find Overlap Frames Pages
How do you use this - what is the process of saving this as a file and what file type please?
script with replace some of the characters respectively
I want to change some of the characters respectively
where error
app.findGrepPreferences = app.changeGrepPreferences = null;
app.changeGrepPreferences.appliedFont = "Symbol";
app.findGrepPreferences.findWhat = {"α", "é", "β"};
app.changeGrepPreferences.changeTo = {"à", "é", "á"};
app.changeGrepPreferences.appliedCharacterStyle = myChar1;
app.activeDocument.changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
Re: script with replace some of the characters respectively
That's not going to work! This isn't .NET where everything is done for you.
You'll have to take the characters, put them into 2 arrays (no need for
objects), then loop through the arrays.
findWhat and changeTo can only take a single search query.
Re: script with replace some of the characters respectively
OK I writed a script
but How can I change the font of "a" character
main ();
function main(){
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
if(app.documents.length >= 1){
var myDoc=app.activeDocument;
editT(myDoc);
}
else
{
alert("Pleace Open İndesign Doc");
}
}
function editT(myDoc)
{
var oldA =["a", "b", "c"]
var newA =["1", "2", "3"]
var changee =[["a",0],["b",0],["c",0]]
for (var i=0; i<oldA.length; i++)
{
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
app.findChangeTextOptions.caseSensitive = true;
app.findChangeTextOptions.includeFootnotes = false;
app.findChangeTextOptions.includeHiddenLayers = false;
app.findChangeTextOptions.includeLockedLayersForFind = false;
app.findChangeTextOptions.includeLockedStoriesForFind = false;
app.findChangeTextOptions.includeMasterPages = false;
app.findChangeTextOptions.wholeWord = false;
app.findTextPreferences.findWhat = oldA[i]
app.changeTextPreferences.changeTo = newA[i];
changee[i][1] = app.activeDocument.changeText().length;
myDoc.changeText();
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
}
}
Re: script with replace some of the characters respectively
O have a question Pleace look forum
4 Aralık 2014 Perşembe tarihinde, <forums_noreply@adobe.com> yazdı:
script with replace some of the characters respectively created by
<https://forums.adobe.com/people/%5BAriel%5D> in *InDesign
Scripting* - View the full discussion
<>
Re: script with replace some of the characters respectively
Good, that script should work.
I would recommend to take out of the loop all the findChangeTextOptions
and everything like that. It is unnecessary to reset them with each loop
of the loop. Just do it once outside the loop, and in the loop change
only the findWhat text and changeTo text.
Regarding your question about the font: well, that is another question
entirely, so it should be in a new thread.