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

Database Spit Clip

Expand Messages
  • confesschrist
    Ok guys! I ve been lurking (I don t know if that s what it s called on a mailing list?) on the list for a while. I ve been using notetab for a few months.
    Message 1 of 17 , Nov 30, 2003
    • 0 Attachment
      Ok guys! I've been lurking (I don't know if that's what it's called on
      a mailing list?) on the list for a while. I've been using notetab for
      a few months.

      Anyways, I have a SQL database that is around 60mb. I need to split
      the database into smaller chunks, around 1mb or less. I am told that
      the splits must be made after the semi-colons. Is there a clip
      available that will do this? I can split the file by hand, and at
      around 18,000 lines I get pretty close to 1mb. It doesn't have to be
      precise. I just need to split the database so I can upload it via http
      (I don't have ssh access). I have gone through the clips on the
      notetab site but haven't found anything that will do this. I'm
      unexperienced at writing clips, so I wouldn't know where to start.

      Thanks for the help!
      Chris
    • Jody
      Hi confesschrist, ... Don t you have ftp access? I only tested this with doing two lines at a time. But it should work for you. It does not edit the original
      Message 2 of 17 , Dec 1, 2003
      • 0 Attachment
        Hi confesschrist,

        :) Are you the Chris that I know?

        >Anyways, I have a SQL database that is around 60mb. I need to split
        >the database into smaller chunks, around 1mb or less. I am told that
        >the splits must be made after the semi-colons. Is there a clip
        >available that will do this? I can split the file by hand, and at
        >around 18,000 lines I get pretty close to 1mb. It doesn't have to be
        >precise. I just need to split the database so I can upload it via http
        >(I don't have ssh access).

        Don't you have ftp access?

        I only tested this with doing two lines at a time. But it should
        work for you. It does not edit the original document. It saves
        each 18000 lines with the original name and location, but uses an
        incremental number for each one saved: file1.ext, file2.ext,...,
        file999.ext. See the note in the long Clip about using ^!Close Discard...

        <--- Copy below this line --->
        H=Split at 18000
        ; eMailed on 12-01-2003 ntb-clips@yahoogroups.com, Jody
        ; notetab.net, clean-funnies.com, fookes.us, sojourner.us

        ^!SetHintInfo Working...
        ^!SetScreenUpdate Off
        ^!Set %DocIndex%=^$GetDocIndex$
        ^!Set %n%=1
        ^!Set %PathName%=^#; %ext%=^$GetExt(^##)$
        ^!Jump Doc_End
        :EmptyLine
        ^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
        ^!Replace "^p" >> "" SB
        ^!Goto EmptyLine
        ^!InsertText ^p
        ^!Jump 1

        :Loop
        ^!Set %Start%=^$GetRow$:^$GetCol$
        ^!Jump +18000
        ^!Clip "GetTextTop"
        ^!SetClipboard ^$GetTextTop$
        ^!Toolbar Paste New
        ^!Save As "^%PathName%^%n%^%ext%"
        ^!SetDocIndex ^%DocIndex%
        ^!Inc %n%
        ^!If "^$GetRow$" => "^$GetLineCount$" Next else Loop
        ; ^!Close Discard would be better below for resource
        ; purposes since your file is so big.
        ^!Toolbar Reload Document


        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. Use Clip
        ; TextTop to see the value of the custom function.
        ^!SetScreenUpdate Off
        ^!SelectTo ^%Start%
        ^!Result ^$GetSelection$
        ^!Jump Select_End


        H=TextTop
        ; Last updated on 05-08-2002, 07:04pm, 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. Use this Clip
        ; to see the value of the custom function.
        ^!Info ^$GetTextTop$


        <--- 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 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
        Message 3 of 17 , Dec 1, 2003
        • 0 Attachment
          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
        • Dick Gascoigne
          Chris - To break on semicolon, after the Jump you need to search backward for the ; You can get closer to the 1MB target by using MoveCursor to move by
          Message 4 of 17 , Dec 1, 2003
          • 0 Attachment
            Chris -
            To break on semicolon, after the Jump you need to search backward for the ;
            You can get closer to the 1MB target by using MoveCursor to move by
            characters instead of line.

            Better, I think to look at the FTP solution.

            Dick Gascoigne
            Singapore


            ----- Original Message -----
            From: "Jody" <kjv-av1611@...>
            To: <ntb-clips@yahoogroups.com>
            Sent: Tuesday, 02 December, 2003 12:33 AM
            Subject: Re: [Clip] Database Spit Clip


            > Hi confesschrist,
            >
            > :) Are you the Chris that I know?
            >
            > >Anyways, I have a SQL database that is around 60mb. I need to split
            > >the database into smaller chunks, around 1mb or less. I am told that
            > >the splits must be made after the semi-colons. Is there a clip
            > >available that will do this? I can split the file by hand, and at
            > >around 18,000 lines I get pretty close to 1mb. It doesn't have to be
            > >precise. I just need to split the database so I can upload it via http
            > >(I don't have ssh access).
            >
            > Don't you have ftp access?
            >
            > I only tested this with doing two lines at a time. But it should
            > work for you. It does not edit the original document. It saves
            > each 18000 lines with the original name and location, but uses an
            > incremental number for each one saved: file1.ext, file2.ext,...,
            > file999.ext. See the note in the long Clip about using ^!Close Discard...
            >
            > <--- Copy below this line --->
            > H=Split at 18000
            > ; eMailed on 12-01-2003 ntb-clips@yahoogroups.com, Jody
            > ; notetab.net, clean-funnies.com, fookes.us, sojourner.us
            >
            > ^!SetHintInfo Working...
            > ^!SetScreenUpdate Off
            > ^!Set %DocIndex%=^$GetDocIndex$
            > ^!Set %n%=1
            > ^!Set %PathName%=^#; %ext%=^$GetExt(^##)$
            > ^!Jump Doc_End
            > :EmptyLine
            > ^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
            > ^!Replace "^p" >> "" SB
            > ^!Goto EmptyLine
            > ^!InsertText ^p
            > ^!Jump 1
            >
            > :Loop
            > ^!Set %Start%=^$GetRow$:^$GetCol$
            > ^!Jump +18000
            > ^!Clip "GetTextTop"
            > ^!SetClipboard ^$GetTextTop$
            > ^!Toolbar Paste New
            > ^!Save As "^%PathName%^%n%^%ext%"
            > ^!SetDocIndex ^%DocIndex%
            > ^!Inc %n%
            > ^!If "^$GetRow$" => "^$GetLineCount$" Next else Loop
            > ; ^!Close Discard would be better below for resource
            > ; purposes since your file is so big.
            > ^!Toolbar Reload Document
            >
            >
            > 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. Use Clip
            > ; TextTop to see the value of the custom function.
            > ^!SetScreenUpdate Off
            > ^!SelectTo ^%Start%
            > ^!Result ^$GetSelection$
            > ^!Jump Select_End
            >
            >
            > H=TextTop
            > ; Last updated on 05-08-2002, 07:04pm, 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. Use this Clip
            > ; to see the value of the custom function.
            > ^!Info ^$GetTextTop$
            >
            >
            > <--- 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
            >
            >
            >
            >
            >
            > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            >
            >
            >
            >
          • Jody
            Hi Dick & Chris, Oops! I forgot about the semi-colon. That is easy to fix though. I just need a few lines of the file posted so I can see where it is at. You
            Message 5 of 17 , Dec 1, 2003
            • 0 Attachment
              Hi Dick & Chris,

              Oops! I forgot about the semi-colon. That is easy to fix though.
              I just need a few lines of the file posted so I can see where it
              is at. You asked for 18000 lines and said that was close enough,
              so just post a few lines and I can tell you where to insert a
              line of code at or I'll just re-post the whole Clip. Actually,
              most likely all you need to do is insert the ^!Find and ^!Jump
              lines below in between the code you see:

              :Loop
              ^!Set %Start%=^$GetRow$:^$GetCol$
              ^!Jump +2
              ^!Find ";" S
              ^!Jump Select_End
              ^!SetClipboard ^$GetTextTop$

              Right click over the Clip and choose Edit Clip... then scroll
              down till you see the :loop label.

              >To break on semicolon, after the Jump you need to search backward for the ;
              >You can get closer to the 1MB target by using MoveCursor to move by
              >characters instead of line.
              >
              >Better, I think to look at the FTP solution.
              >
              >Dick Gascoigne
              >Singapore


              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
            • Christopher Wilson
              Hey! ... Ummm...I don t think so. But, it is possible. :0) My last name is Wilson. ... Yes, I have ftp access. ... Here s what I see after the loop label.
              Message 6 of 17 , Dec 1, 2003
              • 0 Attachment
                Hey!

                >> :) Are you the Chris that I know?

                Ummm...I don't think so. But, it is possible. :0) My last name is Wilson.
                ---
                >> Don't you have ftp access?

                Yes, I have ftp access.
                ---
                Here's what I see after the "loop" label.

                :Loop
                ^!Set %Start%=^$GetRow$:^$GetCol$
                ^!Jump +18000
                ^!SetClipboard ^$GetTextTop$
                ^!Toolbar Paste New
                ^!Save As "^%PathName%^%n%^%ext%"
                ^!SetDocIndex ^%DocIndex%
                ^!Inc %n%
                ^!If "^$GetRow$" => "^$GetLineCount$" Next else Loop
                ; ^!Close Discard would be better below for resource
                ; purposes since your file is so big.
                ^!Toolbar Reload Document

                Where do I add those lines you posted? I really appreciate all your help! I
                downloaded the clipclass file and I plan on checking it out.

                Thanks in advance!
                -Chris-
                chris@...

                [Non-text portions of this message have been removed]
              • Christopher Wilson
                P.S. Sorry about the line double-spacing. :0( I m not used to posting on an email list. -Chris- [Non-text portions of this message have been removed]
                Message 7 of 17 , Dec 1, 2003
                • 0 Attachment
                  P.S.
                  Sorry about the line double-spacing. :0( I'm not used to posting on an email
                  list.
                  -Chris-

                  [Non-text portions of this message have been removed]
                • Jody
                  Hi Christopher, ... Nope, but the Chris I know would have used an eMail address like yours. :) ... That s the best route. I have a Library for Ws_Ftp also. You
                  Message 8 of 17 , Dec 1, 2003
                  • 0 Attachment
                    Hi Christopher,

                    >>> :) Are you the Chris that I know?
                    >
                    >Ummm...I don't think so. But, it is possible. :0) My last name is Wilson.

                    Nope, but the Chris I know would have used an eMail address like yours. :)

                    >>> Don't you have ftp access?
                    >
                    >Yes, I have ftp access.

                    That's the best route. I have a Library for Ws_Ftp also. You can make it
                    real easy uploading from NoteTab with it. http://www.notetab.net/zip/ftpzip.zip

                    >Here's what I see after the "loop" label.
                    >
                    >:Loop
                    >^!Set %Start%=^$GetRow$:^$GetCol$
                    >^!Jump +18000

                    Put the two lines in here. What is will do it find the ; jump to the end of it and then select back 18000 lines or there abouts. <g> You should always have a backup.

                    >^!SetClipboard ^$GetTextTop$
                    >^!Toolbar Paste New
                    >^!Save As "^%PathName%^%n%^%ext%"
                    >^!SetDocIndex ^%DocIndex%
                    >^!Inc %n%
                    >^!If "^$GetRow$" => "^$GetLineCount$" Next else Loop
                    >; ^!Close Discard would be better below for resource
                    >; purposes since your file is so big.
                    >^!Toolbar Reload Document
                    >
                    >Where do I add those lines you posted? I really appreciate all your help! I
                    >downloaded the clipclass file and I plan on checking it out.

                    :)


                    See ya in the funnies,
                    Jody Adair, Prov. 15:15

                    Blessed are they who can laugh at themselves
                    for they shall never cease to be amused.
                    http://www.clean-funnies.com
                  • Christopher Wilson
                    ... I choose it one night while I was browsing through eSword, I ended up at Mat 10:32 (I always love reading through Jesus own words). I am a songwriter,
                    Message 9 of 17 , Dec 1, 2003
                    • 0 Attachment
                      >Nope, but the Chris I know would have used an eMail address like yours. :)

                      I choose it one night while I was browsing through eSword, I ended up at Mat
                      10:32 (I always love reading through Jesus' own words). I am a songwriter,
                      and a lot of my music is about being un-ashamed of Christ. :0)

                      >I have a Library for Ws_Ftp also. You can make it real easy uploading from
                      NoteTab with it. http://www.notetab.net/zip/ftpzip.zip

                      Awesome! This will be extremely handy! I already have ws_ftp installed and
                      ready to go. Cool! Thanks again for all the help. I've already started going
                      through your clip class, this is going to really help me out!

                      -Chris-
                      chris@...

                      [Non-text portions of this message have been removed]
                    • Wright, John - Textron Financial
                      Jody, I m interested in this clip, so I ve been trying to follow this thread, but at this point, I m lost. If you would please post the final clip, it would be
                      Message 10 of 17 , Dec 2, 2003
                      • 0 Attachment
                        Jody,

                        I'm interested in this clip, so I've been trying to follow this thread, but
                        at this point, I'm lost. If you would please post the final clip, it would
                        be helpful.

                        Thanks,
                        JW

                        -----Original Message-----
                        From: Jody [mailto:kjv-av1611@...]
                        Sent: Monday, December 01, 2003 10:47 PM
                        To: ntb-clips@yahoogroups.com
                        Subject: Re: [Clip] Database Spit Clip


                        Hi Christopher,

                        >>> :) Are you the Chris that I know?
                        >
                        >Ummm...I don't think so. But, it is possible. :0) My last name is Wilson.

                        Nope, but the Chris I know would have used an eMail address like yours. :)

                        >>> Don't you have ftp access?
                        >
                        >Yes, I have ftp access.

                        That's the best route. I have a Library for Ws_Ftp also. You can make it
                        real easy uploading from NoteTab with it.
                        http://www.notetab.net/zip/ftpzip.zip

                        >Here's what I see after the "loop" label.
                        >
                        >:Loop
                        >^!Set %Start%=^$GetRow$:^$GetCol$
                        >^!Jump +18000

                        Put the two lines in here. What is will do it find the ; jump to the end of
                        it and then select back 18000 lines or there abouts. <g> You should always
                        have a backup.

                        >^!SetClipboard ^$GetTextTop$
                        >^!Toolbar Paste New
                        >^!Save As "^%PathName%^%n%^%ext%"
                        >^!SetDocIndex ^%DocIndex%
                        >^!Inc %n%
                        >^!If "^$GetRow$" => "^$GetLineCount$" Next else Loop
                        >; ^!Close Discard would be better below for resource
                        >; purposes since your file is so big.
                        >^!Toolbar Reload Document
                        >
                        >Where do I add those lines you posted? I really appreciate all your help! I
                        >downloaded the clipclass file and I plan on checking it out.

                        :)


                        See ya in the funnies,
                        Jody Adair, Prov. 15:15

                        Blessed are they who can laugh at themselves
                        for they shall never cease to be amused.
                        http://www.clean-funnies.com





                        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                      • Jody
                        Hi John, (Chris, thanks for your post. Keep on keep n on till we cross Jordan! It s best not to reply since it would be considered off topic and not for the
                        Message 11 of 17 , Dec 2, 2003
                        • 0 Attachment
                          Hi John,

                          (Chris, thanks for your post. Keep on keep'n on till we cross
                          Jordan! It's best not to reply since it would be considered
                          off topic and not for the use of NoteTab. ;)

                          >I'm interested in this clip, so I've been trying to follow this
                          >thread, but at this point, I'm lost. If you would please post the
                          >final clip, it would be helpful.

                          I added notes for you; hope it helps...

                          <--- Copy below this line --->
                          H=Split at nnn
                          ; eMailed on 12-02-2003, ntb-clips@yahoogroups.com, Jody
                          ; notetab.net, clean-funnies.com, fookes.us, sojourner.us

                          ^!SetHintInfo Working...
                          ^!SetScreenUpdate Off
                          ^!Set %DocIndex%=^$GetDocIndex$
                          ^!Set %n%=1
                          ^!Set %PathName%=^#; %ext%=^$GetExt(^##)$
                          ^!Jump Doc_End

                          :EmptyLine
                          ; Ensures there is an empty line at the end of the doc
                          ; If that creates a problem in the file, make sure you
                          ; have have automatic save turned off or make changes
                          ; in the Clip using a different method to ensure all of
                          ; the last line of data is copied
                          ^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
                          ^!Replace "^p" >> "" SB
                          ^!Goto EmptyLine
                          ^!InsertText ^p
                          ^!Jump 1

                          :Loop
                          ^!Set %Start%=^$GetRow$:^$GetCol$
                          ; Jumps the amount of lines you want to copy to a new file
                          ; I suggest you test with a small number on a small file
                          ^!Jump +10
                          ; Use ^!Find at the point if you want to find a specific
                          ; character or string to stop the copy at. Use the "S" option
                          ; if you do not want any messages to be displayed such as no
                          ; more occurrences found. Use ^!IfError [DoThis] else [DoThis]
                          ; after ^!Find if you want to add an option. A lot of times
                          ; you use that in a loop to prevent an endless loop.
                          ;^!Find "search data" S
                          ; ^!Jump Select_End or Select_Start to un-select the the text
                          ; found either at the beginning or end of the found data.
                          ;^!Jump Select_End
                          ; Custom function. Must have _GetTextTop Clip for it to work
                          ^!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%
                          ; Stops the loop once the end of doc is reached. When ^!Jump +
                          ; exceeds the doc line amount, then the cursor goes to the end
                          ^!If "^$GetRow$" => "^$GetLineCount$" Next else Loop
                          ; ^!Close Discard closes the original file w/o saving. The files
                          ; original end will be restored where the Clip ensured there was
                          ; only one blank line at the end of the file. If you want the file
                          ; to be saved use ^!Save As "^##" and optionally ^!Close
                          ^!Close Discard
                          ; Reloads original document w/o saving. Does not close the file
                          ;^!Toolbar Reload Document

                          <--- 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
                        • 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 12 of 17 , Dec 2, 2003
                          • 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 13 of 17 , Dec 2, 2003
                            • 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 14 of 17 , Dec 2, 2003
                              • 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 15 of 17 , Dec 2, 2003
                                • 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 16 of 17 , Dec 2, 2003
                                  • 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 17 of 17 , Dec 3, 2003
                                    • 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.