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

Copying the Text Statistics

Expand Messages
  • jonas_ramus
    Hi, I m trying to execute... ^!Keyboard ALT+T S M CTRL+A ALT+C ^!Toolbar Paste New in order... - to start the Text Statistics - to choose More - to copy the
    Message 1 of 11 , Jan 22, 2007
      Hi,

      I'm trying to execute...

      ^!Keyboard ALT+T S M CTRL+A ALT+C
      ^!Toolbar Paste New

      in order...

      - to start the Text Statistics
      - to choose "More"
      - to copy the whole Statistics with CTRL+A (shortcut menu) to
      the clipboard
      - to close the Statistics with ALT+C
      - to paste the Statistics into a new document

      This works fine with a relatively small text, but totally fails with
      texts > 1 MB. The execution stops at "More". Sometimes I manage to
      proceed to the "More" view when inserting some delay settings like...

      ^!Keyboard ALT+T S &400 M &5000 CTRL+A ALT+C

      ...but it doesn't copy the whole thing. The new document is empty, or
      sometimes there has been pasted only an older content of the
      clipboard.

      What's the problem with this? The ^!Keyboard ALT+T S M combination is
      also to be found in the Help File (see "Keyboard Macros").

      Has anybody got an idea how to achieve this? Thanks!

      Flo
    • fw7oaks
      Hi Flo, ... Windows clipboard file size limitation, Google for a clipboard extender and try using an external program rather than the in-built clipboard. fw
      Message 2 of 11 , Jan 22, 2007
        Hi Flo,

        > I'm trying to execute...
        >
        > ^!Keyboard ALT+T S M CTRL+A ALT+C
        > ^!Toolbar Paste New
        >
        > in order...
        >
        > - to start the Text Statistics
        > - to choose "More"
        > - to copy the whole Statistics with CTRL+A (shortcut menu) to
        > the clipboard
        > - to close the Statistics with ALT+C
        > - to paste the Statistics into a new document
        >
        > This works fine with a relatively small text, but totally fails
        > with texts > 1 MB.

        Windows clipboard file size limitation, Google for a "clipboard
        extender" and try using an external program rather than the in-built
        clipboard.

        fw
        PS I like ClipMate, but it isn't free
      • hsavage
        ... to proceed to the More view when inserting some delay settings ... or sometimes there has been pasted only an older content of the ... is also to be
        Message 3 of 11 , Jan 22, 2007
          jonas_ramus wrote:
          > Hi,
          >
          > I'm trying to execute...
          >
          > ^!Keyboard ALT+T S M CTRL+A ALT+C
          > ^!Toolbar Paste New
          >
          >
          > This works fine with a relatively small text, but totally fails
          > with texts > 1 MB. The execution stops at "More". Sometimes I manage
          to proceed to the "More" view when inserting some delay settings
          > like...
          >
          > ^!Keyboard ALT+T S &400 M &5000 CTRL+A ALT+C
          >
          > ...but it doesn't copy the whole thing. The new document is empty, >
          or sometimes there has been pasted only an older content of the
          > clipboard.
          >
          > What's the problem with this? The ^!Keyboard ALT+T S M combination >
          is also to be found in the Help File (see "Keyboard Macros").
          >
          > Has anybody got an idea how to achieve this? Thanks!
          >
          > Flo

          Flo,

          You have the right idea of adding delays but, you need more delays. The
          clip below works for me on a 200k file. Larger files will need an
          increasing amount of delay after 'ALT+T &15 S &15 M' and after
          'CTRL+A'. These 2 actions take the most time for successful completion.

          The ^!SetClipboard command insures you start out with an empty clipboard.

          H="Copy Stats"
          ^!SetClipboard ^%empty%
          ^!Jump 1
          ^!Keyboard ALT+T &15 S &15 M &300 CTRL+A &100 ALT+C &50
          ^!Toolbar Paste New


          ºvº
          2007.01.22 - 00.05.46
          Great Truth About Growing Old
          "You're getting old when you get the same sensation from
          a rocking chair that you once got from a roller coaster."
          hrs ø hsavage@...
        • jonas_ramus
          hsavage: Thanks for your advice. When testing your settings with a 1.700 KB file I still get nothing but an empty output. I need, at least, the following
          Message 4 of 11 , Jan 23, 2007
            hsavage:

            Thanks for your advice. When testing your settings with a 1.700 KB
            file I still get nothing but an empty output.

            I need, at least, the following settings to see the "More" option
            work, and to get the Statistics being closed with "Close":

            ^!Keyboard ALT+T &15 S &400 M &5000 CTRL+A &400 ALT+C &100

            But still the clip opens another document that remains empty.
            Apparently, it's the CTRL+A that doesn't work.

            Thanks also to fw7oaks. I cannot see, however, how a tool like
            ClipMate could solve that problem. It has to do with NoteTab, not
            with the clipboard. It works fine when doing all this manually. But
            this command has been designed as part of a greater clip that
            processes the Statistics and gets it into a field structure. Finally,
            that output should be imported into a database for further evaluation.

            Probably, I have to give up that concept - unlesse we find any
            solution for that keyboard macro.

            Flo


            PS The following clip is designed for importing the Statistics into
            an askSam database. It works fine with a small TXT-file of about 100
            KB. With 1.700 KB the ^!Keyboard command fails:

            ^!SetHintInfo Working...
            ^!SetClipboard ^%Empty%
            ^!Keyboard ALT+T S &400 M &5000 CTRL+A &400 ALT+C &100
            ^!Toolbar Paste New
            ^!Jump 1
            ^!Set %Char%=(°|\^|!|"|²|§|³|\$|%|&|/|\{|\(|\[|\)|\]|=|\}|\?
            |\\|`|´|@|€|\*|\+|~|'|\#|>|<|\||;|,|:|\.|_|-|­|–|—
            |£|¥|©|®|•|¼|½|¾|"|«|»|\d|.\t)
            ^!Find "^^%Char%" WRST
            ^!IfError Edit
            ^!DeleteLine
            ^!Goto Skip_-3
            :Edit
            ; Delete first line "Word - Frequency - %"
            ^!Jump 1
            ^!DeleteLine
            ^!DeleteLine
            ; Delete last seven lines
            ^!Jump Doc_End
            ^!SelectTo ^$Calc(^$GetRow$-7)$:1
            ^!Toolbar Cut
            ; Put results into three fields (word - total - %)
            ^!Replace "^(.+)\t(\d+)\t(\d+)\.(\d){2}" >> "@@@word[ $1 ] total[
            $2 ] %[ $3,$4 ]" AWIRS
            ^!Info Finished!
            ; end of clip
          • Sheri
            Where is the CTRL+C that would ever put it on the clipboard? ... Regards, Sheri
            Message 5 of 11 , Jan 23, 2007
              Where is the CTRL+C that would ever put it on the clipboard?

              > ^!Keyboard ALT+T &15 S &400 M &5000 CTRL+A &400 ALT+C &100

              Regards,
              Sheri
            • hsavage
              ... Sheri, On my machine, when using the Text Statistics function, with the More window open and filled with data, CTRL+A copies the data to the
              Message 6 of 11 , Jan 23, 2007
                Sheri wrote:
                > Where is the CTRL+C that would ever put it on the clipboard?
                >
                >> ^!Keyboard ALT+T &15 S &400 M &5000 CTRL+A &400 ALT+C &100
                >
                > Regards,
                > Sheri

                Sheri,

                On my machine, when using the 'Text Statistics' function, with the
                'More' window open and filled with data, 'CTRL+A' copies the data to the
                clipboard. Thereafter, I only need do 'ALT+C' to close the 'Statistics'
                function dialog and with the provided clip, open a new file and paste
                the data.

                H="Copy Text Stats"
                ^!SetClipboard ^%empty%
                ^!Jump 1
                ^!Keyboard ALT+T &15 S &15 M &1000 CTRL+A &200 ALT+C &50
                ;^!Keyboard ALT+T &15 S &15 M &1000 SHIFT+CTRL+END &200 CTRL+C &200
                ALT+C &50
                ^!Toolbar Paste New

                SHIFT+CTRL+END &200 CTRL+C &200

                Above is a replacement for 'CTRL+A' that may help in some cases. In any
                case 'increased file size' equals 'increased delay time', particularly
                after the 'M' and after the 'CTRL+A' or the replacement.

                ºvº
                2007.01.23 - 12.40.55
                Great Truths Adults Have Learned:
                "Laughing is good exercise. It's like jogging on the inside."
                hrs ø hsavage@...
              • Sheri
                Hi Flo, This works for me on a 6.75 mb file. It allows about 30 seconds for the More command to finish. I replaced the recurring whole document
                Message 7 of 11 , Jan 23, 2007
                  Hi Flo, This works for me on a 6.75 mb file. It allows about 30
                  seconds for the More command to finish. I replaced the recurring whole
                  document Find..DeleteLine with a Replace All because it finishes much
                  faster.

                  Regards,
                  Sheri

                  ^!SetClipboard ^%Empty%
                  ^!Keyboard ALT+T &15 S &1000 M &22000 SHIFT+RIGHT SHIFT+CTRL+END &500
                  CTRL+C &500 ALT+C
                  ^!Menu File/New
                  ^!Menu Edit/Paste
                  ^!SetClipboard ^%Empty%
                  ^!Set
                  %Char%=(°|\^|!|"|²|§|³|\$|%|&|/|\{|\(|\[|\)|\]|=|\}|\?|\\|`|´|@|€|\*|\+|~|'|\#|>|<|\||;|,|:|\.|_|-|­|–|—|£|¥|©|®|•|¼|½|¾|"|«|»|\d|.\t)
                  ^!Replace "^^%Char%.*\r\n" >> "" ARWS
                  :Edit
                  ; Delete first line "Word - Frequency - %"
                  ^!Jump 1
                  ^!DeleteLine
                  ^!DeleteLine
                  ; Delete last seven lines
                  ^!Jump Doc_End
                  ^!SelectTo ^$Calc(^$GetRow$-7)$:1
                  ^!Menu Edit/Delete
                  ; Put results into three fields (word - total - %)
                  ^!Replace "^(.+)\t(\d+)\t(\d+)\.(\d){2}" >> "@@@word[ $1 ] total[$2 ]
                  %[ $3,$4 ]" AWIRS
                  ^!Info Finished!
                  ; end of clip


                  --- In ntb-clips@yahoogroups.com, "jonas_ramus" <flo.gehrke@...> wrote:
                  >
                  > hsavage:
                  >
                  > Thanks for your advice. When testing your settings with a 1.700 KB
                  > file I still get nothing but an empty output.
                  >
                  > I need, at least, the following settings to see the "More" option
                  > work, and to get the Statistics being closed with "Close":
                  >
                  > ^!Keyboard ALT+T &15 S &400 M &5000 CTRL+A &400 ALT+C &100
                  >
                  > But still the clip opens another document that remains empty.
                  > Apparently, it's the CTRL+A that doesn't work.
                  >
                  > Thanks also to fw7oaks. I cannot see, however, how a tool like
                  > ClipMate could solve that problem. It has to do with NoteTab, not
                  > with the clipboard. It works fine when doing all this manually. But
                  > this command has been designed as part of a greater clip that
                  > processes the Statistics and gets it into a field structure. Finally,
                  > that output should be imported into a database for further evaluation.
                  >
                  > Probably, I have to give up that concept - unlesse we find any
                  > solution for that keyboard macro.
                  >
                  > Flo
                  >
                  >
                  > PS The following clip is designed for importing the Statistics into
                  > an askSam database. It works fine with a small TXT-file of about 100
                  > KB. With 1.700 KB the ^!Keyboard command fails:
                  >
                  > ^!SetHintInfo Working...
                  > ^!SetClipboard ^%Empty%
                  > ^!Keyboard ALT+T S &400 M &5000 CTRL+A &400 ALT+C &100
                  > ^!Toolbar Paste New
                  > ^!Jump 1
                  > ^!Set %Char%=(°|\^|!|"|²|§|³|\$|%|&|/|\{|\(|\[|\)|\]|=|\}|\?
                  > |\\|`|´|@|€|\*|\+|~|'|\#|>|<|\||;|,|:|\.|_|-|­|–|—
                  > |£|¥|©|®|•|¼|½|¾|"|«|»|\d|.\t)
                  > ^!Find "^^%Char%" WRST
                  > ^!IfError Edit
                  > ^!DeleteLine
                  > ^!Goto Skip_-3
                  > :Edit
                  > ; Delete first line "Word - Frequency - %"
                  > ^!Jump 1
                  > ^!DeleteLine
                  > ^!DeleteLine
                  > ; Delete last seven lines
                  > ^!Jump Doc_End
                  > ^!SelectTo ^$Calc(^$GetRow$-7)$:1
                  > ^!Toolbar Cut
                  > ; Put results into three fields (word - total - %)
                  > ^!Replace "^(.+)\t(\d+)\t(\d+)\.(\d){2}" >> "@@@word[ $1 ] total[
                  > $2 ] %[ $3,$4 ]" AWIRS
                  > ^!Info Finished!
                  > ; end of clip
                  >
                • Don Daugherty
                  ... As you ve discovered the !keyboard command runs into timing problems. Sometiimes these can be avoided by using the !Menu command ^!Menu Tools/Text
                  Message 8 of 11 , Jan 23, 2007
                    jonas_ramus wrote:
                    > Hi,
                    >
                    > I'm trying to execute...
                    >
                    > ^!Keyboard ALT+T S M CTRL+A ALT+C
                    > ^!Toolbar Paste New
                    >
                    > in order...
                    >
                    > - to start the Text Statistics
                    > - to choose "More"
                    > - to copy the whole Statistics with CTRL+A (shortcut menu) to
                    > the clipboard
                    > - to close the Statistics with ALT+C
                    > - to paste the Statistics into a new document
                    >
                    As you've discovered the !keyboard command runs into timing problems.
                    Sometiimes these can be avoided by using the !Menu command
                    ^!Menu "Tools/Text Statistics"
                    however, getting the "More" function doesn't seem to be accessible via
                    this command. It seems that the keyboard command is still needed for
                    that step at least. you may still be able to use !menu "Edit/Select
                    All" and !Menu 'Edit/Copy", but then revert to !Keyboard Alt+C to close
                    the statistics window. Delays may still be needed. Sometimes you can
                    use an adaptable delay
                    employing ^$GetAppTitle$ to tell whether you have gotten into or exited
                    from the right window yet. Example

                    ^!Menu "Tools/Text Statistics"
                    ; Delay loop beginning
                    ^!Delay 1
                    ^!IfSame "Text Statistics [While Document]" Next Else Skip_-1
                    ; Delay loop end
                    ^!Keyboard Alt+M
                    ; Delay 1 second (10 tenths of a second):
                    ^!Delay 10
                    ^!Menu "Edit/Select All"
                    ^!Menu "Edit/Copy"
                    ^!Keyboard Alt+C
                    ...
                    ^!Menu "Edit/Paste"

                    The delay loop may not be needed; omit it if possible.

                    Hope these comments lead you to a solution.
                  • Sheri
                    Hi Don, The Text Statistics dialog is modal, you have to close it before the Clip Interpreter gets to the next line. If she wanted to get the material on the
                    Message 9 of 11 , Jan 23, 2007
                      Hi Don,

                      The Text Statistics dialog is modal, you have to close it before the
                      Clip Interpreter gets to the next line. If she wanted to get the
                      material on the clipboard manually, the next clip line could be the
                      ^!Toolbar Paste New. For the clip to get it on the clipboard means the
                      whole operation must be done with one ^!Keyboard command.

                      Regards,
                      Sheri
                    • jonas_ramus
                      Sheri, hsavage, Don: It has been an excellent idea not to use the CTRL+A command from the right-click menu but to select the whole Statistics with
                      Message 10 of 11 , Jan 23, 2007
                        Sheri, hsavage, Don:

                        It has been an excellent idea not to use the CTRL+A command from the
                        right-click menu but to select the whole Statistics with
                        SHIFT+CTRL+END (hsavage) or SHIFT+RIGHT SHIFT+CTRL+END (Sheri)
                        followed by CTRL+C - both commands are working fine.

                        Now I manage to perfectly process my 1.7 MB test file with...

                        ^!Keyboard ALT+T S &400 M &5000 SHIFT+CTRL+END &200 CTRL+C &200 ALT+C
                        &50

                        It seems to depend greatly on the text volume and the machine we are
                        using, and it's quite complicated to find out the correct delay
                        settings.

                        Thank you, Sheri, for improving my clip. Your ^!Replace line is much
                        faster indeed.

                        Unfortunately, I had some trouble when testing it. I ran into several
                        error messages. I found out that some characters in my alternation
                        have been replaced by the Yahoo forum: 1. there is an additional
                        question mark without escape between @|?|\*. Originally, this has
                        been an Euro-character which is ANSI 128 on my keyboard. 2.
                        The "middle point" (ANSI 149) has been turned into a normal dot -
                        thus the whole text has been wiped off ;-), and so on. These things
                        have a will of their own! But finally it worked...

                        Thanks again for your help in this matter!

                        Regards
                        Flo

                        PS To Don: Thanks for your message. However, I didn't manage to make
                        it work. Certainly, Sheri has made it clear why. For me, the use of...

                        ^!Menu "Edit/Select All"
                        ^!Menu "Edit/Copy"

                        in this situation is grabbing the source text but not the Statistics.
                      • Don Daugherty
                        ... Thanks for the clarification! Don
                        Message 11 of 11 , Jan 24, 2007
                          Sheri wrote:
                          > Hi Don,
                          >
                          > The Text Statistics dialog is modal, you have to close it before the
                          > Clip Interpreter gets to the next line. If she wanted to get the
                          > material on the clipboard manually, the next clip line could be the
                          > ^!Toolbar Paste New. For the clip to get it on the clipboard means the
                          > whole operation must be done with one ^!Keyboard command.
                          >
                          > Regards,
                          > Sheri
                          >
                          Thanks for the clarification!
                          Don
                        Your message has been successfully submitted and would be delivered to recipients shortly.