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

Re: GetRow

Expand Messages
  • silvermoonwoman2001
    Peter, The problem is not with ^$GetRow$, it is with these lines: ^!Find ^ ^( $)|(!)[^ s]* n TIRS ^!IfError Et ^!Set %Head%=^$GetSelection$^$GetRow$ Your
    Message 1 of 2 , Aug 12, 2002
      Peter,

      The problem is not with ^$GetRow$, it is with these lines:

      ^!Find "^\^(\$)|(!)[^\s]*\n" TIRS
      ^!IfError Et
      ^!Set %Head%=^$GetSelection$^$GetRow$

      Your ^!Find includes a newline, i.e., \n. The entire "found" text
      is in the selection, which you use in your ^!Set command, i.e.,
      ^$GetSelection$. One way around it would be to do another Find,
      just after the first one, within the selection (this time
      omitting the \n). Another way would be to delete the newline
      from the selection with

      ^!Set %Head% ^$StrDeleteRight(^$GetSelection$;2)$^$GetRow$

      The reason to delete 2 characters instead of one is that in
      reality \n is two characters, a carriage return and a linefeed.

      Some other comments about your clips, it is useful to avoid
      ^!Keyboard commands whereever possible. It is only ^!Keyboard
      commands that necessitate delays (^!Delay). Instead of Ctrl+A,
      you could use ^!Select All, and instead of ^!Keyboard Delete, you
      could use ^!Menu Edit/Delete. Or, with nothing selected you
      could just do:

      ^!Menu Edit/Clear All

      It appears that you have not explored Notetab's outline type
      of document, which is quite convenient for what you are trying to
      accomplish.

      You might try this on your PeterHelp.txt document:

      Insert this line at the top of the document:

      = V4 Outline MultiLine NoSorting TabWidth=30

      Then,

      ^!Replace "^{\^(\$)|(!)[^\s]*}\n" >> "\nH="\1"\n" ATWIRS

      Save it with a new name such as PeterHelp.otl (it will work with
      an extension of .txt, but its nice to know which of your
      documents are outlines).

      Next reload the document (it will be shown in outline format) and
      then select from the menu:

      Document|Outline Headings|Sort Headings

      Save again.

      Finally right-click in the Headings panel and select "Sort
      Headings" (if it is not already checked) and save one more time.
      This will make new additions get sorted automatically.

      If you ever want to see the document in regular text format,
      create a new document and select:

      Document|Insert File [browse to and select your PeterHelp.otl].

      Putting a semicolon in front of the top line (=V4 etc.) would
      make it stop behaving like an outline when loaded normally.

      Have fun,
      Sheri
    Your message has been successfully submitted and would be delivered to recipients shortly.