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

Re: Re: [Clip] Database Spit Clip

Expand Messages
  • Alec Burgess
    ... ^!SetClipboard ^$GetTextTop$ Is this a built-in function? I don t see it in the index for Clip Script Help, nor in the QuickList Clip Assistant. Regards
    Message 1 of 17 , Dec 2, 2003
    View Source
    • 0 Attachment
      Jody:

      > Dummy me - not needed: ^!Clip "GetTextTop" ...

      ^!SetClipboard ^$GetTextTop$

      Is this a built-in function? I don't see it in the index for Clip Script
      Help, nor in the QuickList Clip Assistant.

      Regards ... Alec
      --

      ---- Original Message ----
      From: "Jody" <kjv-av1611@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: Monday, December 01, 2003 11:46
      Subject: [gla: Re: [Clip] Database Spit Clip

      > Hi Chris,
      >
      > You can take this line out. Dummy me - not needed: ^!Clip "GetTextTop"
      >
      > Right click over the clip in the Library that you put it in if you got
      > that far and choose Edit Clip... Remove the line and and Save. Close
      > the [Clip] Editor. You can get a Clip tutorial at the following link.
      > Unzip it to the Libraries folder.
      > http://www.notetab.net/zip/clipclass.zip Activate the ClipClass
      > Library and click on the Clip to open the Outline. See Help NoteTab's
      > Glossary for a list of terms.
      >
      >> <--- Copy below this line --->
      >> H=Split at 18000
      > ...
      >>> Loop
      >> ^!Set %Start%=^$GetRow$:^$GetCol$
      >> ^!Jump +18000
      >> ^!Clip "GetTextTop" <--- You can take this line out. Dummy me - not
      >> needed.
      >> ^!SetClipboard ^$GetTextTop$
      >> ^!Toolbar Paste New...
      >
      >
      > Happy Clip'n!
      > Jody
      >
      > http://www.notetab.net/html/cd-info.htm
      > http://www.notetab.net/html/maillist.htm
      >
      > Subscribe, UnSubscribe, Options
      > mailto:ntb-Clips-Subscribe@yahoogroups.com
      > mailto:ntb-Clips-UnSubscribe@yahoogroups.com
      > http://groups.yahoo.com/group/ntb-clips
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > ---------------------~--> Buy Ink Cartridges or Refill Kits for your
      > HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders
      > $50 or more to the US & Canada.
      > http://www.c1tracking.com/l.asp?cid=5511
      > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/dkFolB/TM
      > ---------------------------------------------------------------------~->
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
    • Alec Burgess
      ... Sorry for the question about ^!SetClipboard ^$GetTextTop$ I had accidentally changed the date-order in OE and read the fixup before seeing the original
      Message 2 of 17 , Dec 2, 2003
      View Source
      • 0 Attachment
        Jody:

        > H=_GetTextTop
        > ; Last updated 11/20/2001, Jody@...
        > ; http://www.notetab.net, http://www.notetab.net/order
        > ; Working example of a custom function that gets the text
        > ; from the cursor point to the top of file.

        Sorry for the question about > ^!SetClipboard ^$GetTextTop$
        I had accidentally changed the date-order in OE and read the fixup before
        seeing the original post that clearly states it is a custom function.

        Regards ... Alec
        --

        ---- Original Message ----
        From: "Jody" <kjv-av1611@...>
        To: <ntb-clips@yahoogroups.com>
        Sent: Monday, December 01, 2003 11:33
        Subject: [gla: Re: [Clip] Database Spit Clip
      • Jody
        Hi John, I forgot to send the custom function Clip again. The Split at nnn below is whatever you named the Clip... H=_GetTextTop ; Last updated 11/20/2001,
        Message 3 of 17 , Dec 2, 2003
        View Source
        • 0 Attachment
          Hi John,

          I forgot to send the custom function Clip again. The "Split at nnn"
          below is whatever you named the Clip...

          H=_GetTextTop
          ; Last updated 11/20/2001, Jody@...
          ; http://www.notetab.net, http://www.notetab.net/order
          ; Used by the "Split at nnn" Clip
          ; Working example of a custom function that gets the text
          ; from the cursor point to the %Start% point set in the
          ; "Split at nnn" Clip.
          ^!SetScreenUpdate Off
          ^!SelectTo ^%Start%
          ^!Result ^$GetSelection$
          ^!Jump Select_End
          ; - end -

          Working examples of using custom function Clips:

          <--- Copy below this line --->
          H=";---- Information ------"
          ; Working examples of using custom function Clips
          ; eMailed on 12-02-2003, ntb-clips@yahoogroups.com, Jody
          ; notetab.net, clean-funnies.com, fookes.us, sojourner.us


          H="TextBol"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.notetab.net/html/cd-info.htm
          ; Working example of a custom function that gets the text
          ; from the cursor point to the beginning of line.
          ^!Info ^$GetTextBol$


          H="TextEol"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.notetab.net/html/cd-info.htm
          ; Working example of a custom function that gets the text
          ; from the cursor point to the end of line.
          ^!Info ^$GetTextEol$


          H="TextTop"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.notetab.net/html/cd-info.htm
          ; Working example of a custom function that gets the text
          ; from the cursor point to the top of document.
          ^!Info ^$GetTextTop$


          H="TextBot"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.fookes.us
          ; Working example of a custom function that gets the text
          ; from the cursor point to the bottom of the document.
          ^!Info ^$GetTextBot$


          H="_GetTextBol"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.fookes.us
          ; Working example of a custom function that gets the text
          ; from the cursor point to the beginning of line. Use Clip
          ; TextBol to see the value of the custom function. The
          ; syntax of the function is: ^$GetTextBol$
          ^!Result ^$StrCopy("^$GetLine$";1;^$Calc(^$GetCol$-1)$)$


          H="_GetTextEol"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.fookes.us
          ; Working example of a custom function that gets the text
          ; from the cursor point to the beginning of line. Use Clip
          ; TextEol to see the value of the custom function. The
          ; syntax of the function is: ^$GetTextEol$
          ^!Result ^$StrCopy("^$GetLine$";^$GetCol$;^$GetLineSize$)$


          H="_GetTextTop"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.fookes.us
          ; Working example of a custom function that gets the text
          ; from the cursor point to the beginning of line. Use Clip
          ; TextTop to see the value of the custom function. The
          ; syntax of the function is: ^$GetTextTop$
          ^!SetScreenUpdate Off
          ^!SelectTo 1:1
          ^!Result ^$GetSelection$
          ^!Jump Select_End


          H="_GetTextBot"
          ; Last updated on 12-02-2003 by Jody <ntb-clips@yahoogroups.com>
          ; http://www.notetab.net, http://www.fookes.us
          ; Working example of a custom function that gets the text
          ; from the cursor point to the beginning of line. Use Clip
          ; TextBot to see the value of the custom function. The
          ; syntax of the function is: ^$GetTextBot$
          ^!SetScreenUpdate Off
          ^!SelectTo ^$Calc(^$GetLineCount$+1)$:1
          ^!Result ^$GetSelection$
          ^!Jump Select_Start


          H=";-------------------------------------"

          <--- Copy above this line --->
          <--- Right click over a Library --->
          <--- Choose: Add from Clipboard --->

          Happy Clip'n!
          Jody

          http://www.notetab.net/html/cd-info.htm
          http://www.notetab.net/html/maillist.htm

          Subscribe, UnSubscribe, Options
          mailto:ntb-Clips-Subscribe@yahoogroups.com
          mailto:ntb-Clips-UnSubscribe@yahoogroups.com
          http://groups.yahoo.com/group/ntb-clips
        • Jody
          Hi Alec, I reworded all four that I have so they make sense (copy/paste error of mine;) and sent it in my previous post at the bottom. Unfortunately custom
          Message 4 of 17 , Dec 2, 2003
          View Source
          • 0 Attachment
            Hi Alec,

            I reworded all four that I have so they make sense (copy/paste error of
            mine;) and sent it in my previous post at the bottom. Unfortunately
            custom functions do not work with ^!FarClip so you need to add them to
            the Libraries you use them in.

            >> H=_GetTextTop
            >
            >Sorry for the question about > ^!SetClipboard ^$GetTextTop$
            >I had accidentally changed the date-order in OE and read the fixup before
            >seeing the original post that clearly states it is a custom function.


            Take care,
            Jody Adair

            The whole world doth err save you and me,
            and even thou doest err some!
            http://clean-funnies.com
            http://notetab.net, http://fookes.us
            http://sojourners-software.com
          • Dick Gascoigne
            I have a similar clip, but it divides a large file into a specified number of segments, rather than a variable number segments of fixed size. It is used to
            Message 5 of 17 , Dec 2, 2003
            View Source
            • 0 Attachment
              I have a similar clip, but it divides a large file into a specified number of segments, rather than a variable number segments of fixed size.

              It is used to break up a large spool file containing many documents (e.g. Invoices) into N files, each containing about the same number of documents. That is so each segment can be printed to a different printer, concurrently. (Load balancing.)

              If anyone can use it, let me know.

              Dick Gascoigne
              Singapore




              [Non-text portions of this message have been removed]
            • Jody
              Hi Chris, I was doing one of those quickie Clips to save a selection as a file, actually I was using ^!TextToFile and I thought about your Spit Clip. If
              Message 6 of 17 , Dec 3, 2003
              View Source
              • 0 Attachment
                Hi Chris,

                I was doing one of those quickie Clips to save a selection as a
                file, actually I was using ^!TextToFile and I thought about your
                "Spit Clip." <g> If you are not going to be uploading from
                NoteTab, then you don't want to save the files it makes inside
                the editor so to speak because of resources due to how huge your
                file is; it's huge to me anyway. The following if used or not
                will introduce you to some more commands and techniques that you
                will use later if you continue on with Clip'n.

                ^!TextToFile will create a new file if it does not exist and if
                it does, the existing file will get overwritten without warning.

                The syntax is ^!TextToFile "Full\Path\FileName.ext" Text to save to file

                So, in the section of the script below the changes would be made.
                I made the changes below what's next, the current as far as what
                was posted to the list.

                ^!SetClipboard ^$GetTextTop$
                ^!Toolbar Paste New
                ; Saves the copied text in a file with incremental numbering
                ; using the same filename as the original (See ^!Set Clips)
                ^!Save As "^%PathName%^%n%^%ext%"
                ; Switches back to the original file
                ^!SetDocIndex ^%DocIndex%
                ; Increments n by 1 (one)
                ^!Inc %n%

                -----------------------------------------------

                ; extra blank lines below put in to see it better

                ^!SetClipboard ^$GetTextTop$

                ; was: ^!Toolbar Paste New
                ; was: ^!Save As "^%PathName%^%n%^%ext%"

                ; Creates a new file
                ^!TextToFile "^%PathName%^%n%^%ext%" ^$GetClipboard$

                ; The next two lines are removed completely
                ; was: Switches back to the original file
                ; was: ^!SetDocIndex ^%DocIndex%

                ; Increments n by 1 (one)
                ^!Inc %n%

                By using that method you do not double the size of MB open in
                NoteTab. It will make the Clip run faster because NoteTab is not
                overloading memory.

                If it is going to be used often, you will want to put in a safety
                measure so that you do not overwrite files that may exist when doing
                the TextToFile.

                In Help read up on ^!IfFileExist, but the short of it is...

                ^!IfFileExist "^%PathName%^%n%^%ext%" Warning else Next

                You can get fancy with it and increment the %n% in a loop until
                it does not find a file by the name being checked, but I would
                keep it simple and less confusing in go to Windows Explorer by
                just going to the :Warning label. You would have something like:

                :Warning
                ^!Prompt
                The file "^%PathName%^%n%^%ext%" already exists^%nl%
                in the folder you are trying to save to. You need^%nl%
                to go to go to Windows Explorer (or a file manager^%nl%
                used) to see what is going on. It's most likely^%nl%
                that you already ran this Clip using the folder^%nl%
                just mentioned.^%nl%

                You could use a ^!Continue box and ask if you wanted to
                go ahead and overwrite. If answered Yes, then you would
                need to set a flag so you would skip the ^!IfFileExist
                line. You would also need to ^!Dec%n% just once and go
                back to the text that was aborted out of (actually, not.
                It would still be on the Clipboard, but you might need
                to adjust the cursor position. I'm just typing away
                doing this in my head so it may not all be right on the
                money. <g> So, something like:

                ^!Continue blah, blah, blah... Continue?
                ^!Set %OverWrite%=1
                ; DEc given that you Inc before you IfFileExist ... Warning
                ^!Dec %n%
                ^!TextToFile "^%PathName%^%n%^%ext%" ^$GetClipboard$

                You then go to a :label back up in your script to restart it;
                probably where you loop to if no file already existed.

                ^!Goto SomeLabel

                When you get to the ^!IfFileExist line in the Clip you add the
                following with the flag you set:

                ^!IfTrue ^%OverWrite% Skip

                The line you skip is the ^!IfFileExist check. The line of code
                following it would be the ^!TextToFile command. It will be
                skipped every time you loop through it (or until you set
                %OverWrite%=0 if you ever find a reason to do that. <bg>

                OK, then, go for it. BTW, there is no extra charge for those
                tidbits. 8D I normally write Clips for $50.00 an hour if anybody
                is ever interested interested. ;) Jody @ NoteTab . net
                (compressed) :) I was up all night last night build a computer to
                sell on eBay or locally, so this is about it for me.

                Good NoteNite!-) ...and...

                Happy Clip'n!
                Jody

                http://www.notetab.net/html/cd-info.htm
                http://www.notetab.net/html/maillist.htm

                Subscribe, UnSubscribe, Options
                mailto:ntb-Clips-Subscribe@yahoogroups.com
                mailto:ntb-Clips-UnSubscribe@yahoogroups.com
                http://groups.yahoo.com/group/ntb-clips
              Your message has been successfully submitted and would be delivered to recipients shortly.