1 Reply Latest reply on Aug 21, 2008 8:06 AM by (John_Morrissey)

    [VBS][CS3] Wait for spellcheck to close

      Hi Everyone,

      I'm writing a script that needs to trigger spell check, wait for the user to click 'done', and then continue on with the rest of the script. Here's a little script to illustrate the problem.

      ---
      Dim menuSpelling, menuEdit, myInDesign

      Set myInDesign = CreateObject("InDesign.Application.CS3")
      Set menuEdit = myInDesign.Menus.Item("Main").MenuElements.Item("Edit")
      Set menuSpelling = menuEdit.MenuElements.Item("Spelling").MenuElements.Item ("Check Spelling...")

      menuSpelling.AssociatedMenuAction.invoke

      Rem WAIT FOR 'DONE' TO BE CLICKED
      MsgBox("Now you cant interact with the spell checking dialog")
      'PreFlight function is run here

      Set myindesign = Nothing
      ----

      So when the script is run, it just keeps rolling after opening the spellcheck dialog. When the next dialog opens, the user cant interact with the spellcheck dialog.

      Can i capture the event when the 'Done' button has been clicked? Any other ideas?

      Thanks!!!!!

      Adam
        • 1. Re: [VBS][CS3] Wait for spellcheck to close
          Adam,

          Great Idea

          I'm looking for your working script that brings up the spell menu in IND CS3 before doc is close. Did you ever get it to work? Can you share the final working script?

          I'm on a Mac IND CS3.

          Just save it in javacript folder via menu scripts?

          How do I get it to work? What else do I have to do?
          Have an open doc with some text in it.
          Then save???
          How does prompt come up?