1 Reply Latest reply on Aug 26, 2016 12:22 AM by alsop89

    Applescript & photoshop font size problem

    alsop89

      Hi all, I'm struggling with text sizes with applescript & PS

       

      Basically I want to be able to type a number into a dialog box and have that change the content of the text layer in my document.

       

      My problem is that when I do all this it resizes the font, everything works except the font size. My best effort is to try and make the size a variable, but it seems to be struggling with getting the current font size and defaults it to 72pt.

       

      Here's my script

                set theImage to (choose file) as string

       

                     display dialog "Wash Count?" default answer ""

                     set count to text returned of result

       

                     tell application "Adobe Photoshop CC 2014"

        activate

       

                                 open file theImage

       

                                 set textsize to size of text object of art layer 1 of current document

       

       

                                 set contents of text object of art layer 1 of current document to count

                                 set size of text object of art layer 1 of current document to textsize

       

       

                    end tell

       

       

      Can anyone shed a little light on what's wrong?

       

      Cheers

       

       

      An