Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Clip Script HELP Variables

Expand Messages
  • Ronald Reagan
    ... rd, Only thing I can think of is you have no line 11 in the file you re testing it on? Or the line does not contain ten characters? **-That was the reason
    Message 1 of 15 , Sep 19, 2005
    • 0 Attachment
      --- rpdooling <rpdooling@...> wrote:

      > Both clips work on my machine running NoteTab Pro.
      > Only thing I can
      > think of is you have no line 11 in the file you're
      > testing it on? Or
      > the line does not contain ten characters?
      >
      > Sorry
      >
      > rd
      >
      > --- In ntb-clips@yahoogroups.com, "Don -
      > htmlfixit.com" <don@h...> wrote:
      > > Ronald Reagan wrote:
      > > > I am having problems using Variables
      > > >
      > > > The following works in a text document
      > > > ^!SetCursor 11:1
      > > > ^!SelectTo 11:10
      > > >
      > > > The following does not
      > > > ^!SetDebug On
      > > >
      > > > ^!Set %xTest%=10
      > > > ^!Set %yTest%=11
      > > > ^!SetCursor ^%yTest%:1
      > > > ^!SelectTo ^%yTest%:^%xTest%
      > > >
      > > I get stuff like this to work all the time in
      > clips, so this is odd
      > > behavior. Are you sure there isn't a typo? In
      > debug, what does it say
      > > in the box? It should fill in the variables in
      > the prompt just before
      > > it goes forward. You might also try an info to
      > see if the variable is
      > > set to what you expect.
      >
      >
      >
      rd,
      Only thing I can think of is you have no line 11 in
      the file you're testing it on?
      Or the line does not contain ten characters?

      **-That was the reason I provided the SAME
      instructions absent the VARIBLES in the first in order
      to provide evidence, it does work. On the TEXT
      document tested, for both set of instructions, there
      is indeed an eleventh row and a ten character (column)
      long word on said row.-**

      It simply won't execute the 2 variable filled
      instructions.
      Thank you rd for your time and effort,
      -T






      __________________________________
      Yahoo! Mail - PC Magazine Editors' Choice 2005
      http://mail.yahoo.com
    • Ronald Reagan
      ... hsavage, If you strictly want to use variables **-Forgive me, I find this to be both odd and a humorous statement considering it s in the context of CLIPs.
      Message 2 of 15 , Sep 19, 2005
      • 0 Attachment
        --- hsavage <hsavage@...> wrote:

        > Ronald Reagan wrote:
        > > I am having problems using Variables
        > >
        > > The following works in a text document
        > > ^!SetCursor 11:1
        > > ^!SelectTo 11:10
        > >
        > > The following does not
        > > ^!SetDebug On
        > >
        > > ^!Set %xTest%=10
        > > ^!Set %yTest%=11
        > > ^!SetCursor ^%yTest%:1
        > > ^!SelectTo ^%yTest%:^%xTest%
        > >
        > > Using the Debug, I view both Variables get
        > filled, and
        > > the Instruction being assembled accurately, but
        > the
        > > execution fails.
        > >
        > > ^!SetCursor ^%yTest%:1 does work,,but if column
        > is >1
        > > or a Variable it does not.
        > >
        > > One way I got it to work, by accident, was to
        > have the
        > > same Variable i.e.
        > > ^!SelectTo ^%yTest%:^%yTest%
        >
        > Ronald,
        >
        > If you strictly want to use variables it may help
        > you to use more
        > representative variable names until you get the
        > logic worked out. For
        > instance, below, just like in Help, use %row% for
        > the row variable and
        > %col% for column to avoid any confusion.
        >
        > h=x
        > ^!SetDebug 1
        > ;
        > ^!ClearVariables
        > ^!Set %row%=11
        > ^!Set %col%=10
        > ^!Set %zTest%=1
        > ^!SetCursor ^%row%:^%zTest%
        > ^!SelectTo ^%row%:^%col%
        >
        > ºvº
        > 05.09.19
        > hrs > hsavage@...
        >
        >
        >
        >
        hsavage,
        If you strictly want to use variables
        **-Forgive me, I find this to be both odd and a
        humorous statement considering it's in the context of
        CLIPs. I'll go out on a limb here and suggest, YES, my
        desire is to use variables, as I believe a majority of
        us wish to do so.-**


        it may help you to use more representative variable
        names until you get the logic worked out.

        **-Variable names utilized are certainly at the
        discretion of the author.
        This is not my first editor, compiler that I have used
        to write instructions.
        Other editors and compilers are sensitive to those
        buzz words (row, col).
        Hence I gained practice not to use those words.
        Moreover, the instructions presented, were
        extrapolated from a more detailed elaborate CLIP
        written. The instructions presented for review, are in
        my opinion, has little or null logic necessary for
        execution.
        It's more of a flow problem based on predefined input.
        Irrelevant to the variable names chosen I wish to have
        focus on the inability for the CLIP to operate
        correctly when two independent and separate variables
        are introduced on a ONE LINE STATEMENT.
        Can you shed light on why this is occurring?
        Thank you.
        Given:
        Instruction written with no variables operate
        adequately.
        Same instruction introducing one variable operate at
        times.
        Same instruction introducing TWO different variables
        does not execute, even though Debug will verify that
        any and ALL variable names being used are being filled
        appropriately with the correct input!-**

        Thank you hsavage for your time and effort,
        -T



        __________________________________
        Yahoo! Mail - PC Magazine Editors' Choice 2005
        http://mail.yahoo.com
      • Ronald Reagan
        ... hsavage and agree with rpdooling, you may have no line 11. **-That was the reason I provided the SAME instructions absent the VARIBLES in the first in
        Message 3 of 15 , Sep 19, 2005
        • 0 Attachment
          --- hsavage <hsavage@...> wrote:

          > hsavage wrote:
          > > Ronald Reagan wrote:
          > >> I am having problems using Variables
          > >>
          > >> The following works in a text document
          > >> ^!SetCursor 11:1
          > >> ^!SelectTo 11:10
          > >>
          > >> The following does not
          > >> ^!SetDebug On
          > >>
          > >> ^!Set %xTest%=10
          > >> ^!Set %yTest%=11
          > >> ^!SetCursor ^%yTest%:1
          > >> ^!SelectTo ^%yTest%:^%xTest%
          > >>
          > > Ronald,
          > >
          > > If you strictly want to use variables it may help
          > you to use more
          > > representative variable names until you get the
          > logic worked out. For
          > > instance, below, just like in Help, use %row% for
          > the row variable and
          > > %col% for column to avoid any confusion.
          > >
          > > h=x
          > > ^!SetDebug 1
          > > ;
          > > ^!ClearVariables
          > > ^!Set %row%=11
          > > ^!Set %col%=10
          > > ^!Set %zTest%=1
          > > ^!SetCursor ^%row%:^%zTest%
          > > ^!SelectTo ^%row%:^%col%
          >
          > Ronald,
          >
          > Sorry, in the previous message I neglected to
          > mention, and agree with
          > rpdooling, you may have no line 11. A blank line
          > has no column
          > positions and a non-existent line has no row or
          > column positions.
          >
          > ºvº
          > 05.09.19
          > hrs > hsavage@...
          >
          >
          >
          >
          hsavage
          and agree with
          rpdooling, you may have no line 11.

          **-That was the reason I provided the SAME
          instructions absent the VARIBLES in the first in order
          to provide evidence, it does work. On the TEXT
          document tested, for both set of instructions, there
          is indeed an eleventh row and a ten character (column)
          long word on said row.-**

          It simply won't execute the 2 variable filled
          instructions.


          Thank you again hsavage for your time and effort,
          -T

          __________________________________________________
          Do You Yahoo!?
          Tired of spam? Yahoo! Mail has the best spam protection around
          http://mail.yahoo.com
        • Ronald Reagan
          ... Hugo In addition to previous answers: you might want to check if there are any trailing spaces after the value... **-As far as the manual states, CLIPS
          Message 4 of 15 , Sep 19, 2005
          • 0 Attachment
            --- Hugo Paulissen <hugopaulissen@...> wrote:

            > --- In ntb-clips@yahoogroups.com, Ronald Reagan
            > <bewarefr@y...> wrote:
            > > I am having problems using Variables
            > >
            >
            >
            > In addition to previous answers: you might want to
            > check if there are
            > any trailing spaces after the value...
            >
            > Hugo
            >
            >
            >
            Hugo

            In addition to previous answers: you might want to
            check if there are
            any trailing spaces after the value...

            **-As far as the manual states, CLIPS don't recognize
            spaces.
            Nevertheless, Carriage Returns are the only thing
            present behind Instruction Statement.
            Again,
            Given:
            Instruction written with no variables operate
            adequately.
            Same instruction introducing one variable operate at
            times.
            Same instruction introducing TWO different variables
            does not execute, even though Debug will verify that
            any and ALL variable names being used are being filled
            appropriately with the correct input!-**

            Thank you Hugo for your time and effort,
            -T





            __________________________________
            Yahoo! Mail - PC Magazine Editors' Choice 2005
            http://mail.yahoo.com
          • Hugo Paulissen
            ... If I copy your instructions, I still have a trailing space behind the 10 and the 11. Once removed, the clip works (for me) as you expect... ... Hugo
            Message 5 of 15 , Sep 19, 2005
            • 0 Attachment
              > Nevertheless, Carriage Returns are the only thing
              > present behind Instruction Statement.

              If I copy your instructions, I still have a trailing space behind the
              10 and the 11. Once removed, the clip works (for me) as you expect...

              > > ^!Set %xTest%=10
              > > ^!Set %yTest%=11

              Hugo
            • Ronald Reagan
              ... Hugo, This is odd as heck! Certain carriage returns are being used, my instructions fails. Additionally I just used hsavage sent Instructions, and it
              Message 6 of 15 , Sep 19, 2005
              • 0 Attachment
                --- Hugo Paulissen <hugopaulissen@...> wrote:

                >
                > > Nevertheless, Carriage Returns are the only thing
                > > present behind Instruction Statement.
                >
                > If I copy your instructions, I still have a trailing
                > space behind the
                > 10 and the 11. Once removed, the clip works (for me)
                > as you expect...
                >
                > > > ^!Set %xTest%=10
                > > > ^!Set %yTest%=11
                >
                > Hugo
                >
                >
                >
                Hugo,
                This is odd as heck!
                Certain carriage returns are being used, my
                instructions fails.
                Additionally I just used "hsavage" sent Instructions,
                and it works marvelously.
                I can't explain it.

                Thanx again for your time and effort Hugo and all,
                -T




                __________________________________
                Yahoo! Mail - PC Magazine Editors' Choice 2005
                http://mail.yahoo.com
              • hsavage
                ... Glad I was able to brighten your day. ... Regardless of the result you re getting locally the clip segment you provided performs exactly as it s written.
                Message 7 of 15 , Sep 19, 2005
                • 0 Attachment
                  Ronald Reagan wrote:
                  >
                  > --- hsavage <hsavage@...> wrote:
                  >
                  >> Ronald Reagan wrote:
                  >>> I am having problems using Variables
                  >>>
                  >>> The following works in a text document
                  >>> ^!SetCursor 11:1
                  >>> ^!SelectTo 11:10
                  >>>
                  >>> The following does not
                  >>> ^!SetDebug On
                  >>>
                  >>> ^!Set %xTest%=10
                  >>> ^!Set %yTest%=11
                  >>> ^!SetCursor ^%yTest%:1
                  >>> ^!SelectTo ^%yTest%:^%xTest%
                  >>>
                  > hsavage,
                  > If you strictly want to use variables
                  > **-Forgive me, I find this to be both odd and a
                  > humorous statement considering it's in the context of
                  > CLIPs. I'll go out on a limb here and suggest, YES, my
                  > desire is to use variables, as I believe a majority of
                  > us wish to do so.-**

                  Glad I was able to brighten your day.

                  > It's more of a flow problem based on predefined input.
                  > Irrelevant to the variable names chosen I wish to have
                  > focus on the inability for the CLIP to operate
                  > correctly when two independent and separate variables
                  > are introduced on a ONE LINE STATEMENT.
                  > Can you shed light on why this is occurring?
                  > Thank you.

                  Regardless of the result you're getting locally the clip segment you
                  provided performs exactly as it's written. It moves the cursor to row
                  11, column 1, then selects the text beginning with column 1 to column 10.

                  ---------
                  h=x
                  ^!SetDebug On

                  ^!Set %xTest%=10
                  ^!Set %yTest%=11
                  ^!SetCursor ^%yTest%:1
                  ^!SelectTo ^%yTest%:^%xTest%
                  ---------------

                  I agree with Hugo, the 2 value ^!Set commands each has an extra space
                  following the instruction, but, the clip works correctly on my machine,
                  trailing spaces or not.

                  Sorry we haven't been able to help.

                  ºvº
                  05.09.19
                  hrs > hsavage@...
                • Don Daugherty
                  ... There s a setting under View/Options/Documents, Trim White Spaces ; I believe checking it (and saving the clip) strips any trailing spaces so the clip
                  Message 8 of 15 , Sep 20, 2005
                  • 0 Attachment
                    Ronald Reagan wrote:

                    >>>If I copy your instructions, I still have a trailing
                    >>>space behind the
                    >>>10 and the 11. Once removed, the clip works (for me)
                    >>>as you expect...
                    >>>
                    >>>
                    >>Hugo,
                    >>This is odd as heck!
                    >>Certain carriage returns are being used, my
                    >>instructions fails.
                    >>Additionally I just used "hsavage" sent Instructions,
                    >>and it works marvelously.
                    >>I can't explain it.
                    >>
                    >>
                    There's a setting under View/Options/Documents, "Trim White Spaces"; I
                    believe checking it (and saving the clip) strips any trailing spaces so
                    the clip command executes correctly.
                  Your message has been successfully submitted and would be delivered to recipients shortly.