How to add reply for indesign notes.
This feature is available in indesign
How to add reply for indesign notes.
This feature is available in indesign
Hi all,
I am using InDesign CS6 and need help with a script (JavaScript)
I'm doing the exact same thing as this previous discussion below, Exporting MathType equations from Word as EPS files and then trying to place them into my indesign file.
Batch importing eps equations into Indesign
Since this discussion, is there a better script or method to import .eps files? (see screenshot below)
I placed my Word file into InDesign. What I think this script is supposed to do is replace all the @Equ021.eps@ file names with those images in the file path on line 23.
Below is the script I am using and apparently all I needed to do was save my script after I entered the path name on line 23. (The person who gave me this no longer works with me so I am on my own)
When I try to save, I receive the error:
I'm very new to scripting so what does this error below mean, and what do I need to do to fix it?
Thanks for any help! I have thousands of these equations and would hate to import them one by one.
I've been putting together a text on ScriptUI, to a large extent to clear up things for myself (hence the title!). It's an introduction to ScriptUI, much of it very basic, here and there going into some detail. It's not a finished product, and comments, suggestions, and corrections are welcome. If you're interested, you can find the PDF file here: http://www.kahrel.plus.com/indesign/scriptui.html
Peter
Is it a way to get a colored button in the ScriptUI DOM ?
I tried
dlg.button1.graphics.backgroundColor = dlg.button1.graphics.newBrush(dlg.button1.graphics.BrushType.SOLID_COLOR,[0.7,0.7,0.7],1);
But although the dialog is drawn, the button is not styled in best case, not visible in the worst case.
Is that possible to get a colored button ?
Hope so.
Do you have any tip ?
TIA
Loic
Hi experts
Could someone show me how to full stroke color to none.
regard
John
how to make it works?
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().strokes.every Item().fillColor = "None";
Hi,
has anyone been able to implement a JS library for RSA encryption in ExtendScript?
I've been using CryptoJS quite successfully, but it lacks a RSA module. I've tried travist/jsencrypt · GitHub with no luck (ExtendScript complains for few things, like window and navigator), I'll be trying digitalbazaar/forge · GitHub too in the next days.
Any suggestion is welcome.
Thank you!
Davide Barranca
Hi experts
Could some show me how make this script working?
thanks
Regard
John
var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
docs.layers.add({name: "pics"});
docs.rectangles.everyItem().itermLayer = "pics"
}
alert("Finish.")
I want add a layer "pics" in all open docs, then move all pics to the layer "pics".
Progress bars are something that my scripts have lacked as I mainly program in AppleScript. I had resorted to using an outside app as a progress bar in my scripts...
But no more!! I have borrowed Marc Autret's Javascript progress bar code from this post and made it into some handy handlers. I hope this helps other people too.
Here they are in an example AppleScript.
on myProgressBarCreate(pbBarName, firstAction, pbMax) set pbJS to "#targetengine 'pbar' var ProgressBar = function(/*str*/title) { var w = new Window('palette', ' '+title, {x:0, y:0, width:340, height:60}), pb = w.add('progressbar', {x:20, y:12, width:300, height:12}, 0, 100), st = w.add('statictext', {x:10, y:36, width:320, height:20}, ''); st.justify = 'center'; w.center(); this.reset = function(msg,maxValue) { st.text = msg; pb.value = 0; pb.maxvalue = maxValue||0; pb.visible = !!maxValue; w.show(); }; this.hit = function() {++pb.value;}; this.hide = function() {w.hide();}; this.close = function() {w.close();}; }; pBar = new ProgressBar('" & pbBarName & "'); pBar.reset('" & firstAction & "', " &a pbMax & ");" tell application "Adobe InDesign CS5" activate do script pbJS language javascript end tell end myProgressBarCreate on myProgressBarIncrement() set pbJS to "#targetengine 'pbar' pBar.hit()" tell application "Adobe InDesign CS5" to do script pbJS language javascript end myProgressBarIncrement on myProgressBarReset(newAction, newMax) set pbJS to "#targetengine 'pbar' pBar.reset('" & newAction & "', " & newMax & ");" tell application "Adobe InDesign CS5" to do script pbJS language javascript end myProgressBarReset on myProgressBarClose() set pbJS to "#targetengine 'pbar' pBar.close();" tell application "Adobe InDesign CS5" to do script pbJS language javascript end myProgressBarClose tell application "Adobe InDesign CS5" activate my myProgressBarCreate("Test", "PDFing...", 10) repeat 10 times my myProgressBarIncrement() delay 0.25 end epeat my myProgressBarReset("Creating pages...", 5) repeat 5 times my myProgressBarIncrement() delay 0.5 end repeat my myProgressBarClose() end tell
Hi experts
I want to open the indd files which in the instance of folder.
How can I make it works.
my script as below, could some tell me what's wrong with the script.
Regard
John
#target indesign
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
var folder = Folder.selectDialog ("Select the root folder");
var myfiles = [];
getsubfolderfiles(folder);
for(var i =0;i<myfiles.length;i++)
{
var docs = app.open(myfiles[i]);
for (i = docs.length-1; i >= 0; i--) {
var myTables = docs[i].stories.everyItem().tables.everyItem().getElements()
for ( t = 0; t < myTables.length; t++ ){
myTables[t].cells.everyItem().texts.everyItem().fillColor = "Black";
myTables[t].cells.everyItem().fillColor = "None";
myTables[t].cells.everyItem().leftEdgeStrokeColor = "None";
myTables[t].cells.everyItem().rightEdgeStrokeColor = "None";
myTables[t].cells.everyItem().topEdgeStrokeColor = "None";
myTables[t].cells.everyItem().bottomEdgeStrokeColor = "None";
}
}
}
function getsubfolderfiles(folder)
{
var filelist = folder.getFiles();
for(var i =0;i<filelist.length;i++)
{
if(filelist[i] instanceof Folder)
{
getsubfolderfiles (filelist[i]);
}
else if(filelist[i] instanceof File)
{
if(filelist[i].name.indexOf(".indd") > -1){
myfiles.push(filelist[i]);
}
}
}
}
var docs = app.documents;
for (var i = docs.length-1; i >= 0; i--) {
if(docs[i].saved == false){
docs[i].close(SaveOptions.NO);
}
else if(docs[i].close(SaveOptions.YES));
}
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
alert("Finish.")
As the title of my post says... I'm struggling to understand CoordinateSpaces. I read the description provided in the 'Adobe InDesign CS6 JavaScript Scripting Guide' and I created a simple document to confirm my understanding. But the results I received were not as expected and I don't think I understanding some core concepts.
I will write some blocks of code and then try to explain what I think they work.
$.writeln( document.selection[0].resolve( [[0,0], BoundingBoxLimits.GEOMETRIC_PATH_BOUNDS], CoordinateSpaces.PAGE_COORDINATES )[0] );
This functions as I expected. The following is a breakdown of the arguments and my understanding of them:
Now this is all understandable but then I saw the following code on indiscripts:
$.writeln( document.selection[0].resolve( [[0,0], BoundingBoxLimits.GEOMETRIC_PATH_BOUNDS, CoordinateSpaces.INNER_COORDINATES], CoordinateSpaces.INNER_COORDINATES)[0];
So as you can see this example the introduction of a coordinate space in the first argument confuses me. If somebody could help me understand its purpose I would really appreciate it.
Also I have the following questions about coordinate spaces:
Hi experts,
I have a script for find table and change properties.
Could someone show me how to make it works.
Regard
John
myDoc = app.activeDocument;
findTable();
function findTable(){
for ( s = myDoc.stories.length-1; s >= 0; s-- ){
for ( t = myDoc.stories[s].tables.length-1; t >= 0; t-- ){
myTable = myDoc.stories[s].tables[t];
tables[t].cells.everyItem().texts.everyItem().fillColor = "Black";
tables[t].cells.everyItem().fillColor = "None";
tables[t].cells.everyItem().leftEdgeStrokeColor = "None";
tables[t].cells.everyItem().rightEdgeStrokeColor = "None";
tables[t].cells.everyItem().topEdgeStrokeColor = "None";
tables[t].cells.everyItem().bottomEdgeStrokeColor = "None";
}
}
}
alert("Finish.")
i dont want to delete or remove the empty cells in my table , but i want skip or ingore the empty cells..
when doing tab alignment to that table..
I need to convert tables and boxes in eps format. Is this possible via scripting.
I need to find a script that can take urls from a .txt file and merge them into an indesign document INTO text that reads "LINK TO ARTICLE". There are many different urls going into the document. I can already do the data merge and it places the url in text form. Then i can convert them to active hyperlinks. What i need to be able to do is insert the urls as a hyperlink into the text, rather than just showing a long string of text/url.
Any help?
Thank you very much!!!
AD
I am laying out a scholarly book, and have just finished the index. Now I need to find which entries are in footnotes, and get the footnote number. I will then manually edit the generated index to include the footnote numbers. Each chapter is in a separate story within the same Indesign document (not an Indesign Book), and the footnote numbering starts over at the beginning of each chapter/story. I have also included some of the front matter in the index, so I do have entries in lower-case roman numerals.
Example.
Original: A se ipso (Aseity) 190, 231, 253, 269, 270, 272, 274
Edited: A se ipso (Aseity) 190, 231nn96-97, 253, 269, 270n201, 272, 274
The logic I am thinking of would go something like:
Open new document
For each index entry
If (in footnote)
Get and output: topic, (tab) page number/range associated with entry, (tab) footnote number (new line)
end if
end For Each
end script
Alternatively, I could
Search through only footnotes
at each entry output: topic, (tab) page number/range associated with entry, (tab) footnote number (new line)
In another thread, I saw this:
This may be what I am looking for, but i am not yet sure, since I also saw that "index" refers to the z-order.
Unfortunately, I am not familiar with Indesign Scripting, so the actual piecing it together by myself is, currently, beyond me. I could do this manually (I have started doing so) but that will take quite a while, and this book is already overdue.
God reward you,
brother Charles, FI
Is it a way to get a colored button in the ScriptUI DOM ?
I tried
dlg.button1.graphics.backgroundColor = dlg.button1.graphics.newBrush(dlg.button1.graphics.BrushType.SOLID_COLOR,[0.7,0.7,0.7],1);
But although the dialog is drawn, the button is not styled in best case, not visible in the worst case.
Is that possible to get a colored button ?
Hope so.
Do you have any tip ?
TIA
Loic
I
want to find the nested applied characters and apply the Cstyle, but my code capture all those text in a document. Can you please guide to me,
nestedreport();
function nestedreport(){
var myDoc = app.activeDocument;
var myDocPath = myDoc.filePath;
var myDocName = myDoc.name;
try{
app.findGrepPreferences = app.changeTextPreferences = null;
app.findGrepPreferences.findWhat = "^.+";
myFind=myDoc.findGrep(false);
var ntexts = new Array;
for(i=myFind.length-1;i>=0;i--)
{
if(myFind[i].contents.nestedStyles==null)
{
ntexts.push(myFind[i].contents)
ntexts.appliedCharacterStyle="Nested";
}
}
}
catch(e){}
}
Hi, All.
How do I remove a table?
MySpread.TextFrames(I1).Tables(I2).Remove - doesn't work.
Thanks in advance.
I need to replace the xml attribute value "M05_LEMO9433_06_SE_CH05" to M05_LEMO5401_06_SE_CH05
In document having more than thousand entries
I have used the below code but it is not working
function AddReturns(){
this.name = "AddReturns";
this.xpath = "//p//span//a";
this.apply = function(myElement, myRuleProcessor){
with(myElement)
{
try{
// if (myElement.xmlAttributes.item("href").value.match ("LEMO9433 "))
{
var fig = myElement.xmlAttributes.itemByName("href").value;
var figv = fig.replace ("9433", "O5401")
myElement.xmlAttributes.itemByName("href").value=figv;
}
//myElement.xmlAttributes.item("id").name = "olinkend";
}catch(e){}
}
return true;
}
}