0 Replies Latest reply on Mar 13, 2015 9:09 AM by brunog35080961

    Delay command within Indesign script

    brunog35080961

      I have a problem with "delay" command in a script.

      If I launch the script in AppleScrip Editor the delay is in effect but if I launch the script from Script Palett of InDesign the delay command is bypassed.

       

      There is an InDescign script command that suspend the execution of script as delay command

       

      This is the script

       

      tell application "Adobe InDesign CC 2014"

          activate

          if (count documents) is not equal to 0 then

              repeat

                  set mySelection to selection

                  set myTextClasses to {word, text style range, line, paragraph, text column, text, story}

                  if (count mySelection) is not equal to 0 and class of item 1 of selection is in myTextClasses then

                      exit repeat

                  else

                          set Risposta to display dialog ("Select a text") buttons {"OK", "CANCEL"}

                          delay 5

                  end if

              end repeat

          else

              display dialog ("No document opened.")

          end if

      end tell