2 Replies Latest reply on Nov 9, 2018 1:16 AM by MANDELWERK

    afterOpen event listener triggers also before open... (applescript)



      First post here (I think) although I have been working with applescripting InDesign for a long time =)


      Yesterday I did my first try with an event listener, it works, but the problem is that it triggers twice, once before the document has opened and once when it is open.
      I thought "afterOpen" should do what it sounds like... Am I doing something wrong here?


      tell application "Finder"

        set TheDesktop to (path to desktop as text)

      end tell


      tell application "Adobe InDesign CC 2014"

        set TheScript to TheDesktop & "Startuptest.app"

        make event listener with properties {event type:"afterOpen", handler:TheScript}

      end tell