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

Re: [Clip] Upper case

Expand Messages
  • Alan C.
    On Tue, 10 Feb 2004 00:26:12 +1100, Dave wrote (the quoted further below): You should put double quotes around a menu name if it contains one or more forward
    Message 1 of 3 , Feb 9, 2004
      On Tue, 10 Feb 2004 00:26:12 +1100, Dave wrote (the > quoted further below):

      You should put double quotes around a menu name if it contains one or more forward slash characters. The case of characters does not have to be the same as the actual menu commands.

      The following example opens the Font dialog box for the active document:

      ^!MENU Document/Font/Change Font

      The example below inserts the date and time from the menu command (notice the use of double quotes):

      ^!MENU Document/"Insert Date/Time"

      --
      the above copied from help > help on clip programming.
      --

      but ur issue with otl is quite typical (the desired action NOT being limited only to the current topic) (if that's what U meant by 'heading(s)")

      in order to limit to current topic, likely you'll need to copy/paste the cur topic's content into a separate, a scratch doc

      then work on it there, then paste it back into the cur topic of ur outline.

      alternatively, u may able select the cur topic then work on it based on designated as a selection.

      Feel free to post again with further question the more specific the better. Alan.

      > Hi there
      > The clip below works ever time on a normal text page but in a OTL it always
      > finishes two or three headings ahead ,I have tried  "jump TEXT_END" in place
      > of the CTRL+END it makes no difference ,the clip works well it just does not
      > stop on one lot of content.
      >
      > H="UpperCase\:"
      > ^!SET %ROWT%=^$GETROW$
      > ^!KEYBOARD CTRL+END
      > ^!SET %ROWB%=^$GETROW$
      > ^!SET %ROWBT%=^$calc(^%ROWB% - ^%ROWT%)$
      > ^!SET %N%=1
      > ^!SetCursor ^%ROWT%:1
      > :START
      > ^!Find "\D*\:" SIR
      > ^!MENU Modify/Text Case/Upper Case
      > ^!INC %N%
      > ^!IF ^%N% <= ^%ROWBT% START
      > ^!Jump SELECT_END
      ;--end of clip
    • John Zeman
      Hey Dave, In addition to what Alan suggested, here s my 2 cents worth. Bear in mind it s kind of hard to answer this when we don t know what your goal is. It
      Message 2 of 3 , Feb 9, 2004
        Hey Dave,
        In addition to what Alan suggested, here's my 2 cents worth. Bear in
        mind it's kind of hard to answer this when we don't know what your
        goal is. It basically appears to me that you want to capitalize the
        preceding non digits to a colon (:) on each line using RegExp. A
        potential problem in doing it with row by row numbers as you have
        could occur depending on whether word wrap was turned on or not.

        So I'm guessing here at what your actual goal is.

        The following capitalizes the non digits preceding a : on each new
        line (after a line break i.e. hitting ENTER) in the entire document
        of any type of text including outlines.

        John

        ^!SetScreenUpdate Off
        ^!Jump DOC_START
        :Loop
        ^!Find "^[^0-9]*:" TISR
        ^!IfError end
        ^$StrUpper("^$GetSelection$")$
        ^!Jump SELECT_END
        ^!GoTo Loop






        --- In ntb-clips@yahoogroups.com, "Dave" <dgm2003@o...> wrote:
        > Hi there
        > The clip below works ever time on a normal text page but in a OTL
        it always
        > finishes two or three headings ahead ,I have tried "jump TEXT_END"
        in place
        > of the CTRL+END it makes no difference ,the clip works well it just
        does not
        > stop on one lot of content.
        >
        > H="UpperCase\:"
        > ^!SET %ROWT%=^$GETROW$
        > ^!KEYBOARD CTRL+END
        > ^!SET %ROWB%=^$GETROW$
        > ^!SET %ROWBT%=^$calc(^%ROWB% - ^%ROWT%)$
        > ^!SET %N%=1
        > ^!SetCursor ^%ROWT%:1
        > :START
        > ^!Find "\D*\:" SIR
        > ^!MENU Modify/Text Case/Upper Case
        > ^!INC %N%
        > ^!IF ^%N% <= ^%ROWBT% START
        > ^!Jump SELECT_END
        >
        > THANKYOU DAVE
      Your message has been successfully submitted and would be delivered to recipients shortly.