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

Please help me to correct my script!

$
0
0

I want to change my text first indent:

 

if the first indent = 0mm

I want to change the first indent = 8mm

 

I copy the script from Trevor, and change a little bit, but not work, so can someone help to correct my script?

 

var doc = app.properties.activeDocument,   

        myParas = doc && app.selection.length && app.selection[0].hasOwnProperty('paragraphs') && app.selection[0].paragraphs.everyItem ().getElements ().slice(0),   

        hvs = doc.viewPreferences.horizontalMeasurementUnits;   

if (app.changeGrepPreferences.firstLineIndent = 0) exit();   

doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS;   

    app.changeGrepPreferences.leftIndent  = 8;

    app.changeGrep();

     exit();

doc.viewPreferences.horizontalMeasurementUnits = hvs;


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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