Toggle display modes on selected frame Indesign script
//Assign a keyboard shortcut for fast use
//Toggles High performance, Typical, High Quality object-level display modes for selected frame
var sel = app.selection;
if (sel[0].allGraphics.length > 0) {
if (sel[0].allGraphics[0].localDisplaySetting == ViewDisplaySettings.OPTIMIZED) {
sel[0].allGraphics[0].localDisplaySetting = ViewDisplaySettings.TYPICAL;
} else if (sel[0].allGraphics[0].localDisplaySetting == ViewDisplaySettings.TYPICAL) {
sel[0].allGraphics[0].localDisplaySetting = ViewDisplaySettings.HIGH_QUALITY;
} else if (sel[0].allGraphics[0].localDisplaySetting == ViewDisplaySettings.HIGH_QUALITY) {
sel[0].allGraphics[0].localDisplaySetting = ViewDisplaySettings.OPTIMIZED;
}
} else {
if (sel[0].localDisplaySetting == ViewDisplaySettings.OPTIMIZED) {
sel[0].localDisplaySetting = ViewDisplaySettings.TYPICAL;
} else if (sel[0].localDisplaySetting == ViewDisplaySettings.TYPICAL) {
sel[0].localDisplaySetting = ViewDisplaySettings.HIGH_QUALITY;
} else if (sel[0].localDisplaySetting == ViewDisplaySettings.HIGH_QUALITY) {
sel[0].localDisplaySetting = ViewDisplaySettings.OPTIMIZED;
}
}