17 Replies Latest reply on Feb 28, 2013 8:25 AM by Larry G. Schneider

    Problem applying stroke miter limit with applescript

    ukrulesok

      Hi, I have a bit of a problem with applescript, Im creating a Text item and setting the stroke to 0.4pt then i want the stroke miter limit to be set to 2 but it wont work i get :-

       

      Adobe Illustrator got an error: Can’t set properties of text frame 1 of layer 1 of document 1 to {stroke miter limit:2}. (error -10006)


      but im am able to apply a stroke miter limit of 2 on a path item, is there a way of converting the text frame to a path item then applying the stroke miter limit to it.

       

      heres my script :-

       

      on TicketFront_(posX, posY)

           tell application "Adobe Illustrator"

                activate

                set ticketItem to make new text frame in theDoc with properties {contents:{"Some Text"}, position:{(35.7 + posX) * 2.834645, (173.5 - posY) * 2.834645}}

                set properties of the text of ticketItem to {text font:text font "Raleway-Thin", size:5.54, justification:center, fill color:{class:spot color info, tint:100.0, spot:spot "PANTONE 4535 U" of document 1}, stroke color:{class:spot color info, tint:100.0, spot:spot "PANTONE 4535 U" of document 1}, horizontal scale:126.46, stroke weight:0.4}

       

                --This next line gives me the error

                set properties of ticketItem to {stroke miter limit:2}

           end tell

      end TicketFront_

       

      ive also tryed putting convert to paths ticketItem in the script which converts the text to paths but the stroke miter limit still dont work.

       

      Thanks in Advance.


      uk_rules_ok