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

Daily Word Count Clips

Expand Messages
  • rpdooling
    Dear Clip Programming Wizards: Over in the NTP General list, an aspiring novelist (Mike Brown) wants to keep track of his daily word counts. I made these clips
    Message 1 of 2 , Oct 30, 2005
    • 0 Attachment
      Dear Clip Programming Wizards:

      Over in the NTP General list, an aspiring novelist (Mike Brown) wants
      to keep track of his daily word counts. I made these clips which I'm
      sure many here can improve upon. Perhaps they are of no use to anybody
      but writers!

      Sorry about the copious comments but he is new to clip programming.
      Comments always helped me.

      If you contribute, we would both appreciate it.

      Thanks,

      rpdooling

      H=";"

      H=";Word Count"
      There are three clips in this WordCount group.^p^p(1) Insert Date &
      WordCount - Jumps to the end of your current document and inserts the
      date, time, and current total WordCount.^p^p(2) Start Counting Words -
      Obtains the total number of words in the current document and saves
      that value to the NoteTab ini value under the default ClipValues
      section as "StartWordCount."^p^p(3) Tally Daily Word Count - Obtains
      the total number of words in the current document and subtracts the
      starting word count for the tally of the words you've created.

      H="Insert Date & WordCount"
      ; Created: 10/30/2005 2:58:51 PM
      ; Author: rpd
      ; Modified:
      ;
      ; Jumps to the end of any kind of doc, even an outline.
      ^!Jump DOC_END
      ; Add a spacer.
      ^!Keyboard ENTER

      ; This issues the keyboard commands to open
      ; Text Statistics (under Tools)
      ; and then tab to get the word count, and copy to clipboard.
      ^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ESC

      ; This function gets the date and puts it at the end of your doc.
      ^!InsertText Date: ^$GetDate("c")$
      ^!Keyboard ENTER

      ; Paste in WordCount
      ^!InsertText WordCount:
      ^!Paste

      H="Start Counting Words"
      ; Created: 10/30/2005 3:01:17 PM
      ; Author: rpd
      ; Modified:

      ; Checks to see if this is an outline.
      ; If so it proceeds; if not
      ; it goes to the COUNTDOC label.
      ^!IfTrue ^$IsOutlineDoc$ NEXT ELSE COUNTDOC

      ; Opens Text Statistics using keyboard commands
      ; and gets the wordcount. The "Y" deals with
      ; the dialogue that pops up and asks if you want
      ; to scan all outline headings.
      ^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ALT+C

      ; Now we have the wordcount, let's go save it.
      ^!GoTo SAVEWORDCOUNT

      :COUNTDOC
      ; This gets the wordcount in a normal doc
      ^!Keyboard ALT+T S TAB TAB TAB CTRL+C ALT+C

      :SAVEWORDCOUNT
      ; Assigns your starting WordCount to WordCount1
      ^!Set %WordCount1%=^$GetClipboard$

      ; Saves your starting WordCount to the NotePro ini file
      ; under a key consisting of the
      ; DosShortName + SWC (for StartWordCount)
      ; in the default ClipValues section.
      ^!SaveValue ClipValues:^$GetShort(^##)$SWC=^%WordCount1%

      ; Display your starting WordCount in a pretty Info box.
      ^!Info Your starting WordCount is ^%WordCount1%

      H="Tally Daily WordCount"
      ; Created: 10/30/2005 3:02:08 PM
      ; Author: rpd
      ; Modified:

      ; Checks to see if this is an outline.
      ; If so it proceeds; if not
      ; it goes to the COUNTDOC label.
      ^!IfTrue ^$IsOutlineDoc$ NEXT ELSE COUNTDOC

      ; Opens Text Statistics using keyboard commands
      ; and gets the wordcount. The "Y" deals with
      ; the dialogue that pops up and asks if you want
      ; to scan all outline headings.
      ^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ALT+C

      ; Now we have the wordcount, let's go save it.
      ^!GoTo TALLYWORDS

      :COUNTDOC
      ; This gets the wordcount in a normal doc
      ^!Keyboard ALT+T S TAB TAB TAB CTRL+C ALT+C

      :TALLYWORDS
      ; Retrieves your starting WordCount from the NotePro ini file,
      ; where you saved it with the clip "Start Counting Words,"
      ; and assigns the number to WordCount1.
      ^!Set %WordCount1%=^$GetValue("ClipValues:^$GetShort(^##)$SWC")$
      ; If you didn't save a StartWordCount, you'll get an error.
      ^!IfError NOSTART

      ; Gets current WordCount total from the clipboard
      ; and assigns it to WordCount2.
      ^!Set %WordCount2%=^$GetClipboard$
      ; Calculate Tally by subtracting WordCount1 from WordCount2
      ^!Set %Tally%=^$Calc(^%WordCount2%-^%WordCount1%)$

      ^!Info [L]Your starting WordCount was ^%WordCount1%^p^pYour current
      WordCount is ^%WordCount2%^p^pYou have created ^%Tally% words!

      ^!Goto End

      :NOSTART
      ^!Info [L]There was an error. You probably didn't save your your
      starting WordCount.^p^pGo back and run the Start Counting Words clip!
    • rpdooling
      Please Disregard the first clunky batch of WordCount clips. I have made four new clips and will upload them in the files section in about a week after I
      Message 2 of 2 , Nov 1, 2005
      • 0 Attachment
        Please Disregard the first clunky batch of WordCount clips.

        I have made four new clips and will upload them in the files section
        in about a week after I thoroughly test them.

        Any other writers/NoteTabbers who want to beta test them can email me.
        Here's a description of what I'm making from the ^!Info file.

        WordCount Version 1.1

        Writers, especially novelists, often obsess about their production
        numbers. These four clips help keep track of how many words you are
        writing per day. The clips assume that the novel (or other large
        project) is contained in a single NoteTab file (outline or text).
        However you can track as many different files as you please.

        There are four clips in this WordCount group.

        (1) Start Counting Words - Saves the date and the current number of
        words for the given document to the NotePro.ini file and sends you on
        your way with an inspirational message;

        (2) Check Your Progress - Checks to make sure that you ran the first
        clip and then tallies your progress by subtracting: (1) the number of
        words you started with, from (2) the total number of words in the
        current document. If you have created 2000 new words, you get a
        reward; if not, you get appropriate encouragement or punishment.

        (3) Record Your Progress - You should run this clip only after a day's
        hard work and just before quitting. It tallies the total number of
        words you created that day and enters them on the last line of the
        file along with today's date.

        (4) Record Date & WordCount - This clip doesn't require values created
        by the other clips. It simply inserts the date, time, and current
        total word count on a single line at the end of the file in the
        following format:
        {Date -> WordCount: #####}.

        Happy Writing!

        rpdooling
        http://dooling.com

        --- In ntb-clips@yahoogroups.com, "rpdooling" <rpdooling@y...> wrote:
        >
        > Dear Clip Programming Wizards:
        >
        > Over in the NTP General list, an aspiring novelist (Mike Brown) wants
        > to keep track of his daily word counts. I made these clips which I'm
        > sure many here can improve upon. Perhaps they are of no use to anybody
        > but writers!
        >
        > Sorry about the copious comments but he is new to clip programming.
        > Comments always helped me.
        >
        > If you contribute, we would both appreciate it.
        >
        > Thanks,
        >
        > rpdooling
        >
        > H=";"
        >
        > H=";Word Count"
        > There are three clips in this WordCount group.^p^p(1) Insert Date &
        > WordCount - Jumps to the end of your current document and inserts the
        > date, time, and current total WordCount.^p^p(2) Start Counting Words -
        > Obtains the total number of words in the current document and saves
        > that value to the NoteTab ini value under the default ClipValues
        > section as "StartWordCount."^p^p(3) Tally Daily Word Count - Obtains
        > the total number of words in the current document and subtracts the
        > starting word count for the tally of the words you've created.
        >
        > H="Insert Date & WordCount"
        > ; Created: 10/30/2005 2:58:51 PM
        > ; Author: rpd
        > ; Modified:
        > ;
        > ; Jumps to the end of any kind of doc, even an outline.
        > ^!Jump DOC_END
        > ; Add a spacer.
        > ^!Keyboard ENTER
        >
        > ; This issues the keyboard commands to open
        > ; Text Statistics (under Tools)
        > ; and then tab to get the word count, and copy to clipboard.
        > ^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ESC
        >
        > ; This function gets the date and puts it at the end of your doc.
        > ^!InsertText Date: ^$GetDate("c")$
        > ^!Keyboard ENTER
        >
        > ; Paste in WordCount
        > ^!InsertText WordCount:
        > ^!Paste
        >
        > H="Start Counting Words"
        > ; Created: 10/30/2005 3:01:17 PM
        > ; Author: rpd
        > ; Modified:
        >
        > ; Checks to see if this is an outline.
        > ; If so it proceeds; if not
        > ; it goes to the COUNTDOC label.
        > ^!IfTrue ^$IsOutlineDoc$ NEXT ELSE COUNTDOC
        >
        > ; Opens Text Statistics using keyboard commands
        > ; and gets the wordcount. The "Y" deals with
        > ; the dialogue that pops up and asks if you want
        > ; to scan all outline headings.
        > ^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ALT+C
        >
        > ; Now we have the wordcount, let's go save it.
        > ^!GoTo SAVEWORDCOUNT
        >
        > :COUNTDOC
        > ; This gets the wordcount in a normal doc
        > ^!Keyboard ALT+T S TAB TAB TAB CTRL+C ALT+C
        >
        > :SAVEWORDCOUNT
        > ; Assigns your starting WordCount to WordCount1
        > ^!Set %WordCount1%=^$GetClipboard$
        >
        > ; Saves your starting WordCount to the NotePro ini file
        > ; under a key consisting of the
        > ; DosShortName + SWC (for StartWordCount)
        > ; in the default ClipValues section.
        > ^!SaveValue ClipValues:^$GetShort(^##)$SWC=^%WordCount1%
        >
        > ; Display your starting WordCount in a pretty Info box.
        > ^!Info Your starting WordCount is ^%WordCount1%
        >
        > H="Tally Daily WordCount"
        > ; Created: 10/30/2005 3:02:08 PM
        > ; Author: rpd
        > ; Modified:
        >
        > ; Checks to see if this is an outline.
        > ; If so it proceeds; if not
        > ; it goes to the COUNTDOC label.
        > ^!IfTrue ^$IsOutlineDoc$ NEXT ELSE COUNTDOC
        >
        > ; Opens Text Statistics using keyboard commands
        > ; and gets the wordcount. The "Y" deals with
        > ; the dialogue that pops up and asks if you want
        > ; to scan all outline headings.
        > ^!Keyboard ALT+T S Y TAB TAB TAB CTRL+C ALT+C
        >
        > ; Now we have the wordcount, let's go save it.
        > ^!GoTo TALLYWORDS
        >
        > :COUNTDOC
        > ; This gets the wordcount in a normal doc
        > ^!Keyboard ALT+T S TAB TAB TAB CTRL+C ALT+C
        >
        > :TALLYWORDS
        > ; Retrieves your starting WordCount from the NotePro ini file,
        > ; where you saved it with the clip "Start Counting Words,"
        > ; and assigns the number to WordCount1.
        > ^!Set %WordCount1%=^$GetValue("ClipValues:^$GetShort(^##)$SWC")$
        > ; If you didn't save a StartWordCount, you'll get an error.
        > ^!IfError NOSTART
        >
        > ; Gets current WordCount total from the clipboard
        > ; and assigns it to WordCount2.
        > ^!Set %WordCount2%=^$GetClipboard$
        > ; Calculate Tally by subtracting WordCount1 from WordCount2
        > ^!Set %Tally%=^$Calc(^%WordCount2%-^%WordCount1%)$
        >
        > ^!Info [L]Your starting WordCount was ^%WordCount1%^p^pYour current
        > WordCount is ^%WordCount2%^p^pYou have created ^%Tally% words!
        >
        > ^!Goto End
        >
        > :NOSTART
        > ^!Info [L]There was an error. You probably didn't save your your
        > starting WordCount.^p^pGo back and run the Start Counting Words clip!
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.