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

Variables not returning correct value if script is run in InDesign

$
0
0

Ok, here is a snippet of my script.

 

tellapplication "Adobe InDesign CC"

  setaspActiveDocumenttoactive document

  tellview preferencesofaspActiveDocument

  --get horizontal measurement units

  setaspOrigHorizonalMeasurementUnitstohorizontal measurement units

  setaspOrigVerticalMeasurementUnitstovertical measurement units

  setaspTryThistohorizontal measurement unitsasstring

  --set horizontal measurement units

  sethorizontal measurement unitstomillimeters

  setvertical measurement unitstomillimeters

  endtell

 

  setaspDocHeighttoitem 3 ofboundsofpage 1 ofaspActiveDocument

  setaspDocHeighttoaspDocHeightasstring

  setaspDocWidthtoitem 4 ofboundsofpage 1 ofaspActiveDocument

  setaspDocWidthtoaspDocWidthasstring

 

  setaspSizeInfoto (aspDocWidth& " x " & aspDocHeight& " " & aspTryThis) asstring

  display dialogaspSizeInfo

endtell


If I run it from AppleScript Editor I get: 215.9 x 279.4 millimeters

 

If I save it as an Application I get: 215.9 x 279.4 <<constant ****zmms>>

 

If I run the script from the scripts panel in InDesign I get: 215.9 x 279.4 <<constant ****zmms>>

 

Anyone have any idea why or how to fix this issue?




Viewing all articles
Browse latest Browse all 15932

Trending Articles



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