1 Reply Latest reply on Sep 23, 2015 8:56 PM by Sudha K

    Applescript File open

    Sudha K Level 1

      Hi,

       

          I need to do some tasks in MathType.  I dono that there is any API for MathType. So I'm using Applescript to do this. The below code is used to click open menu, it brings open dialog. How to open file using applescript???

       

      tell application "MathType"

          activate

          tell application "System Events"

              click menu item "Open…" of menu 1 of menu bar item "File" of menu bar 1 of application process "MathType"

             

              --return properties of menu item of menu 1 of menu bar item "File" of menu bar 1 of application process "MathType"

          end tell

      end tell

       

       

      Thanks in advance,

      Sudha K

        • 1. Re: Applescript File open
          Sudha K Level 1

          Hi,

           

               Sorry i can open eps file using below code.

           

          set imgPath to choose file

          tell application "MathType"

              activate

             

              try

                  open imgPath

                  set docFlg to 1

              on error err number err_no

                  set docFlg to 0

              end try

              if docFlg is equal to 0 then

                  set errDocs to (imgPath as string) & ",File not open.

          "

              else

                  ---- Process ----

              end if

          end tell