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

Re: [Clip] Help file

Expand Messages
  • hsavage
    ... John, A slight misinterpretation, the square-brackets in help file examples indicate only that an additional parameter is optional, they do not become part
    Message 1 of 9 , Apr 8, 2006
    • 0 Attachment
      junja wrote:
      > If I've understood right, the syntaxes for passing:
      > - an empty parameter (to a command) is ""
      > - optional parameters (in the help file) is []

      > That being the case, it seems to me that the ^!MakeShortcut
      > example line in the help file might be not

      > ^!MakeShortcut ShortcutLocation "Target" ["Arguments"]
      > ["Description"] [CmdShow]

      > but
      > ^!MakeShortcut ShortcutLocation "Target" "[Arguments]"
      > "[Description]" [CmdShow]

      > And a tip: some of the help file example lines have
      > spaces at the end - so be careful when copying them into
      > clips. It took me a long time to figure out why a clip
      > wasn't working ..
      > John

      John,

      A slight misinterpretation, the square-brackets in help file examples
      indicate only that an additional parameter is optional, they do not
      become part of the working command line.

      This is the correct display model, ["Arguments"], not, "[Arguments]",
      since the brackets are not included in the final command. The quotes
      are not necessarily required either, but may be acceptable in all cases.

      Also, to minimize problems with 'extra spaces', referred to in 'Options'
      as 'Whitespace', goto - View > Options > Documents, place a check mark
      at 'Trim White Spaces'.

      If this is checked, in most cases, it automatically eliminates extra
      spaces at the ends of lines when files are saved, especially if reloaded
      after being saved.

      ºvº
      06.04.08_06.54
      "Communication Skills II; Thinking Before Speaking."
      hrs ø hsavage@...
    • hsavage
      ... John, In the previous response I neglected to address the empty parameter . There are several predefined variables for use in clips, in the above
      Message 2 of 9 , Apr 8, 2006
      • 0 Attachment
        hsavage wrote:
        > junja wrote:
        >> If I've understood right, the syntaxes for passing:
        >> - an empty parameter (to a command) is ""
        >> - optional parameters (in the help file) is []
        >
        > John,
        >
        > A slight misinterpretation, the square-brackets in help file examples
        > indicate only that an additional parameter is optional, they do not
        > become part of the working command line.

        John,

        In the previous response I neglected to address the 'empty ""
        parameter'. There are several 'predefined variables for use in clips,
        in the above case ^%empty% would be the predefined variable. Full list
        from 'Help' below.

        ^%AR_KEY% = Auto-replace activation key (added in v4.6)
        ^%AR_WORD% = Auto-replace text (added in v4.9)
        ^%CARET% = caret (^) (added in v4.6)
        ^%COLON% = colon (:)
        ^%EMPTY% = empty string
        ^%NL% = new line (CR/LF pair)
        ^%PAGE% = Page break
        ^%RESULT%= Used to assign result to custom functions (added in v4.8)
        ^%SC% = semicolon (;)
        ^%SPACE% = Blank space character
        ^%TAB% = Tab character
        ^%VBAR% = vertical bar (|) (added in v4.6)

        These, at times, tend to be less confusing than other entries when
        reading thru a clip trying to follow the logic.

        ºvº
        06.04.08_06.54
        "Communication Skills II; Thinking Before Speaking."
        hrs ø hsavage@...
      • junja
        Hi hrs You ve much more experience than I have in clip programming but there s a point of logic here. ... The point is, how do you pass an empty parameter?
        Message 3 of 9 , Apr 10, 2006
        • 0 Attachment
          Hi hrs
          You've much more experience than I have in clip programming
          but there's a point of logic here.

          hsavage wrote:
          > junja wrote:
          > > If I've understood right, the syntaxes for passing:
          > > - an empty parameter (to a command) is ""
          > > - optional parameters (in the help file) is []
          >
          > > That being the case, it seems to me that the ^!MakeShortcut
          > > example line in the help file might be not
          >
          > > ^!MakeShortcut ShortcutLocation "Target" ["Arguments"]
          > > ["Description"] [CmdShow]
          >
          > > but
          > > ^!MakeShortcut ShortcutLocation "Target" "[Arguments]"
          > > "[Description]" [CmdShow]
          >
          > > And a tip: some of the help file example lines have
          > > spaces at the end - so be careful when copying them into
          > > clips. It took me a long time to figure out why a clip
          > > wasn't working ..
          > > John
          >
          > John,
          >
          > A slight misinterpretation, the square-brackets in help file examples
          > indicate only that an additional parameter is optional, they do not
          > become part of the working command line.
          >
          > This is the correct display model, ["Arguments"], not, "[Arguments]",
          > since the brackets are not included in the final command.

          The point is, how do you pass an empty parameter? The
          ["Arguments"]
          model leaves nothing there to signify an empty parameter
          while the
          "[Arguments]"
          one leaves the "" to do so.
          [I was assuming the usage of square brackets for showing
          optional parameters.]

          > The quotes
          > are not necessarily required either, but may be acceptable in all cases.
          >
          > Also, to minimize problems with 'extra spaces', referred to in 'Options'
          > as 'Whitespace', goto - View > Options > Documents, place a check mark
          > at 'Trim White Spaces'.
          >
          > If this is checked, in most cases, it automatically eliminates extra
          > spaces at the ends of lines when files are saved, especially if reloaded
          > after being saved.

          Which is fine if that's what you want systematically - but I
          want it only for clip programming. I didn't want to say
          this out loud but these two points are, it seems to me,
          weaknesses which can trip up the innocent. One in the doc,
          the other in the program. But then Ntb has enough strengths
          that I can pardon a basketful of weaknesses .. which is not
          to say stay silent about them.
          junja
        • junja
          ... Okay, but it would be nice if the example in the doc was definitive. Does ntb accept for an empty parameter? junja
          Message 4 of 9 , Apr 10, 2006
          • 0 Attachment
            hsavage wrote:
            > hsavage wrote:
            > > junja wrote:
            > >> If I've understood right, the syntaxes for passing:
            > >> - an empty parameter (to a command) is ""
            > >> - optional parameters (in the help file) is []
            > >
            > > John,
            > >
            > > A slight misinterpretation, the square-brackets in help file examples
            > > indicate only that an additional parameter is optional, they do not
            > > become part of the working command line.
            >
            > John,
            >
            > In the previous response I neglected to address the 'empty ""
            > parameter'. There are several 'predefined variables for use in clips,
            > in the above case ^%empty% would be the predefined variable. Full list
            > from 'Help' below.
            >
            > ^%AR_KEY% = Auto-replace activation key (added in v4.6)
            > ^%AR_WORD% = Auto-replace text (added in v4.9)
            > ^%CARET% = caret (^) (added in v4.6)
            > ^%COLON% = colon (:)
            > ^%EMPTY% = empty string
            > ^%NL% = new line (CR/LF pair)
            > ^%PAGE% = Page break
            > ^%RESULT%= Used to assign result to custom functions (added in v4.8)
            > ^%SC% = semicolon (;)
            > ^%SPACE% = Blank space character
            > ^%TAB% = Tab character
            > ^%VBAR% = vertical bar (|) (added in v4.6)
            >
            > These, at times, tend to be less confusing than other entries when
            > reading thru a clip trying to follow the logic.
            >
            > ºvº

            Okay, but it would be nice if the example in the doc was
            definitive.
            Does ntb accept "" for an empty parameter?
            junja
          • hsavage
            ... John, Yes, will suffice for ^%empty% in most cases I can think of if an empty parameter is required. To trim blanks in a document without setting the
            Message 5 of 9 , Apr 10, 2006
            • 0 Attachment
              junja wrote:
              > hsavage wrote:
              >>> junja wrote:
              >>>> If I've understood right, the syntaxes for passing:
              >>>> - an empty parameter (to a command) is ""
              >>>> - optional parameters (in the help file) is []
              >>>
              >>> John,
              >>
              >> In the previous response I neglected to address the 'empty ""
              >> parameter'.
              >>
              >> ^%EMPTY% = empty string
              >>
              >> ºvº
              >
              > Okay, but it would be nice if the example in the doc was
              > definitive.
              > Does ntb accept "" for an empty parameter?
              > junja

              John,

              Yes, "" will suffice for ^%empty% in most cases I can think of if an
              empty parameter is required.

              To trim blanks in a document without setting the menu option one could
              use a clip, as below. Added to a Personal Clipbar this clip, as is,
              trims the whole document but could be modified to trim a preselected
              portion.

              <>·······Start Clip·······<>
              H="Bla-Trim-nks"
              ;_ Modified-Updated~Created_20060410
              ;_ hrs ø hsavage·pobox·com_08:45:33a
              ^!SetScreenUpdate 0
              ^!Set %view%=^$GetRowTop$
              ^!Set %rowcol%=^$GetRow$:^$GetCol$
              ^!Select ALL
              ^!Menu Modify/Lines/Trim Blanks
              ^!SetView ^%view%:1
              ^!Select 0
              ^!SetCursor ^%rowcol%
              <>········End Clip········<>

              ºvº
              06.04.10_07.31
              "Cooking III; How Not to Inflict Your Diets on Other People."
              hrs ø hsavage@...
            • abairheart
              ... Actually, NoteTab s help is way better than most other software. Give the problems with NoteTab help, what does that say about other software?! The way to
              Message 6 of 9 , Apr 10, 2006
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, junja <junja@...> wrote:
                >
                >
                > Which is fine if that's what you want systematically - but I
                > want it only for clip programming. I didn't want to say
                > this out loud but these two points are, it seems to me,
                > weaknesses which can trip up the innocent. One in the doc,
                > the other in the program.

                Actually, NoteTab's help is way better than most other software. Give
                the problems with NoteTab help, what does that say about other
                software?!

                The way to deal with ambiguities is to try them out several ways.

                Try for example:

                ^!SaveValue test="data"
                ^!Info ^$GetValue(test)$

                and

                ^!Set %test%="data"
                ^!Info ^%test%

                The above should illustrate one of the problems with NoteTab's quote
                handling.

                Passing an empty argument to a command can be done with or without
                quotes.

                If you are looking for ways to test for an empty argument, and run
                into the "^&" interpretation problem, then consider passing a dummy
                variable to the subroutine, which you test for and discard if found.


                Abair
              • junja
                thanks hrs
                Message 7 of 9 , Apr 12, 2006
                • 0 Attachment
                  thanks hrs

                  hsavage wrote:
                  > junja wrote:
                  > > hsavage wrote:
                  > >>> junja wrote:
                  > >>>> If I've understood right, the syntaxes for passing:
                  > >>>> - an empty parameter (to a command) is ""
                  > >>>> - optional parameters (in the help file) is []
                  > >>>
                  > >>> John,
                  > >>
                  > >> In the previous response I neglected to address the 'empty ""
                  > >> parameter'.
                  > >>
                  > >> ^%EMPTY% = empty string
                  > >>
                  > >> ºvº
                  > >
                  > > Okay, but it would be nice if the example in the doc was
                  > > definitive.
                  > > Does ntb accept "" for an empty parameter?
                  > > junja
                  >
                  > John,
                  >
                  > Yes, "" will suffice for ^%empty% in most cases I can think of if an
                  > empty parameter is required.
                  >
                  > To trim blanks in a document without setting the menu option one could
                  > use a clip, as below. Added to a Personal Clipbar this clip, as is,
                  > trims the whole document but could be modified to trim a preselected
                  > portion.
                  >
                  > <>·······Start Clip·······<>
                  > H="Bla-Trim-nks"
                  > ;_ Modified-Updated~Created_20060410
                  > ;_ hrs ø hsavage·pobox·com_08:45:33a
                  > ^!SetScreenUpdate 0
                  > ^!Set %view%=^$GetRowTop$
                  > ^!Set %rowcol%=^$GetRow$:^$GetCol$
                  > ^!Select ALL
                  > ^!Menu Modify/Lines/Trim Blanks
                  > ^!SetView ^%view%:1
                  > ^!Select 0
                  > ^!SetCursor ^%rowcol%
                  > <>········End Clip········<>
                  >
                  > ºvº
                  > 06.04.10_07.31
                  > "Cooking III; How Not to Inflict Your Diets on Other People."
                  > hrs ø hsavage@...
                  >
                  >
                  >
                  >
                  >
                  > Fookes Software: http://www.fookes.us, http://www.fookes.com
                  > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                  >
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                • junja
                  Thanks Abair
                  Message 8 of 9 , Apr 12, 2006
                  • 0 Attachment
                    Thanks Abair


                    abairheart wrote:
                    > --- In ntb-clips@yahoogroups.com, junja <junja@...> wrote:
                    >>
                    >> Which is fine if that's what you want systematically - but I
                    >> want it only for clip programming. I didn't want to say
                    >> this out loud but these two points are, it seems to me,
                    >> weaknesses which can trip up the innocent. One in the doc,
                    >> the other in the program.
                    >
                    > Actually, NoteTab's help is way better than most other software. Give
                    > the problems with NoteTab help, what does that say about other
                    > software?!
                    >
                    > The way to deal with ambiguities is to try them out several ways.
                    >
                    > Try for example:
                    >
                    > ^!SaveValue test="data"
                    > ^!Info ^$GetValue(test)$
                    >
                    > and
                    >
                    > ^!Set %test%="data"
                    > ^!Info ^%test%
                    >
                    > The above should illustrate one of the problems with NoteTab's quote
                    > handling.
                    >
                    > Passing an empty argument to a command can be done with or without
                    > quotes.
                    >
                    > If you are looking for ways to test for an empty argument, and run
                    > into the "^&" interpretation problem, then consider passing a dummy
                    > variable to the subroutine, which you test for and discard if found.
                    >
                    >
                    > Abair
                    >
                    >
                    >
                    >
                    >
                    > Fookes Software: http://www.fookes.us, http://www.fookes.com
                    > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.