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

Need selection textframe width

$
0
0

Hi All,

 

simple Request:

 

If Selected textframe is "100mm" (alert pass)

 

Otherwise selected textframe is !=100mm (alert fail)

 

 

Code is below:

app.activeDocument.viewPreferences.horizontalMeasurementUnits = app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;

 

if(app.selection[0].geometricBounds[3] - app.selection[0].geometricBounds[1] == "100mm")

{

    alert("pass")

    }

else

{

    alert("fail")

    }

 

 

I dont know where I did mistake.

 

Could anyone give solution for my request.

 

Thanks in advance

Beginner_X


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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