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

clip works fine for me but not for my friend

Expand Messages
  • Don Passenger
    I have 4.86 pro she has 4.85 free. I am trying to make these two lines of delimited numbers (excluding the first field) modified by taking each field,
    Message 1 of 3 , Jan 3, 2002
      I have 4.86 pro she has 4.85 free.
      I am trying to make these two lines of delimited numbers (excluding the
      first field) modified by taking each field, multiplying it by 1.15 and then
      reinserting both the new number and the original number, and looping through
      each line until done.

      Here is the raw text I start with:
      65|68.66|88.68|106.31|110.61|159.84
      66|70.98|91.73|109.73|114.25|164.48


      after I apply the clip I get this:
      65|78.96|68.66|101.98|88.68|122.26|106.31|127.20|110.61|183.82|159.84
      66|81.63|70.98|105.49|91.73|126.19|109.73|131.39|114.25|189.15|164.48


      I use this clip .... but it doesn't work for her (she says the cursor moves
      but no extra numbers are added like they are for me):

      H=ADD 1.15 PERCENT TO DELIMITED
      ^!SetHintInfo Adding 1.15 to Table...
      ^!SetScreenUpdate Off
      :endreturn
      ^!Jump DOC_END
      ^!Set %LastChar%=^$GetChar(-1)$
      ^!IfTrue ^$IsEmpty(^%LastChar%)$ Next else AddReturn
      ^!Keyboard Backspace
      ^!Goto endreturn
      :AddReturn
      ^!Keyboard Enter


      ^!Jump 1
      ^!ClearVariable %1Pass%


      :Reset
      ^!IfFalse ^%1Pass% Skip
      ^!Jump +1
      ^!If ^$GetRow$ = ^$GetLineCount$ Save else Next
      ^!Set %Field%=2
      ^!Set %FieldCount%=1


      :Loop
      ^!Set %1Pass%=1
      ^!SetDelimiter ^%VBar%
      ^!Set %OrigAmount%=^$GetField(-1;^%Field%)$
      ^!Set %Amount%=^$Calc(^$GetField(-1;^%Field%)$*.15;2)$
      ^!Set %Amount1%=^$Calc(^$GetField(-1;^%Field%)$+^%Amount%;2)$
      ^!If ^$GetChar$ = 0 Skip
      ;next line is long one
      ^!Replace "^$GetField(-1:^%Field%)$" >> "^%Amount1%|^%OrigAmount%" S
      ;end of long line
      ^!If ^%FieldCount% = 9 Reset
      ^!Inc %Field%
      ^!Inc %Field%
      ^!Inc %FieldCount%
      ^!Inc %FieldCount%
      ^!Goto Loop


      :Save
      :endreturn1
      ^!Jump DOC_END
      ^!Set %LastChar%=^$GetChar(-1)$
      ^!IfTrue ^$IsEmpty(^%LastChar%)$ Next else AddReturn1
      ^!Keyboard Backspace
      ^!Goto endreturn1
      :AddReturn1
      ^!Save



      I tried using the debug ... it doesn't debug for her.


      --
      Don Passenger
      mailto:dpasseng@...
      work: http://www.grcourt.org
      home: http://www.iserv.net/~dpasseng
      ----- Original Message -----
      From: "Jody" <av1611@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: Thursday, January 03, 2002 1:30 PM
      Subject: Re: [Clip] Re: Debugging a Clip


      > Hi Don,
      >
      > ^!SetDebug [On|Off] (added in v4.8)
      > When enabled, a dialog box pops up just before each statement and
      > paste operation is executed. The dialog box shows the parsed
      > instruction or the text about to be pasted in the document. There
      > are three buttons; "Yes" is for continuing execution until the
      > next instruction, "No" disables Debug mode, and "Cancel" ends
      > Clip execution.
      >
      > >It seems to me that there is a function for debugging like step
      > >that lets you go one line at a time ... cannot seem to find it.
      >
      >
      > Happy Clip'n!
      > Jody
      >
      > http://www.notetab.net
      >
      > Subscribe, UnSubscribe, Options
      > mailto:Ntb-Clips-Subscribe@yahoogroups.com
      > mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
      > http://groups.yahoo.com/group/ntb-clips
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
    • Jody
      Hi Don, This is just a wild guess off the top of my head w/o really looking into the problem. There might be a point where you have to add a ^!Jump
      Message 2 of 3 , Jan 3, 2002
        Hi Don,

        This is just a wild guess off the top of my head w/o really
        looking into the problem. There might be a point where you have
        to add a ^!Jump Select_End. That is not needed in Pro in a lot
        of cases when text is selected, but is in Std/Light. If you do
        not know it, when you use ^$GetField(...)$ the fields get
        selected. You can test it yourself in Light (and instead of
        using ^!SetDebug like I gather you tried;) use info boxes
        (^!Prompt or whatever) in strategic places in the Clip. I like
        to use ^!Info and then a function, testing statement, or variable
        that is in a line underneath the ^!Info box. You need to add at
        least a character in the box, because if the string is empty, the
        ^!Info will not come up. If I have no idea where some strategic
        places are I usually "divide and conquer" which to me means
        setting up an ^!Info box at the start of each loop and also near
        the middle if the loops are long, even at the end. You can be
        the best judge of where you need them since it is your Clip. ;)

        I did not understand the double increments. If you really need
        them, try ^!Inc VariableName 2 (I think - haha) for my curiosity's
        sake. ;)

        >I have 4.86 pro she has 4.85 free.
        >I am trying to make these two lines of delimited numbers
        >(excluding the first field) modified by taking each field,
        >multiplying it by 1.15 and then reinserting both the new number
        >and the original number, and looping through each line until
        >done.


        Happy Clip'n!
        Jody

        http://www.notetab.net

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@yahoogroups.com
        mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
        http://groups.yahoo.com/group/ntb-clips
      • Don Passenger
        ... Code whackers like me never understand why we do things ... actually it is because I take one field and replace it with two and then advance two fields to
        Message 3 of 3 , Jan 3, 2002
          > I did not understand the double increments. If you really need
          > them, try ^!Inc VariableName 2 (I think - haha) for my curiosity's
          > sake. ;)

          Code whackers like me never understand why we do things ...
          actually it is because I take one field and replace it with two and then
          advance two fields to the next one I need which is why the double increment.
        Your message has been successfully submitted and would be delivered to recipients shortly.