4 Replies Latest reply on Feb 8, 2015 6:21 AM by Peter Kahrel

    Script for Screen Mode toggle in InDesign?

    LadyJemima Level 1

      I spent the day resetting my workflows and keyboard shortcuts as I transition from CS5.5 over to CC. In Photoshop and Illustrator, pressing the F key toggles between screen modes. In InDesign CS5.5, it did the same. However, CC doesn’t seem to have this feature. It wants to assign three different shortcuts for Normal, Preview, and Presentation screens. Is there there any way to script an “F” key toggle between modes?

        • 1. Re: Script for Screen Mode toggle in InDesign?
          pixxxel schubser Level 5

          LadyJemima schrieb:

           

          In Photoshop and Illustrator, pressing the F key toggles between screen modes. In InDesign CS5.5, it did the same. However, CC doesn’t seem to have this feature …

           

          in InDesign the [W]-key is the standard toggle key since years. (Note: I don't have CC+)

           

          LadyJemima schrieb:

           

          In InDesign CS5.5, it did the same …

          No.

          Only, if user defined.

          • 2. Re: Script for Screen Mode toggle in InDesign?
            LadyJemima Level 1

            I must have defined it and just didn't remember. Unfortunately CC doesn't allow this anymore; each screen mode has a different key command. I toggle constantly and really hope I can figure out a way to script this...

            • 3. Re: Script for Screen Mode toggle in InDesign?
              Peter Kahrel Adobe Community Professional & MVP

              In the keyboard shortcut editor, assign a shortcut to the following script:

               

              var nextMode = {
                  'PREVIEW_OFF' : ScreenModeOptions.PREVIEW_TO_PAGE,
                  'PREVIEW_TO_PAGE': ScreenModeOptions.PRESENTATION_PREVIEW,
                  'PRESENTATION_PREVIEW': ScreenModeOptions.PREVIEW_OFF
              }
              
              app.documents[0].layoutWindows[0].screenMode = nextMode[String(app.documents[0].layoutWindows[0].screenMode)];
              

               

              You can change the order in which the modes toggle by modifying the nextMode object.

               

              Peter

              • 4. Re: Script for Screen Mode toggle in InDesign?
                Peter Kahrel Adobe Community Professional & MVP

                Or you could do it like this:

                 

                switch (String(app.documents[0].layoutWindows[0].screenMode)) {
                    'PREVIEW_OFF' : app.documents[0].layoutWindows[0].screenMode = ScreenModeOptions.PREVIEW_TO_PAGE; break;
                    'PREVIEW_TO_PAGE': app.documents[0].layoutWindows[0].screenMode = ScreenModeOptions.PRESENTATION_PREVIEW; break;
                    'PRESENTATION_PREVIEW': app.documents[0].layoutWindows[0].screenMode = ScreenModeOptions.PREVIEW_OFF;
                }
                

                 

                P.