Discussion:
Setting Preferences Script (apple script) ID CS3
(too old to reply)
R***@adobeforums.com
2009-02-11 12:47:35 UTC
Permalink
Power Pc G5 Mac Indesign 3

Hello Im trying to set the preferences in indesign to a common set with in the studio.

After reading the help files I understoud I can't copy the preferences file to each computer and have to make a script.

I downloaded a load of resources of the adobe web site. And found a script that sets rule units (see below).

--ViewPreferences.applescript
--An InDesign CS3 AppleScript
--
--Sets the measurement units to points.
--Assumes you have a document open.
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 horizontal measurement units to points
set vertical measurement units to points

end tell
end tell

this worked well

This looked like a good starting point, all I,ve got to do is set all the preferences. but I cant work out how you get the names eg 'horizontal measurement in view preferences' in indesign its units & increments; rule units: horizontal.

For a start I tried to get it to change the origin so I edited the script (see below), I also tried to change keyboard Increments with no joy.
Can anyone help?
In the indesign help files they make it sound easy... (the old copying quark preferences file to each computer was).

Regards Rupert

--ViewPreferences.applescript
--An InDesign CS3 AppleScript
--
--Sets the measurement units to points.
--Assumes you have a document open.
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 origin to page
set horizontal measurement units to points
set vertical measurement units to points

end tell



end tell
S***@adobeforums.com
2009-02-11 16:28:51 UTC
Permalink
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

Continue reading on narkive:
Search results for 'Setting Preferences Script (apple script) ID CS3' (Questions and Answers)
65
replies
Should i get a macbook or a laptop with vista?
started 2007-01-31 17:58:46 UTC
laptops & notebooks
Loading...