1 Reply Latest reply on Nov 26, 2010 2:55 PM by mikeytttt

    ID5 Applescript Image into MultiState object

    mikeytttt Level 1

      Does anyone know how to place images into a MultiState Object using Applescript?

       

      I have a empty mutlistate rectangle on the page, with three states already set up (named state 1, state 2, state 3)

       

      I tried the following (myMSO is the multistateobject) but it doesn't work.

       

         
          tell state 1 of myMSO
              place file theImage

          end tell

       

       

      If it's not possible to script placing an image into a state of a multistateobject, I had then thought of first creating each rectangle individually and placing each image in each rectangle, then combinng the three rectangles to make a MultiStateObject (Manually you can do this by selecting the three rectangles and then opening the Object States panel and clicking NEW)

       

      Might there be a way to do this via applescript as I've found no reference to it?

       

      Many thanks

        • 1. Re: ID5 Applescript Image into MultiState object
          mikeytttt Level 1

          Hooray - solved it....

           

           

                  set myMSO to make multi state object with properties {name:"images", geometric bounds:{72, 72, 144, 144}}
                     
                  tell state 1 of myMSO
                      set myrectangle1 to make rectangle with properties {geometric bounds:{72, 72, 144, 144}}
                      tell myrectangle1
                          place theImage1
                      end tell
                  end tell