Created
November 16, 2019 10:57
-
-
Save MarshySwamp/898ae3237305787d0683125166aeb480 to your computer and use it in GitHub Desktop.
Code Snippet: Save and Restore Dialogs or Rulers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save the current ruler units and set to pixels | |
var savedRuler = app.preferences.rulerUnits; | |
app.preferences.rulerUnits = Units.PIXELS; | |
// Do stuff... | |
// Restore the ruler units | |
app.preferences.rulerUnits = savedRuler; | |
// Save the current dialog display settings | |
var savedDisplayDialogs = app.displayDialogs; | |
app.displayDialogs = DialogModes.NO; | |
// Do stuff... | |
// Restore the dialogs | |
app.displayDialogs = savedDisplayDialogs; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment