Skip to main content
Inspiring
June 9, 2014
Answered

Change preference setting by script

  • June 9, 2014
  • 2 replies
  • 2152 views

Dear All

How to change Auto correct,Grid preferences by scripts.

And also its anything possible to change all preferences by script?

Thanks

ASHRAM

This topic has been closed for replies.
Correct answer Jongware

as well as InDesign Preference Settings (which, despite its shown status, is answered).

2 replies

Jongware
Community Expert
Community Expert
June 10, 2014

ASHOK KUMAR wrote:

And also its anything possible to change all preferences by script?

This has been asked, and answered, before: Indesign Preferences

Jongware
Community Expert
JongwareCommunity ExpertCorrect answer
Community Expert
June 10, 2014

as well as InDesign Preference Settings (which, despite its shown status, is answered).

Inspiring
June 10, 2014

Hi Jongware,

Now. It's working. Thanks for your valuable information.

Thanks

ASHRAM

bagonterman
Inspiring
June 9, 2014

Here is a script I use to set my preference for appearance of black. It runs from the startup.

#targetengine "session"

app.scriptPreferences.version = 5.0;

main();

function main(){

    var myEventListener = app.addEventListener("afterOpen", opaqueBlack, false);

   

}

///////////////////////////////////////////////

function opaqueBlack(myEvent){

    //var myDocument = myEvent.parent;

    var myDocument=app.documents[0];

myDocument.documentPreferences.overprintBlack= false;

    

}

Inspiring
June 10, 2014

Hi

Thanks for your code.

But I like code below model.

myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;

myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

Thanks

ASHRAM

Chinnadk
Legend
June 10, 2014

Hi Ashram,

Try this.

app.autoCorrectPreferences.autoCorrect = true;

app.activeDocument.gridPreferences.baselineColor = [20,20,20];

Regards,

Chinna