Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all 15932 articles
Browse latest View live

change second page size in 3-page spread

$
0
0

Hi,

 

I'm wondering, how can I change second page size in 3-page spread with ExtendScript?

(I'm trying to generate cover with spine)


how to move image from one page to another page using indesign javascript.

$
0
0

hi ,

right now i can able to move image from one place to another place using geometricBounds.. within single page its working fine.

now i want to move the image from one page to another page using indesign javscript.

Applied font style of paragraph

$
0
0

Hi,

 

     Paragraph contains more than one fontstyle.  If i use the below code, its return only one font style name. 

 

    alert( app.selection[0].fontStyle)

 

     How can i get all applied font style of paragraph??

 

 

Thanks in advance,

Sudha K

how to remove or delete empty line space between paragraphs

$
0
0

i want to remove or delete empty line space between paragraphs.

and in each page contents should be end in same line at the bottom..

like books...

Getting the attribute value from XML:error in Indesign 2015.0

$
0
0

Hi,

 

I can get the attribute value(product_id) from XML in previous InDesign versions. But i am not able to get the product_id value in InDesign CC 2015.0 version.

 

  1. main();
  2. function main()
  3. {
  4.         IterateDocument();
  5. }
  6. function IterateDocument()
  7. {
  8.     for(myCounter = 0; myCounter < app.activeDocument.activeLayer.textFrames.length; myCounter++)
  9.     {
  10.         myStory = app.activeDocument.activeLayer.textFrames.item(myCounter);
  11.         if((myStory.previousTextFrame==null &&  myStory.nextTextFrame==null)||(myStory.previousTextFrame!=null &&  myStory.nextTextFrame==null))
  12.         FitPageItem (myStory);
  13.     }
  14. }
  15. function FitPageItem (mySel)
  16. {   
  17. graphicItems = mySel.allGraphics;
  18. for(g=0;g<graphicItems.length;g++)
  19. {
  20. alert(graphicItems[g].parent.associatedXMLElement.xmlAttributes.itemByName("product_id").v alue);
  21. var tbguid = graphicItems[g].parent.associatedXMLElement.xmlAttributes.itemByName("product_id").value;
  22. .....
  23. .....
  24. }
  25. }

 

When i am trying to run the script, i am getting the "Object is invalid" error in line number 25th. Please help me to fix this issue in InDesign CC 2015.0 version.

 

 

Thanks,

Vimala L

section number page

$
0
0

I need to reset the selected pages number via scripting

 

 

Like 6 th page number needs to change 5-1 and 7th page needs to reset "6" with continues page numbering.

 

 

Is this possible via scripting

Export SVG in Indesign CS5?

$
0
0

hi,

 

i know that adobe canceled svg support for indesign at cs3. but it's really important that i find a way to export svg by scripting. has someone a tip? plugins for this are no solution.

 

thanks in advance!

How turn on or turn off track change button

$
0
0

Hi experts,

 

How to make a script for turn on or turn off change button.

 

I try to make this:

 

var myDocument = app.documents.item(0);

var myStory = myDocument.stories.item(0);

      myStory.trackChanges  == true;

 

but not working.

 

Regard

John


Installed font is not available

$
0
0

Hello everyone!

 

I'm trying to create a paragraph style with a custom font (Helvetica Neue LT Std). I've installed the font in my  Windows 8.1 and I can use it in InDesign 9.0.

 

My code sample:

myDocument.paragraphStyles.add({name:"name", pointSize:48, fillColor:  "color",  justification: VerticalJustification.centerAlign, appliedFont:  app.fonts.itemByName("Helvetica Neue LT Std")});

 

I'm typing several names and other ways (itemByName) to get the installed font, but i receive the same error: "the request font family is not available".

 

Hope you help me!

Thanks in advance.

 

PS scanning the available fonts i got the attached image

var myApplicationFonts = app.fonts;
var myFontNames = myApplicationFonts.everyItem().name;
for(var myCounter = 0;myCounter<myFontNames.length; myCounter++){        alert(myFontNames[myCounter]);
}

 

Cattura.PNG

How to accept all changes in InDesign Story

$
0
0

Hi experts,

 

How to accept all changes in indesign story,

Could someone show me how the make the script as below works.

 

Thanks

Regard

John

 

var changes = app.documents.item(0).stories.item(0).changes; 

        for (var i = changes.length-1; i >= 0; i--) { 

                changes[i].accept(); 

              } 

Selectable text from an alert dialog?

$
0
0

Javascript InDesign CS3 on a Mac, if that matters.

 

I took a quick look through the ScriptUI docs and couldn't find a widget for this, but maybe I missed it.

 

I'd like to display some alert text from a script and have the text in the alert dialog be cut-and-pasteable by the user. Is there an easy way to do this?

 

I'd really rather not have the text be editable-in-the-dialog by the user (looks ugly), and I'm absolutely happy with the quick-and-dirty interface of alert() -- that is, just passing a long string with internal newlines, and not having to spend much time mucking around with ScriptUI and dialog properties and layouts and layout managers, etc., etc.

 

Anyhow, is there a good way to do this? (I suppose I could pop up a dialog using AppleScript, but that really seems like the wrong answer...)

 

Thanks.

With CS3, some things have changed

$
0
0
Let's use this topic to record changes that are likely to affect a working script. As I did in the CS2 comparable topic, I'll add an index here in the topic title when the list is long enough (and I have the time).

how to get the xml element by selecting a text in vb.net?

$
0
0

Can anyone please tell me how can i know the element name of an selected text in indesign document using vb.net or vbs?

please help

Thanks

HttpWebRequest

$
0
0

How to make a web request using indesign java script

conditional text

$
0
0

how to apply conditional text through vbs or vb.net?

Please please please help

 

Thank you


With CS4, some things have changed

$
0
0
This topic is not about new features but changes, primarily in the object model, that will affect scripts that run perfectly well under CS3.

Bear in mind that as before, you can create a folder for previous version scripts and run from there, in which case the previous object model is employed -- indeed, CS4 allows you to do this for scripts all the way back to CS scripts. The Object Model Viewer in ESTK, once you've initialized it by opening it once and choosing the InDesign CS4 Object Model, allows you to see all four supported object models.

how to apply specific operations for anchored image and non-anchored image separately..

$
0
0

i want to make some  changes for anchored and non-anchored image separately..

so first i want to find anchored and non-anchored image ...

 

ScriptUI : edittext live modifications problem

$
0
0

Hi,

I set a scriptUI interface.

 

http://i.imagehost.org/0754/Image_1.png

I have two buttons :

     - one has to add a carriage return on the edittext field

     - one has to add tab.

I am using textselection property of the edittext object.

On Mac it works very fine.

On Windows, it just go crazy. Sometimes, it just ignores the click, other times, it adds the element unexpectingly.

ie tab or carriage return are placed everywhere but where I want it.

What do I do wrong ?

TIA Loic

Can I turn on or off data merge preview with script(any)?

$
0
0

I can not find a way to access the data merge preview option. I would assume it is under DataMergePreference, the same place I can control the record number to merge with. But I can not find any thing. Please help if you can.  Or is there an event that I can capture when it is turned off or on by the user? I might be able to make that work. My preference would be to turn it on and off by script.

It is scriptable to unthread paragraphs [or lists] to obtain single text frames?

$
0
0

The method I use is to break a story in many pages, splitting a text frame through the menu «Keep options» + «Start paragraph» in next page, and later apply a script that unthread the whole text. But it involves a lot of time and work not to mention to have the unthreaded stories isolated in dozens of pages.


But my known scripts to thread/unthread text perhaps only manage frames and never paragraphs.


The idea is to convert this kind of paragraph/lists in four single stories

Fig. 180 - Risks 2010-2014

Fig. 181 – Devaluation  2009-2014

Fig. 182 – Inflation 2008

Fig. 183 – Average Consumer Price Index

Viewing all 15932 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>