I've come across a script for InDesign that toggles on the 'Paste Remembers Layers' menu item.
I would LOVE a visual toggle as I use this all the time but for now this will do (unless anyone knows of something similar/better)
The issue is it only switches it ON. I would love to assign a keyboard shortcut to toggle it between ON/OFF or one for each, etc.
Can anyone tweak this for me or have any other suggestions?
Thanks in advance
// toggle "Paste Remembers Layers"
var rem_paste_lay = app.menuActions.item('$ID/Set Paste Remembers');
var bk = rem_paste_lay.checked;
if (bk == true) {
rem_paste_lay.invoke(); // if true toggle to false
};
// restore
if (rem_paste_lay.checked !== bk) {
rem_paste_lay.invoke(); // if not eq bk toggle
};
2
and5
it should toggle. If you want some indicator for the state, you can keep line3
and add this at bottomalert('Paste Remembers Layers \n' + bk ? 'unchecked' ? 'checked' );
. An alert window should pop up after every toggle that gives you the current state. — I did not test any of this.var rem_paste_lay = app.menuActions.item('$ID/Set Paste Remembers'); rem_paste_lay.invoke(); alert('Paste Remembers Layers: \n' + (rem_paste_lay.checked ? 'ON' : 'OFF') );