4 Replies Latest reply on Nov 9, 2009 7:08 AM by rjbull

    Type on text path VBScript CS2

    rjbull

      I am having issus with the FlipPathEffect property

       

      I can read the current valu but get an error when trying to set it.

      any suggestions?

       

      Here is part of my code

       

       

      Set myInDesign = CreateObject("InDesign.Application.CS2")
      myInDesign.Activate

      'open the template
      set myDocument = myInDesign.Open(theTemplateFolder & theTemplateName)

      Set myPage = myDocument.Pages.Item(1)
      set myTextFrame = myPage.TextFrames.item (frameToUse)
      Set myTextPath = myTextFrame.TextPaths.Add


      x = myTextPath.FlipPathEffect
      msgbox x

      myTextPath.FlipPathEffect 2036755568

      'myTextPath.Texts.FlipPathEffect  2036755568     '1852206192 not flipped

      myTextPath.Contents = theValue1
      x = myTextPath.FlipPathEffect
      msgbox x

      theFont = "Helvetica Neue LT Std 55 Roman"
      theSize = "5.5"

      myTextPath.Texts.Item(1).AppliedFont = theFont
      myTextPath.Texts.Item(1).PointSize = theSize

        • 1. Re: Type on text path VBScript CS2
          AdobeScripts Level 3

          x = myTextPath.FlipPathEffect
          msgbox x

          myTextPath.FlipPathEffect 2036755568

          'myTextPath.Texts.FlipPathEffect  2036755568     '1852206192 not flipped

           

          because this is Property:

           

          myTextPath.FlipPathEffect = 2036755568

           

          robin

           

          www.adobescripts.co.uk

          • 2. Re: Type on text path VBScript CS2
            rjbull Level 1

            Thanks for the suggestion but it still does not work for me.

             

            I am using CS2 is that the same version you are testing with?

             

             

             

            This still gives the same error. I have tried to set the flip to not flipped as well as flipped but get the same error.

             

             

             

            This is my code...

             

            set myDocument = myInDesign.Open(theTemplateFolder & theTemplateName)

             

             

             

            Set myPage = myDocument.Pages.Item(1)

             

            set myTextFrame = myPage.TextFrames.item (frameToUse)

             

            'Set myTextPath = myTextFrame.TextPaths.Add

             

            Set myTextPath = myTextFrame.TextPaths.Item(1)

             

             

             

            '--add the text

             

            myTextPath.Contents = theValue1

             

             

             

             

             

             

             

             

             

            ' 2036755568 flipped

             

            '1852206192 not flipped

             

            x = myTextPath.FlipPathEffect

             

            msgbox "the flip it  " &  x

             

             

             

            myTextPath.FlipPathEffectidFlipValues.idFlipped = 1852206192

             

            myTextPath.Texts.FlipPathEffect.idFlipValues.idFlipped = 2036755568  

             

            'myTextPath.Texts.Item(1).FlipPathEffect 2036755568                                                '2036755568 flipped  2036755568

             

             

             

            This is the error

             

             

            ---------------------------
            Windows Script Host
            ---------------------------
            Script: C:\Documents and Settings\rjbull\Desktop\InDesign_variable-curve5.vbs
            Line: 80
            Char: 1
            Error: Object doesn't support this property or method: 'myTextPath.FlipPathEffectidFlipValues'
            Code: 800A01B6
            Source:  Microsoft VBScript runtime error

            ---------------------------
            OK  
            ---------------------------

            • 3. Re: Type on text path VBScript CS2
              AdobeScripts Level 3

              myTextPath.FlipPathEffectidFlipValues.idFlipped = 1852206192

               

              This is the error

               

              ---------------------------
              Windows Script Host
              ---------------------------
              Script: C:\Documents and Settings\rjbull\Desktop\InDesign_variable-curve5.vbs
              Line: 80
              Char: 1
              Error: Object doesn't support this property or method: 'myTextPath.FlipPathEffectidFlipValues'
              Code: 800A01B6
              Source:  Microsoft VBScript runtime error

               

              the message error is very clear - you have error in line:

              myTextPath.FlipPathEffectidFlipValues.idFlipped = 1852206192

               

              you have joined two old lines ?

               

              what if you use exactly my line:

               

              myTextPath.FlipPathEffect = 1852206192

               

              robin

               

              www.adobescripts.co.uk

              • 4. Re: Type on text path VBScript CS2
                rjbull Level 1

                You are correct! It does work.

                 

                I just had too much garbage from earlier attempts.

                 

                Thanks.