0 Replies Latest reply on May 30, 2013 10:01 AM by Silly-V

    Applescript clicking dialog box.

    Silly-V Adobe Community Professional

      Hey yall!

       

      I have a strange problem on a Mac OS 10.7.5 .  I am basically trying to make a little applescript to select all the stuff in a document and run a big fat Flatten Transparency menu item on it to make it all nice and flat.  However, while clicking menu items with System Events works to bring up the Flatten Transparency dialog box, clicking inside the box does nothing but flicker the intended item briefly with no real result.  For example, click checkbox "Convert All Text to Outlines" flickers the box with a little blue highlight and does nothing. keystroke return ,though, does press OK and dismisses the box.  The concern here of course is being able to manipulate the dialog boxes properly with applescript and for this particular purpose the fact that not all users would have the appropriate settings for their Flatten Transparency options from their previous uses.

       

      Here is what I have so far:

       

      tell application "Adobe Illustrator"

          activate

          set user interaction level to interact with all

          repeat with increment from 1 to count of page items of current document

              set thisItem to page item increment of current document

              if thisItem is editable then

                  set selected of thisItem to true

              end if

          end repeat

      end tell

       

      tell application "System Events"

          tell process "Adobe Illustrator"

              click menu item 13 of menu "Object" of menu bar 1

          end tell

      end tell

       

      tell application "System Events"

          tell process "Adobe Illustrator"

              tell window "Flatten Transparency"

                  click checkbox "Convert All Text to Outlines"

                  keystroke return

              end tell

          end tell

      end tell

       

      Thanks for any advice! 

       

      --Silly