🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1356

Re: Setting Preferences Script (apple script) ID CS3

#1356
From: SuperMacGuy
Date: Wed, 11 Feb 2009 16:28
14 lines
1846 bytes
Hi Rupert,
your reference for the page origin is not correct. You can't just say "origin" its actually "ruler origin" and to set it, you have to use the constant "page origin".
If you are using Script Editor, or Script Debugger, you'll see that in your script the word "origin" is probably green. Green is a variable name. And you want to talk to the object or class, which will always show up in blue. Another tip, not sure how far along in scripting you are, is you should open up the dictionary for InDesign and you can see the classes and objects and keywords it uses. It's a little obtuse for beginners, but what you need is actually all there. You'll find many preferences aren't just "there" in Indesign, you must tell the View preference, or Document Preferences, or PDF export preferences, etc. You will definitely want to look at the Dictionary.

tell application "Adobe InDesign CS3"
	tell view preferences
		--Measurement unit choices are:
		--picas, points, inches, inches decimal, millimeters, centimeters, or ciceros
		--Set horizontal and vertical measurement units to points.
		set ruler origin to page origin
		set horizontal measurement units to points
		set vertical measurement units to points	
	end tell
end tell
Technical Details
Message-ID: <59b7e19c.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b7e19c.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,5e985da59c8a72cb
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: SuperMacGuy@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Setting Preferences Script (apple script) ID CS3
Message-ID: <59b7e19c.0@webcrossing.la2eafNXanI>
Date: Wed, 11 Feb 2009 08:28:51 -0800
References: <59b7e19c.-1@webcrossing.la2eafNXanI>
Lines: 26
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit