Set InDesign Preferences

I’m trying to write a script that will set the InDesign preference “Save Document Preview Image,” under file handling.

According to the InDesign Scripting Resource guide this would be a general preference property.

Property: includePreview
Property Type:Boolean
Access: r/w
Description: If true, include a preview when saving the document.

I have tried the following scripts, and none seem to work. The scripts compile and run, but nothing happens.


tell application "InDesign CS"
	set properties of general preferences to {includPreview:true}
end tell

AND


tell application "InDesign CS"
	set my_preferences to general preferences
	tell my_preferences
		set includePreview to true
	end tell
end tell

Any help would be greatly appreciated.

wexie,

I believe that the guide you’re looking at is primarily for Java (not positive about this. I say this because I have not been able to locate an AppleScripting guide for Indesign myself.). But anyway, when you compile your script (as long as you haven’t changed the preferences) your variables turn green. The includePreview has compiled to a variable. If you use script editor and open the dictionary for Indesign you will find that there is a space between the include and preview. So. . .

set include preview to true

Hope this helps.

PreTech

Dude, you so rule. That was the problem. The scripting reference guide was incorrect, or may be for CS 2. I’m not sure.

There are two documents for scripting in InDesign. One is a scripting guide (which is much shorter) and a complete reference guide (which is much longer. Note, the file is so large, Preview keeps crashing when I try and open it. It opens fine in the full version of acrobat)

Both guides cover Applescript, JavaScript, and VBScript.

You can find them at:

http://www.adobe.com/products/indesign/pdfs/InDesign_Scripting_Guide.pdf

http://www.adobe.com/products/indesign/pdfs/InDesign_Scripting_Reference.pdf

If you have any problem finding them, let me know.

Steve

Thanks for the info on where to find the guides! I have been away from any computers for the last few days so this is the first I have seen your posting.

PreTech