April, 2007
Page 104



     --get the selected shape via the handler

     set selectedShape to my GetSelectedShape() -- paste it in below!

    

     tell text range of text frame of selectedShape

          repeat with i from 1 to count (characters)

              display dialog (get content of character i)

              --make every second character blue

              if i / 2 = i div 2 then

                   set font color of font of character i to {0, 0, 255}

              end if

          end repeat

         

          set g to 0

          repeat with i from 1 to count words

              display dialog (get content of word i)

              --make every word a different shade

              set g to g + 100

              if g > 255 then set g to 0

              set font color of font of word i to {0, g, 100}

          end repeat

         

          set AppleScript's text item delimiters to {", "}

          repeat with i from 1 to (count text flows)

              set theRun to text flow i

              display dialog (get content of theRun) & " - {" & ¬

                   font color of font of theRun & "}"