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

Append+Calc+GetLine+New Doc bug

Expand Messages
  • loro
    Hi! If this isn t a bug, I don t know what. I ve spent the whole night to get it down to this. When things started to go wrong the clip was already pretty big
    Message 1 of 18 , Nov 17, 2005
    • 0 Attachment
      Hi!

      If this isn't a bug, I don't know what. I've spent the whole night to get
      it down to this. When things started to go wrong the clip was already
      pretty big with lots of nested string function. Little did I suspect that
      opening a new document was part of the problem. That was the last I
      checked. All of the ingredients in the subject need to be present.

      Please test this. Type a number, preferably "10", alone on a line and put
      the cursor on it. Then run the clip.

      ____________________________________
      H="Damnation"

      ^!ClearVariables

      ^!Set %x%=^$Calc(10/2)$
      ^!Append %y%=^$Calc(10/2)$
      ^!Set %z%=^$Calc(^$GetLine$/2)$
      ^!Append %w%=^$Calc(^$GetLine$/2)$

      ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w%

      ^!Toolbar New Document
      ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w
      ____________________________________

      First info box:
      x = 5
      y = 5
      z = 5
      w = 5

      Second info box:
      x = 5
      y = 5
      z = 5
      w = [error in expression]

      Note, it doesn't matter in which way I open a new document and a delay
      doesn't help. Please don't tell me I'm overlooking something stupid because
      I may just start to cry. :`-(

      Lotta
    • loro
      ... The missing % was an error while copy-pasting. Sorry. Here it is again. ________________________ H= Damnation ^!ClearVariables ^!Set %x%=^$Calc(10/2)$
      Message 2 of 18 , Nov 17, 2005
      • 0 Attachment
        I wrote:
        >^!Toolbar New Document
        >^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w

        The missing % was an error while copy-pasting. Sorry. Here it is again.

        ________________________

        H="Damnation"

        ^!ClearVariables
        ^!Set %x%=^$Calc(10/2)$
        ^!Append %y%=^$Calc(10/2)$
        ^!Set %z%=^$Calc(^$GetLine$/2)$
        ^!Append %w%=^$Calc(^$GetLine$/2)$

        ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w%

        ^!Toolbar New Document
        ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w%
        ________________________

        Lotta
      • acummingsus
        ... [ . . ] ... and put ... [ . . ] ... ^!Info ^%y% ... Where and when does y and w get ^!Set ? And, why the append? append does not run the function or
        Message 3 of 18 , Nov 17, 2005
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, loro <loro-spam01-@t...> wrote:
          >
          > Hi!
          >
          > If this isn't a bug, I don't know what. I've spent the whole night
          [ . . ]
          > Please test this. Type a number, preferably "10", alone on a line
          and put
          > the cursor on it. Then run the clip.
          [ . . ]
          > ^!Append %y%=^$Calc(10/2)$

          ^!Info ^%y%

          > ^!Set %z%=^$Calc(^$GetLine$/2)$
          > ^!Append %w%=^$Calc(^$GetLine$/2)$

          Where and when does y and w get ^!Set ?

          And, why the append?

          append does not "run the function or command" like set does.

          Instead, append usually puts *your_code* into the variable. But that
          code doesn't get run until you ^!Set

          IOW (append) a string of code in a variable versus (^!Set) a proc
          (process) so as to get the results that the code can produce into the
          variable

          Some other languages have eval whereby if you have a string of code in
          a variable, the eval runs (does what ^!Set does) the code which
          produces the output.

          I'm on Linux and without wine currently installed/setup. (means I
          can't run Notetab right now).

          HTH

          Alan
        • acummingsus
          ... [ . . ] ... Oop, I think I misunderstood the goal of your clip. I suspect that info is maybe at least somewhat executing the code in var where append
          Message 4 of 18 , Nov 17, 2005
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, loro <loro-spam01-@t...> wrote:
            >
            [ . . ]
            > ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w%
            >
            > ^!Toolbar New Document
            > ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w%

            Oop, I think I misunderstood the goal of your clip.

            I suspect that info is maybe at least somewhat executing the code in
            var where append formerly used. Thus, what's in that var would be
            different at the 2nd info.

            But I could be wrong.

            10/2 = 5

            why not just put 5 in the var?

            It appears that you want to display (twice) that code that's in that var?

            you might try:

            ^!Info $GetCode(^%var%)$

            Humbly,
            Alan.
          • loro
            ... That sounds reasonable. I guess I have assumed ^!Append also initializes the variable (or what it should be called) because until now it has worked.. . But
            Message 5 of 18 , Nov 17, 2005
            • 0 Attachment
              acummingsus wrote:

              >IOW (append) a string of code in a variable versus (^!Set) a proc
              >(process) so as to get the results that the code can produce into the
              >variable

              That sounds reasonable. I guess I have assumed ^!Append also initializes
              the variable (or what it should be called) because until now it has worked.. .

              But still, why does it work before I open a new document but not after? And
              why does it fail only if all those parameters are present? For instance
              ^!Append %w%=^$Calc(^$GetLineSize$/2)$ works both before and after the
              ^!Toolbar New Document. Odd, isn't it?

              Lotta
            • acummingsus
              ... [ . . ] ... after? And ... ^!Append %w%=^$Calc(^$GetLine$/2)$ Is what you had posted earlier until now. (not GetLineSize) I can t remember if getline also
              Message 6 of 18 , Nov 17, 2005
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, loro <loro-spam01-@t...> wrote:
                >
                > acummingsus wrote:
                [ . . ]
                > But still, why does it work before I open a new document but not
                after? And
                > why does it fail only if all those parameters are present? For instance
                > ^!Append %w%=^$Calc(^$GetLineSize$/2)$ works both before and after the
                > ^!Toolbar New Document. Odd, isn't it?

                ^!Append %w%=^$Calc(^$GetLine$/2)$

                Is what you had posted earlier until now. (not GetLineSize)

                I can't remember if getline also gets the ^p (linebreak). If so, that
                could have influence on it. (10^p instead of 10)

                ; string_trim if needed
                ^!Set %line%=GetLine
                strtrim %line% (rid it of any ^p)
                ^!Append %w%=^$Calc(^%line%/2)$

                Alan.
              • loro
                ... No, you misunderstand. The only goal of the clip is to demonstrate this behavior. :-) ... . No, you can have as many info boxes as you wish as long as you
                Message 7 of 18 , Nov 17, 2005
                • 0 Attachment
                  acummingsus wrote:
                  >Oop, I think I misunderstood the goal of your clip.

                  No, you misunderstand. The only goal of the clip is to demonstrate this
                  behavior. :-)

                  >I suspect that info is maybe at least somewhat executing the code in
                  >var where append formerly used. Thus, what's in that var would be
                  >different at the 2nd info.
                  .
                  No, you can have as many info boxes as you wish as long as you don't open a
                  new document in-between.

                  >10/2 = 5
                  >
                  >why not just put 5 in the var?

                  That was to demonstrate that there are no errors when literal numbers are
                  used. :-)

                  >It appears that you want to display (twice) that code that's in that var?

                  No, not particularly. The purpose of the info boxes is to show that there
                  is no errors before the new document is opened. :-)

                  Not very good at explaining myself, am I? This is in reality in a loop
                  (hence the ^!Append) and there are no literal values and no info boxes. The
                  ^!Toolbar New Document happens some 30 lines below, at the end of the clip.

                  You are probably right and I can fix it by setting a variable and then
                  append to it, as you said. That's no problem now that I know about it. It
                  still odd, the way it works.

                  Thank you.
                  Lotta
                • loro
                  ... Yes. And I get the error. I m saying that with $GetLineSize$ I don t. ... Then the error would be present all the time, before and after the new doc is
                  Message 8 of 18 , Nov 17, 2005
                  • 0 Attachment
                    Alan wrote:
                    > > why does it fail only if all those parameters are present? For instance
                    > > ^!Append %w%=^$Calc(^$GetLineSize$/2)$ works both before and after the
                    > > ^!Toolbar New Document. Odd, isn't it?
                    >
                    >^!Append %w%=^$Calc(^$GetLine$/2)$
                    >
                    >Is what you had posted earlier until now. (not GetLineSize)

                    Yes. And I get the error. I'm saying that with $GetLineSize$ I don't.

                    >I can't remember if getline also gets the ^p (linebreak). If so, that
                    >could have influence on it. (10^p instead of 10)

                    Then the error would be present all the time, before and after the new doc
                    is opened.

                    What I said. Fishy.

                    Lotta
                  • hsavage
                    ... get ... that ... put ... because ... Lotta, Please don t cry! You can correct this n 2 ways. Below is your clip with alternate suggestions I ve made.
                    Message 9 of 18 , Nov 17, 2005
                    • 0 Attachment
                      loro wrote:
                      > Hi!
                      >
                      > If this isn't a bug, I don't know what. I've spent the whole night to
                      get
                      > it down to this. When things started to go wrong the clip was already
                      > pretty big with lots of nested string function. Little did I suspect
                      that
                      > opening a new document was part of the problem. That was the last I
                      > checked. All of the ingredients in the subject need to be present.
                      >
                      > Please test this. Type a number, preferably "10", alone on a line and
                      put
                      > the cursor on it. Then run the clip.
                      >
                      > ____________________________________
                      > H="Damnation"
                      >
                      > ^!ClearVariables
                      >
                      > ^!Set %x%=^$Calc(10/2)$
                      > ^!Append %y%=^$Calc(10/2)$
                      > ^!Set %z%=^$Calc(^$GetLine$/2)$
                      > ^!Append %w%=^$Calc(^$GetLine$/2)$
                      >
                      > ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w%
                      >
                      > ^!Toolbar New Document
                      > ^!Info x = ^%x%^%nl%y = ^%y%^%nl%z = ^%z%^%nl%w = ^%w
                      >
                      > Note, it doesn't matter in which way I open a new document and a delay
                      > doesn't help. Please don't tell me I'm overlooking something stupid
                      because
                      > I may just start to cry. :`-(
                      >
                      > Lotta

                      Lotta,

                      Please don't cry! You can correct this n 2 ways. Below is your clip
                      with alternate suggestions I've made.

                      H="Damnation"
                      ^!ClearVariables
                      ;
                      ^!Set %x%=^$Calc(10/2)$
                      ^!Append %y%=^%x%
                      ;^!Append %y%=^$Calc(10/2)$
                      ;
                      ^!Set %z%=^$Calc(^$GetLine$/2)$
                      ^!Append %w%=^%z%
                      ;^!Append %w%=^$Calc(^$GetLine$/2)$
                      ;
                      ^!Info [L]1^%nl%x = ^%x% ^%nl%y = ^%y% ^%nl%z = ^%z% ^%nl%w = ^%w%
                      ;
                      ^!Toolbar New Document
                      ^!Info [L]2^%nl%x = ^%x% ^%nl%y = ^%y% ^%nl%z = ^%z% ^%nl%w = ^%w%
                      ;^!Toolbar New Document


                      This can be solved by altering the two ^!Append %%= lines as I have, or,
                      you can simply move the ^!ToolBar New Document line below the second
                      ^!Info [L] line.

                      As it is you're removing the source of the ^$GetLine$ calculation,
                      nullifying the ^!Append %w%= variable. You can test this by moving the
                      ^!ToolBar command above both ^!Info [L] lines, both will give an error then.

                      I don't know if this qualifies as a bug, rather, it points out that some
                      of the NoteTab functions are dynamic and if you remove the source, in
                      this case by de-focusing the source document, they no longer function.

                      One could also use the ^$GetWord$ in lieu of ^$GetLine$ if one wanted to
                      be more selective and the line contained extraneous info.

                      I think I'm correct, at least it sounds good!

                      ºvº
                      05.11.17
                      hrs > hsavage@...
                    • loro
                      ... *sniffle-sniffle* ... Thank you, but as I tried to explain THIS clip only demonstrates that the error only occurs under those specific circumstances (and
                      Message 10 of 18 , Nov 17, 2005
                      • 0 Attachment
                        hsavage wrote:
                        >Please don't cry!

                        *sniffle-sniffle*

                        > You can correct this n 2 ways. Below is your clip
                        >with alternate suggestions I've made.

                        Thank you, but as I tried to explain THIS clip only demonstrates that the
                        error only occurs under those specific circumstances (and some more that I
                        have figured out since I posted...). It's what my own error hunting boiled
                        it down to. The info boxes are there for your enjoyment only. ^_^

                        I'm used to that at least trying to produce a minimal test case is required
                        or you get flogged. But I only managed to create confusion. (sniffle)

                        I don't doubt that Alan is right. I have misunderstood ^!Append (thinking
                        it also sets/initializes) a variable. That's the simple explanation. I
                        don't know where I got it. Help doesn't suggest this should be the case.
                        Now it bugs me because because it in some situation seems to work as I
                        though and I can't figure out what the big difference is. BIG sniffle!

                        It could be that in other cases (where it has worked) I have sooner or
                        later assigned the value to another variable. Even setting it after
                        appending "cleans" it.

                        ^!Append %w%=^$Calc(^$GetLine$/2)$
                        ^!Set %w%=^"w%

                        Aw, I should just drop it since I have now learnt that my ways were wrong
                        (sniffle). Still, I'd like to understand why it doesn't always fail. These
                        things stay as big obstacles in my tiny brain, because I think there is
                        something in it that I need to learn and understand. I think Alan touched
                        on the "why" but I didn't fully understand it.

                        Tearfully yours
                        Lotta
                      • loro
                        Alan and Harvey, I ll show you what I was really doing so it doesn t seem so confusing. I have a bunch of hex color values in a document like this: ad4100
                        Message 11 of 18 , Nov 17, 2005
                        • 0 Attachment
                          Alan and Harvey,

                          I'll show you what I was really doing so it doesn't seem so confusing.

                          I have a bunch of hex color values in a document like this:
                          ad4100
                          624839
                          94604b
                          371e17
                          3b221e
                          f87d20
                          6b493d
                          and so on, one on each line. I need to get them into decimal format with FF
                          expressed as 1.0000.

                          Here is the relevant part of the clip. With the ^!Set %color%=^%color% line
                          it works fine.
                          ______________________
                          h="bla"

                          ^!ClearVariables

                          ^!Set %cnt%=0
                          :loop
                          ^!Inc %cnt%
                          ^!If ^$IsEmpty(^$GetLine(^%cnt%)$)$ = 1 do else next
                          ^!Append
                          %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";1;2)$)$/255;4)$
                          ^!Append
                          %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";3;2)$)$/255;4)$
                          ^!Append
                          %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";5;2)$)$/255;4)$|
                          ^!Set %color%=^%color%
                          ^!Goto loop

                          :do
                          ^!Toolbar New Document
                          ^!InsertText ^%color%
                          ______________________


                          NOW the question is: why doesn't it work if I set the variable before the
                          loop? That seems like the natural thing to do, doesn't it?

                          The really silly thing is that in the end those values won't be inserted in
                          a document. This was just an intermediate stage to check that this bit
                          worked. Which it now does, thanks to Alan. ;-)

                          Lotta
                        • Don - htmlfixit.com
                          I think Alan touched on the right answer. Append doesn t set the variable. But if you have the source open, it can generate the result on the fly with it.
                          Message 12 of 18 , Nov 17, 2005
                          • 0 Attachment
                            I think Alan touched on the right answer. Append doesn't set the
                            variable. But if you have the source open, it can generate the result
                            on the fly with it. Then if you open a new doc, it cannot generate on
                            the fly, hence the error.

                            Quit crying, pull yourself together and solve some problems around here
                            now :-)

                            Don
                          • loro
                            ... But I have now discovered that inserting its content into the same doc has the same effect! :-P I think you are on the right track but I don t know where
                            Message 13 of 18 , Nov 17, 2005
                            • 0 Attachment
                              At 18:02 2005-11-17, Don - htmlfixit.com wrote:
                              >I think Alan touched on the right answer. Append doesn't set the
                              >variable. But if you have the source open, it can generate the result
                              >on the fly with it. Then if you open a new doc, it cannot generate on
                              >the fly, hence the error.

                              But I have now discovered that inserting its content into the same doc has
                              the same effect! :-P
                              I think you are on the right track but I don't know where the track is leading.

                              >Quit crying, pull yourself together and solve some problems around here
                              >now :-)

                              How insensitive! You guys are so practically minded. *sniffle*

                              Lotta
                            • Jody
                              Hi Lotta, When a variable is set in a Clip, it stays set until either it is reset by using the ^!Set command again or the Library is switched out of (closed or
                              Message 14 of 18 , Nov 17, 2005
                              • 0 Attachment
                                Hi Lotta,

                                When a variable is set in a Clip, it stays set until either it is
                                reset by using the ^!Set command again or the Library is switched
                                out of (closed or another Library is opened). My guess is that it
                                does not work for you the first time you run it, because %color%
                                is not set until after the the ^!Append. You must set the
                                variable to be used for ^!Append first. (The reason it probably
                                works the next time is because you have not switched out of the
                                Library and therefore %color% is set; ^%color% now has contents.
                                If you switch out of the Library and back in, then %color% is not
                                set anymore and it will fail.

                                You'll get that situation if you restart NoteTab, change
                                Libraries, reboot, etc. causing you to see it work sometimes and
                                sometimes not, although the same thing is happening you are doing
                                different things (I'm guessing of course) to make %color% become
                                set/unset which makes it confusing.

                                Hope you can understand what I wrote and not too confusing.

                                (I think I understand that you know your order of the commands
                                ^!Set/^!Append are not correct. Also, you should not use the same
                                name for the ^!Set %variable% name and the ^!Append %variable%
                                name.)

                                I don't quite understand your Clip with the 3 ^!Appends in a row,
                                but I suppose you know what you are doing. <bg> You need at least
                                1, and maybe 3 ^!Set commands, before the ^!Append...

                                ^!Set %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";1;2)$)$/255;4)
                                ^!Append %AllColor%=^%Color%
                                ^!Set %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";3;2)$)$/255;4)$
                                ^!Append %AllColor%=^%Color%
                                ...then the last; each %Color% will get appended to %AllColor% and show up somewhere
                                like your new doc in ^%AllColor%

                                ^!Toolbar New Document
                                ^%AllColor%

                                ^!Jump 1
                                ; go wipe your tears and come back then maybe you can decipher the mess
                                ; I wrote above <bg>

                                >I have a bunch of hex color values in a document like this:
                                >ad4100
                                >624839

                                >Here is the relevant part of the clip. With the ^!Set %color%=^%color% line
                                >it works fine.
                                >______________________
                                >h="bla"
                                >
                                >^!ClearVariables
                                >
                                >^!Set %cnt%=0
                                >:loop
                                >^!Inc %cnt%
                                >^!If ^$IsEmpty(^$GetLine(^%cnt%)$)$ = 1 do else next
                                >^!Append
                                >%color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";1;2)$)$/255;4)$
                                >^!Append
                                >%color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";3;2)$)$/255;4)$
                                >^!Append
                                >%color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";5;2)$)$/255;4)$|
                                >^!Set %color%=^%color%
                                >^!Goto loop
                                >
                                >:do
                                >^!Toolbar New Document
                                >^!InsertText ^%color%
                                >______________________
                                >
                                >NOW the question is: why doesn't it work if I set the variable
                                >before the loop? That seems like the natural thing to do, doesn't
                                >it?


                                Happy Clip'n!
                                Jody

                                All Lists: http://www.fookes.us/maillist.htm
                                Convert your eMail programs... Aid4Mail: http://www.fookes/aid4mail
                                Freeware and Shareware; seamleesly integrates with NoteTab:
                                http://www.sojourner.us/software
                                See ya in the funnies!-) http://www.clean-funnies.com
                              • acummingsus
                                ... [ . . ] We all had relevant contribution(s) here. Harvey brought up something important that I overlooked. Jody brought important aspects. Others
                                Message 15 of 18 , Nov 17, 2005
                                • 0 Attachment
                                  --- In ntb-clips@yahoogroups.com, loro <loro-spam01-@t...> wrote:
                                  [ . . ]

                                  We all had relevant contribution(s) here. Harvey brought up something
                                  important that I overlooked. Jody brought important aspects. Others
                                  contributed important matter/info.

                                  Always use either clearvariable or clearvariables when append is in a
                                  clip. It's otherwise (if no append) not necessary to use
                                  clearvariable(s).

                                  > NOW the question is: why doesn't it work if I set the variable
                                  before the
                                  > loop? That seems like the natural thing to do, doesn't it?

                                  Not to me. Each of your line in doc has value wanted to end up in a
                                  string (a string inside of a variable). Append is fine if that's
                                  *ALL* that's to it. But you've "+ some more than that" which is that
                                  your value (very key, importantly) "must first be converted to another
                                  kind of a value of a different sort" before it goes into string.

                                  Thus append now looses the race (set must be used instead in order to
                                  get that mentioned conversion). Or, first append it and then set
                                  (brings the coversion) *and_then* you now have your desired_to_output
                                  string it's now inside the variable

                                  ^!Set
                                  %color%=^%color%^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";1;2)$)$/255;4)$

                                  You could use that in place/instead of each of your append lines.
                                  (sets %color% with the value of color PLUS your current execution of
                                  the nested functions -- IOW same as append but also executes those
                                  functions whereas append does not execute those, the said functions.

                                  P.S. I've experienced that I can begin by/with using append. (set not
                                  needed to start it off, begin it) that append initializes or gets it
                                  going fine.

                                  But if there is functions needed executed on data (as there is in this
                                  here case) then set is needed after the last append [{(or use:

                                  ^!Set %color%=^%color%---functions-here------

                                  which appends plus also executes the functions)}]

                                  > Here is the relevant part of the clip. With the ^!Set
                                  %color%=^%color% line
                                  > it works fine.
                                  > ______________________
                                  > h="bla"
                                  >
                                  > ^!ClearVariables
                                  >
                                  > ^!Set %cnt%=0
                                  > :loop
                                  > ^!Inc %cnt%
                                  > ^!If ^$IsEmpty(^$GetLine(^%cnt%)$)$ = 1 do else next
                                  > ^!Append
                                  > %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";1;2)$)$/255;4)$
                                  > ^!Append
                                  > %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";3;2)$)$/255;4)$
                                  > ^!Append
                                  >
                                  %color%=^$Calc(^$HexToInt(^$StrCopy("^$GetLine(^%cnt%)$";5;2)$)$/255;4)$|
                                  > ^!Set %color%=^%color%
                                  > ^!Goto loop
                                  >
                                  > :do
                                  > ^!Toolbar New Document
                                  > ^!InsertText ^%color%
                                  > ______________________
                                  ; ------ end -------

                                  Alan.
                                • BK
                                  Hello, I have a clip to do a search/replace: ;title is: Qualified URLs Replace ^!Replace href= styles/ http://www.4safedrivers.com/styles/ WASI
                                  Message 16 of 18 , Nov 30, 2005
                                  • 0 Attachment
                                    Hello,

                                    I have a clip to do a search/replace:

                                    ;title is: Qualified URLs Replace
                                    ^!Replace "href="styles/" >> "http://www.4safedrivers.com/styles/" WASI
                                    ^!Replace "src="images/" >> "src="http://www.4safedrivers.com/images/" WASI
                                    ^!Replace "src="graphics/" >> "src="http://www.4safedrivers.com/graphics/" WASI
                                    ^!Replace "href="business.htm" >>
                                    "href="http://www.4safedrivers.com/business.htm" WASI
                                    ^!Replace "href="business_login.htm" >>
                                    "href="http://www.4safedrivers.com/business_login.htm" WASI
                                    ^!Replace "href="fees.htm" >> "href="http://www.4safedrivers.com/fees.htm" WASI
                                    ^!Replace "href="contact.htm" >>
                                    "href="http://www.4safedrivers.com/contact.htm" WASI

                                    it works fine, but how would I change this to search/replace through a
                                    whole directory, or even through all open files?

                                    thanks in advance for your time.

                                    --BK
                                  • hsavage
                                    ... src= http://www.4safedrivers.com/images/ WASI ... src= http://www.4safedrivers.com/graphics/ WASI ... href= http://www.4safedrivers.com/fees.htm WASI
                                    Message 17 of 18 , Nov 30, 2005
                                    • 0 Attachment
                                      BK wrote:
                                      > Hello,
                                      >
                                      > I have a clip to do a search/replace:
                                      >
                                      > ;title is: Qualified URLs Replace
                                      > ^!Replace "href="styles/" >> "http://www.4safedrivers.com/styles/" WASI
                                      > ^!Replace "src="images/" >>
                                      "src="http://www.4safedrivers.com/images/" WASI
                                      > ^!Replace "src="graphics/" >>
                                      "src="http://www.4safedrivers.com/graphics/" WASI
                                      > ^!Replace "href="business.htm" >>
                                      > "href="http://www.4safedrivers.com/business.htm" WASI
                                      > ^!Replace "href="business_login.htm" >>
                                      > "href="http://www.4safedrivers.com/business_login.htm" WASI
                                      > ^!Replace "href="fees.htm" >>
                                      "href="http://www.4safedrivers.com/fees.htm" WASI
                                      > ^!Replace "href="contact.htm" >>
                                      > "href="http://www.4safedrivers.com/contact.htm" WASI
                                      >
                                      > it works fine, but how would I change this to search/replace through a
                                      > whole directory, or even through all open files?
                                      >
                                      > thanks in advance for your time.
                                      >
                                      > --BK

                                      BK,

                                      A quick answer for replacing in all open files, just add 'G' to 'WASI'
                                      option settings. Each ^!Replace commandline would end thus, GWASI, G
                                      for global meaning all open files.

                                      You can find this in NoteTab help under the find and replace commands.

                                      ºvº
                                      05.11.30
                                      hrs > hsavage@...
                                    • BK
                                      Thank you hrs, that is what I was looking for. I spent at least an hour looking before deciding to ask here. Figures it was right there in front of my face.
                                      Message 18 of 18 , Dec 1, 2005
                                      • 0 Attachment
                                        Thank you hrs,

                                        that is what I was looking for. I spent at least an hour looking before
                                        deciding to ask here.

                                        Figures it was right there in front of my face.

                                        Thanks!

                                        --BK


                                        At 11:45 AM 11/30/2005, you wrote:
                                        >BK wrote:
                                        > > Hello,
                                        > >
                                        > > I have a clip to do a search/replace:
                                        > >
                                        > > ;title is: Qualified URLs Replace
                                        > > ^!Replace "href="styles/" >>
                                        > "<http://www.4safedrivers.com/styles/>http://www.4safedrivers.com/styles/" WASI
                                        > > ^!Replace "src="images/" >>
                                        >"src="<http://www.4safedrivers.com/images/>http://www.4safedrivers.com/images/"
                                        >WASI
                                        > > ^!Replace "src="graphics/" >>
                                        >"src="<http://www.4safedrivers.com/graphics/>http://www.4safedrivers.com/graphics/"
                                        >WASI
                                        > > ^!Replace "href="business.htm" >>
                                        > >
                                        > "href="<http://www.4safedrivers.com/business.htm>http://www.4safedrivers.com/business.htm"
                                        > WASI
                                        > > ^!Replace "href="business_login.htm" >>
                                        > >
                                        > "href="<http://www.4safedrivers.com/business_login.htm>http://www.4safedrivers.com/business_login.htm"
                                        > WASI
                                        > > ^!Replace "href="fees.htm" >>
                                        >"href="<http://www.4safedrivers.com/fees.htm>http://www.4safedrivers.com/fees.htm"
                                        >WASI
                                        > > ^!Replace "href="contact.htm" >>
                                        > >
                                        > "href="<http://www.4safedrivers.com/contact.htm>http://www.4safedrivers.com/contact.htm"
                                        > WASI
                                        > >
                                        > > it works fine, but how would I change this to search/replace through a
                                        > > whole directory, or even through all open files?
                                        > >
                                        > > thanks in advance for your time.
                                        > >
                                        > > --BK
                                        >
                                        >BK,
                                        >
                                        >A quick answer for replacing in all open files, just add 'G' to 'WASI'
                                        >option settings. Each ^!Replace commandline would end thus, GWASI, G
                                        >for global meaning all open files.
                                        >
                                        >You can find this in NoteTab help under the find and replace commands.
                                        >
                                        >ºvº
                                        >05.11.30
                                        >hrs > hsavage@...
                                        >
                                        >
                                        >
                                        >
                                        >
                                        >Fookes Software: <http://www.fookes.us,>http://www.fookes.us,
                                        >http://www.fookes.com
                                        >Fookes Software Mailing Lists:
                                        ><http://www.fookes.us/maillist.htm>http://www.fookes.us/maillist.htm
                                        >
                                        >
                                        >
                                        >
                                        >----------
                                        >YAHOO! GROUPS LINKS
                                        >
                                        > * Visit your group
                                        > "<http://groups.yahoo.com/group/ntb-clips>ntb-clips" on the web.
                                        > *
                                        > * To unsubscribe from this group, send an email to:
                                        > *
                                        > <mailto:ntb-clips-unsubscribe@yahoogroups.com?subject=Unsubscribe>ntb-clips-unsubscribe@yahoogroups.com
                                        >
                                        > *
                                        > * Your use of Yahoo! Groups is subject to the
                                        > <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
                                        >
                                        >
                                        >----------


                                        All information in this Communication, including attachments is strictly
                                        confidential and intended solely for delivery to and authorized use by the
                                        addressee(s) identified above, and may contain privileged, confidential,
                                        proprietary and/or trade secrets information entitled to protection and/or
                                        exempt from disclosure under applicable law. If you are not the intended
                                        recipient, please take notice that any use, distribution or copying of this
                                        Communication, and/or any action taken or omitted to be taken in reliance
                                        upon it, is unauthorized and may be unlawful. If you have received this
                                        Communication in error, please notify sender and delete this Communication
                                        from your computer.
                                      Your message has been successfully submitted and would be delivered to recipients shortly.