Items created on one side of the spread need to be duplicated and moved to the other side (template information, etc.). We need the preferences in InDesign CS1-CS5 to remember layers when pasting during the running of the script, but we don't want to permanently hijack the customers preferences.
Is there a way to 1) check a preference setting, 2) apply a change if needed, and then 3) return the setting to its previous state only if changed?
Thanks in advance,
I'm not sure if this was even a preference pre-CS3, and, if so, if it always has been exposed to the scripting engine. In CS4, it is scriptable as a boolean value:
.. and the usual way of working around nasty user preferences is this:
1. Start of script:
originalValue = app.clipboardPreferences.pasteRemembersLayers;
app.clipboardPreferences.pasteRemembersLayers = true;
2. Do Your Stuff.
3. End of script:
app.clipboardPreferences.pasteRemembersLayers = orginalValue;
One of the guys tried it with a similar boolean if/then statement and it worked. We will try the slimmed down code you've shown. I'm sure it will work. Thanks again.