Script style paragraph indent

Hi all

is there anyway to reverse the withdrawal value left to right indent on all paragraph styles in the document as shown

1.png

Thanks in advance

Hello

Try this:

var
    pStyles = app.activeDocument.allParagraphStyles,
    cStyle, cRightIndent;
  // jump over [None]
pStyles.shift();
  // iterate through all
  while (cStyle = pStyles.shift()) {
      cRightIndent = cStyle.rightIndent;
      cStyle.rightIndent = cStyle.leftIndent;
      cStyle.leftIndent = cRightIndent;
      }

Jarek

Tags: InDesign

Similar Questions

  • second line to the paragraph indented using styles?

    made anyone know if its possible in Indesign to do the second line of the paragraph indented using styles?

    I'm working on a book and I put the first word of each paragraph to be slightly larger and a different font to the rest of the paragraph. I did it using a style nested with the paragraph style. I also want to do what the second line is indented from the amount of space to the first word on the first line. This isn't problem doing this maunally but I want to find a way to define a style for this so that I can compose the book like this.

    any help is appreciated!

    Looks like you're talking to "drop words".

    On this page: http://in-tools.com/plugin.php?p=24

    In addition to the commercial product, there is a (simpler) free script on the page to create using drop caps.

    Substances

  • Problem with CS4 paragraph indentation styles

    Problem with CS4 paragraph indentation styles: specificities of the indentation suddenly APPEAR differently but reading the same thing (in the paragraph style palette) on page 5 to 6 and beyond. (He has no character style applied to text and no change to the page margins. The same master page is applied to all.) On page 5 when I pull the box down, the type is indented correctly, but when I flow on page 6, it goes to a different print and looks bad for the style.

    Both frames have the same applied object style? Have you checked text to overlay text block options?

  • Change any paragraph by script style

    Hello!!!

    Is it possible change one paragraph selected with any paragraph style by script?

    Example:

    My paragraph style is:

    Font: Garamond, 7pt size, color: black, align justfy (or select any paragraph style)

    Script to set selected with the paragraph style paragraph describe above to:

    Police: Humanist, sise 8pt, color: black, align justfy

    Drop cap: number of lines: 3, one or more characters: 2

    Thanks for your script, Ford Foxy!

    Try this

    var myPara = app.selection [0] .paragraphs [0];
    var myChar = myPara.characters [0];
    myPara.dropCapCharacters = 1;
    myPara.dropCapLines = 2;
    myPara.dropcapDetail = 1;
    myPara.firstLineIndent = 0;

    myPara.dropCapStyle = 'My Style'

    My Syle should be created in the Style of character, of course.

  • Character styles Styles/paragraph in student Cs5 for Mac edition

    I don't have character styles/paragraph Styles in Photoshop Cs5 for Mac student edition.

    If you are looking for some educational media which includes, you look at a beta feature that does not in the final version.

    CS6?

  • paragraph indentation

    Hello, I am trying to find a way to put the first word of a paragraph indented. When I choose "dash" in the menu text, it will indent the entire box of text in the paragraph. I want to dash is the first word as the text looks like regular paragraph formatting. Thank you, Bob

    You can add some css to theof your document, like this:

    As long as your paragraphs are part of

    then the first line
    each paragraph in the

    Tags will be indented 15px.

    Hope that helps!

    Robert Scorby wrote:
    > Hello, I am trying to figure out how to indent the first word of a paragraph.
    > When I choose 'dash' in the menu text, it will indent the entire box of text in
    > paragraph. I want to dash is the first word, such that the text looks
    > as a regular paragraph formatting. Thank you, Bob
    >

  • Change the paragraph by Script Style

    Hello!

    I don't know if this is the right place for this question but since its related to scripting, I'll ask here.

    Is it possible to change the paragraph Styles InDesign with a Script?

    For example, I need set Format1 hyphenation to specific values properties without changing the other properties. For Format2, I need to change other properties such as the Glph scaling.

    Like I need to do this with a lot of files, I suppose that the best way to archive it could be a script.

    Is there someone who had an idea on how to do it?

    Thanks in advance

    Thomas

    You're right, this can be done very effectively with a (relatively) simple script. This is an excerpt from a longer script of mine which covers a changing choice of design of end minutes documents open at once:

    for (i=0; i
    

    For a list of all paragraph properties that you can change, look in the ESTK help or (in a more user-friendly way to read and search) in an online version of these same data: InDesign ExtendScript API (10.0).

  • Bike via script of paragraph styles - need help

    Hello

    I have a large document (potentially 3000 pages), on each page is a picture of a picture frame and inside each image is a famous quote. I need to type in each quote so I have 10 configuration value different paragraph styles in a different font. I need a script that applies "QuoteStyle1" the text on the first page, "QuoteStyle2" on the next page, etc., and once that 'QuoteStyle10' has been applied the script performs a loop and continues to scroll through the styles apply a style that is different on each page, until it reaches the end of the document.

    I got a start on the script (see image), but I think the problem is the line 11 - I want to run the script without having to select anything.

    Some additional info that may or may not be of use - all quotes are drawn from a data merge. There is also a name and a color from the data merge. The background on each frame is a different color and that is created with the a very large 'rule below' in a number of other paragraph styles. They are applied with a 'Find & ReplacebyList' i.e. find replace 'Red' with the paragraph style "ColourRed. In the script, I tried to ignore these "color" paragraph styles (lines 2-9) is only the 'quote' styles that the effects of the script.

    Any help getting this race would be more useful.Screen Shot 2015-07-15 at 10.01.20.png

    First of all congratulations for the very creative use of blending modes. I would have never thought about it by myself.

    Now, for the script, here are two ways to do it (both enjoy the fact that you use a paragraph style BaseQuote):

    (1) use a grep search:

    var doc=app.activeDocument;
    var baseQ=doc.paragraphStyles.item('BaseQuoteStyle');
    var switchToStyles=[
    'QuoteStyle1',
    'QuoteStyle2',
    'QuoteStyle3',
    'QuoteStyle4',
    'QuoteStyle5',
    'QuoteStyle6',
    'QuoteStyle7',
    'QuoteStyle8',
    'QuoteStyle9',
    'QuoteStyle10'];
    var l=switchToStyles.length;
    app.findGrepPreferences=app.findChangeGrepOptions=null;
    app.findGrepPreferences.appliedParagraphStyle=baseQ;
    app.findChangeGrepOptions.includeMasterPages=false;
    var quotes=doc.findGrep();
    for (var i=0; i
    

    (2) scroll all managers of related texts:

    var doc=app.activeDocument;
    var baseQ=doc.paragraphStyles.item('BaseQuoteStyle');
    var pags=doc.pages.everyItem().getElements();
    var switchToStyles=[
    'QuoteStyle1',
    'QuoteStyle2',
    'QuoteStyle3',
    'QuoteStyle4',
    'QuoteStyle5',
    'QuoteStyle6',
    'QuoteStyle7',
    'QuoteStyle8',
    'QuoteStyle9',
    'QuoteStyle10'];
    var l=switchToStyles.length;
    for (var p=0;p		   
  • Script for grep that looks for the B of paragraph style paragraph style

    Hello

    I am fairly new to scripting in Indesign, and I ran across something I want script that I do not know how. Among the paragraph styles that are in our files are Normal and song. I need to add an extra paragraph return between all instances of normal followed by a song. I tried to search the forums to see if what was already here somewhere, and if it is I didn't come through it. I want to implement in the form of script grep, but if anyone has another way to do it, I would like to know also.

    Thanks in advance

    Hello

    For example, you can use a script.

    I guess a block of text with a correct history is selected and the history is in a setting or related frameworks.

    ....

    monarticle = app.selection [0] .parentStory;

    If (myStory.constructor.name! == 'Story')

    {

    Alert (' select a destination text block, then try to pls\rand ");

    Exit();

    }

    myNormal = app.activeDocument.paragraphStyles.item ("Normal");

    mySong = app.activeDocument.paragraphStyles.item ("Song");

    app.findTextPreferences = null;

    app.findTextPreferences.appliedParagraphStyle = mySong;

    mFound = myStory.findText ();

    Len = mFound.length - 1;

    If (len > = 0)

    While (len)-

    {

    currPara = .paragraphs mFound [len] [0];

    If (.appliedParagraphStyle myStory.paragraphs.previousItem (currPara) is myNormal)

    currPara.insertionPoints [0] .silence = "\r";

    }

    ...

    Rgds

  • Script of paragraph style

    Hi all

    I use InDesign for a newspaper until it goes to press. I created all the necessary paragraph styles, however they are not available on every new page, so I have to manually load them from a template. We are part of a chain of newspapers and do not receive our internal models, so it is difficult to have the styles incorporated into models, created from the master page to the company. It would be wise for companies to provide the same styles to all their papers, but I guess it would make too much sense.

    Is there a way to create a script or another method be more easily able to load styles of paragraph for each page of the log. Some of my colleagues were really struggling with that and so that they use the wrong fonts, sizes etc. which is a real problem come press time. Thanks in advance.

    Brandon

    Seems to me that it is a reasonable request to have a script, preferably that is triggered by the command file open, that could automate load styles to a reference document if there is no way to get the model fitted with the correct styles upstream. Is this the best solution? No, but it would save time and ensure that the styles are always loaded and always loaded from the same source, reducing errors.

  • Change the font in the Style Script of paragraph?

    Does anyone know if there is a script to go through paragraph Styles and change the font of the other?

    Also, when it is to reduce the size of police/leader at the same time, or in two separate scripts, which would be sweet utra.

    Thanks to all those who can help in advance.

    littlemookie

    I don't know if there's a script to do this, so one here that I just did to the top. This is assuming you are using CS3 (you don't mention a version), and there are small differences between the versions of ID, so he can't run right now.

    for (var i = 2; I have
    {
    app.activeDocument.paragraphStyles [i] .appliedFont = "Helvetica";
    app.activeDocument.paragraphStyles [i] .pointSize * = 0.80;

    If (app.activeDocument.paragraphStyles [i] .leading! = Leading.AUTO)
    app.activeDocument.paragraphStyles [i] .leading * = 0.80;
    }

    "It ignores the 2 first paragraph styles because those who are"[none]"and [standard paragraph]", and apparently, it's bad karma to mess with those.

    The first line inside the loop simply sets the font. An additional style specifier (for example, 'Normal', 'Bold') is left out because you have something already there. Notice that if you try to change "Helvetica-Bold" for, say, a Frutiger, it will not be correct first time round - Frutiger is not "" BOLD"," it's called "" 65 BOLD"" for this family. Well, you can't all win'em.

    The second line takes the current set point size and multiplies it with 0.80, resulting in a new size of 80% of the previous.

    Lines possible 3rd & 4th first test for a complication. If your leader is set to automatic, you don't have to make it smaller (even worse: JavaScript code tries to multiply Leading.AUTO 0.80 and will be the bomb out with an error). Only when the value to a value fixed, it will reduce to 80%.

  • Is it possible to add bullets to a paragraph via script styles?

    According to the model object, it isn't, but I wanted to check

    bulletCharBallReadOnlyChip.

    I need to know if it is possible to take some character and turn it into a character of the ball.

    TIA

    Loïc

    Hi, love!
    Why not?
    Make a new paragraph style in the user interface with your custom chip and test it yourself in the ESTK:

    _paraStyle.bulletChar.properties.toSource ();

    This will give you (all r/w):

    characterValue:
    bulletsFont:
    bulletsFontStyle:

    _paraStyle.bulletChar.characterType //(r/w)

    This will give you alternatively:

    BulletCharacterType.UNICODE_ONLY

    BulletCharacterType.UNICODE_WITH_FONT

    BulletCharacterType.GLYPH_WITH_FONT

    Uwe

  • Dave Saunders update find the script style/change case

    How can I update a script of Dave Saunders of CS1 and CS2 to CS5?

    He wrote a brilliant script that looks for a paragraph style and becomes the upper case or lower.

    However, it was for CS1 and CS2.   I can't make it work on CS5.

    it triggers in

    app.findPreferences = null;
    object does not support the "findPreferences".

    Here's the script.  Thanks for your help!

    DESCRIPTION: Converts the text referred to the designated case parastyle

    If ((app.documents.length! = 0) & & (app.selection.length! = 0)) {}
    myDoc = app.activeDocument;
    myStyles = myDoc.paragraphStyles;
    myStringList = myStyles.everyItem () .name;
    myCaseList = ["uppercase","tiny", "Title case", "Sentence case"];
    myCases = [ChangecaseMode.uppercase, ChangecaseMode.lowercase, ChangecaseMode.titlecase, ChangecaseMode.sentencecase];

    myDialog = app.dialogs.add var ({name: 'Case changer'})
    {with (MyDialog)}
    {with (dialogColumns.Add ())}
    with (dialogRows.add ()) {}
    with (dialogColumns.add ()) {}
    staticTexts.add ({staticLabel: "Style of paragraph :"});})
    }
    with (dialogColumns.add ()) {}
    myStyle = dropdowns.add({stringList:myStringList,selectedIndex:0,minWidth:133});)
    }
    }
    with (dialogRows.add ()) {}
    with (dialogColumns.add ()) {}
    staticTexts.add ({staticLabel: "change case to :"}); "})
    }
    with (dialogColumns.add ()) {}
    myCase = dropdowns.add({stringList:myCaseList,selectedIndex:0,minWidth:133});)
    }
    }
    }
    }
    Ditto var = myDialog.show ();
    If (ditto! = true) {}
    the user has clicked Cancel
    myDialog.destroy ();
    errorExit();
    }
    theStyle = myStyle.selectedIndex;
    Case = myCase.selectedIndex;
    myDialog.destroy ();

    app.findPreferences = null;
    app.changePreferences = null;
    myFinds = myDoc.search (', false, false, undefined, {appliedParagraphStyle:myStyles[theStyle]});})
    myLim = myFinds.length;
    for (var j = 0; myLim > j; j ++) {}
    myFinds [j] .texts [0] .changecase (myCases [theCase]);
    }

    } else {}
    errorExit();
    }

    +++ Functions start here +++

    function errorExit (message) {}
    If (arguments.length > 0) {}
    If (app.version! = 3) {beep()} / / CS2 includes beep() function.
    Alert (message);
    }
    Exit(); CS ends with a beep; CS2 left silently.
    }

    I had wanted this script to work for centuries, as well, but I started studying javascript in InDesign several weeks reading Scripting InDesign CS3/4 with Javascript by Peter Kahrel. Even though it says CS3/4, he won't be in CS5. Not sure if Peter put updated recently or not.

    In any case, thanks to that and Haakenlid and Manan help, I was able to update the script and make it work successfully. I the extent of change "app.findPreferences = null;" to "app.findTextPreferencess = NothingEnum.NOTHING;", but I was stuck on line 43 (myFinds = myDoc.search...). I had to change something in the code of Haakenlid: "appliedParagraphStyle" should be "appliedCharacterStyle". Without further ADO, here's the script fixed:

    DESCRIPTION: update the script of ChangeCaseOfSelectedStyle of Dave Saunder for CS5 and later

    If ((app.documents.length! = 0) & (app.selection.length! = 0)) {}

    myDoc = app.activeDocument;

    myStyles = myDoc.characterStyles;

    myStringList = myStyles.everyItem () .name;

    myCaseList = ["uppercase","tiny", "Title case", "Sentence case"];

    myCases = [ChangecaseMode.uppercase, ChangecaseMode.lowercase, ChangecaseMode.titlecase, ChangecaseMode.sentencecase];

    myDialog = app.dialogs.add var ({name: 'Case changer'})

    {with (MyDialog)}

    {with (dialogColumns.Add ())}

    with (dialogRows.add ()) {}

    with (dialogColumns.add ()) {}

    staticTexts.add ({staticLabel: "Style of character :"});})

    }

    with (dialogColumns.add ()) {}

    myStyle = dropdowns.add({stringList:myStringList,selectedIndex:0,minWidth:133});)

    }

    }

    with (dialogRows.add ()) {}

    with (dialogColumns.add ()) {}

    staticTexts.add ({staticLabel: "change case to :"}); "})

    }

    with (dialogColumns.add ()) {}

    myCase = dropdowns.add({stringList:myCaseList,selectedIndex:0,minWidth:133});)

    }

    }

    }

    }

    Ditto var = myDialog.show ();

    If (ditto! = true) {}

    the user has clicked Cancel

    myDialog.destroy ();

    errorExit();

    }

    theStyle = myStyle.selectedIndex;

    Case = myCase.selectedIndex;

    myDialog.destroy ();

    app.findTextPreferences = NothingEnum.NOTHING;

    app.changeTextPreferences = NothingEnum.NOTHING;

    app.findTextPreferences.appliedCharacterStyle = myStyles [theStyle]; var myFinds = myDoc.findText ();

    myLim = myFinds.length;

    for (var j = 0; myLim > j; j ++) {}

    myFinds [j] .texts [0] .changecase (myCases [theCase]);

    }

    } else {}

    errorExit();

    }

    +++ Functions start here +++

    function errorExit (message) {}

    If (arguments.length > 0) {}

    If (app.version! = 3) {beep()}

    Alert (message);

    }

    Exit();

    }

  • In a group of styles paragraph style

    How you refer to a paragraph style that is part of a group of styles?

    Here's the script:

    FRM.paragraphs [0] .appliedParagraphStyle = "Title";

    But the problem is that the "Title" style into a group called "headings" ' so, how should I do for him? "

    Thank you.

    Hello
    When paragraphStyles in paragraphStyleGroup, parent of paragraphStyles is paragraphStyleGroup.
    apply styles as below:

    var pStyleGroup = app.activeDocument.paragraphStyleGroups.itemByName ('Headings');
    titleStyle var = pStyleGroup.paragraphStyles.itemByName ('Title')
    FRM.paragraphs [0] .appliedParagraphStyle = titleStyle;

    Ten

  • find style paragraphs and it should be placed as marginal notes...

    Hi everone,

    We have the script to find paragraphs by his style and cut these paragraphs in the main column of the page and paste it into the new block of text and it will be placed as marginal notes. After putting the first marginal note, the script displays error as "Reference could not be found." Also, we have this marginal notes as anchor text. Find the script below and suggest me,

    //===============

    myDocument var = app.activeDocument;

    myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;

    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;

    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

    myDocument.zeroPoint = new Array (0, 0);

    MyPage = app.layoutWindows var [0].activePage.side;

    var mypage2 = app.layoutWindows [0].activePage.name;

    orientation of the var;

    If (mypage is 1919382632)

    direction = "Right";

    on the other

    direction = "Left";

    try {}

    mySelection var = null;

    mySelection var = myDocument.selection [0];

    If (mySelection == null) {}

    alert ("select any block of text, then run it);

    exit (0) ;}

    myDocument.textFramePreferences.textColumnCount = 1;

    for (i = 0; i < mySelection.paragraphs.length; i ++)

    {

    if (mySelection.paragraphs [i].appliedParagraphStyle.name == "M-Term")

          {

                var a = i + 1;

    mySelection.paragraphs [i] .select (SelectionOptions.replaceWith);

    while (mySelection.paragraphs [a].appliedParagraphStyle.name == "M - Def") {}

    mySelection.paragraphs [a] .select (SelectionOptions.addTo);

                            a++;}

                app.cut ();

    if (direction == "Left")

    var myframe = myDocument.pages.item (mypage2).textFrames.add ({visibleBounds: ["120 pt", "pt 42", "pt 190", "pt 156"], table of contents: "S"});

                else

    myframe var = myDocument.pages.item (mypage2).textFrames.add ({visibleBounds: ["350 pt", "457 pt", "438 pt", "571 pt"], table of contents: "S"});

    myframe.paragraphs [0] .select (SelectionOptions.replaceWith);

    app.paste ();

    myframe.fit (FitOptions.frameToContent);

          }

          }

    {catch (e) {alert (e) ;}

    //=====================

    Can someone help me with this.

    Thanks in advance...

    Indana

    > all placed paragraphs are by default for the standard paragraph style and these paragraphs are losing its style as a paragraph style formats, but also the style of character. Style formats are not preserved as the same.

    This is because when you do

    myText.contents = myFind [i] .silence;

    you copy all the contents of text, none of the setting in the form. To get the items found as well as their blowdry, try something like this instead:

    myFind [i] .move (LocationOptions.after, myText.insertionPoints [0]);

    Of course, then you must remove the line myFind [i] .remove (); because there is nothing to move.

    Peter

Maybe you are looking for

  • ZTE open speaker will not be making the noise

    I just got my ZTE open mail today, everything worked very well until the sound no longer works. I have reset my phone several times and tried to adjust the parameters, but the President has stopped working. I can very well answering calls. But the ph

  • High sampling rate for 18 strings in a single task - DAQmx

    Hello My current experiences require the acquisition of 18 channels (6 HAVE custom voltage with excitement, voltage AI 12) data at a sampling frequency of 50 kHz. My question is if it is faesible using a single cDAQ-9172 chassis. Used modules are 2 x

  • Calibration of stereo content

    Hello! Is it possible to open the .calib file that LabVIEW creates after calibration, to itself, which is in the file? What is its content? What information? gbbalint

  • How to stop mode standby to come during the film?

    When I get to watch a movie on netflix, (laptop) HP goes there and gets the movie I want. Now when I watch the movie the screen saver turns on until I move the mouse. Very annoying because it goes into mode 'sleep' all the world or so minutes. What t

  • UNABLE to get the drive letter of the disk 0 Partition 1

    Hello world. Well, yesterday I tried to install Ubuntu netbook edition 10.10. Well, in the middle of something was wrong and it corrupted the Windows partition. Linux is installed, but Windows is damaged. I'm on a Gateway laptop, and I have a recover