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

where does the input come from for functions?

Expand Messages
  • Rob
    I do not understand this or other functions. If command accepts input, where is the input supposed to come from? I want the input to be the highlighted text
    Message 1 of 3 , Dec 8, 2000
      I do not understand this or other functions.

      If "command" accepts input, where is the input supposed to come from?
      I want the input to be the highlighted text in a document. Can I do
      that?

      What if command takes command line paramemters? Is there any way to
      get these from the document?

      ^$GetInputOutput("Command")$
    • Craig
      ... from? ... Mornin - In the case above, Command is replaced by some command of your choice, not the literal string command . For example, H=Test GetOutput
      Message 2 of 3 , Dec 11, 2000
        --- In ntb-clips@egroups.com, "Rob " <rdarroug@c...> wrote:
        > I do not understand this or other functions.
        >
        > If "command" accepts input, where is the input supposed to come
        from?
        > I want the input to be the highlighted text in a document. Can I do
        > that?
        >
        > What if command takes command line paramemters? Is there any way to
        > get these from the document?
        >
        > ^$GetInputOutput("Command")$

        Mornin'-

        In the case above, "Command" is replaced by some command of your
        choice, not the literal string "command". For example,

        H=Test GetOutput
        ^$GetOutput("perl -v")$

        Will put information about the current version of Perl on my machine
        into the current document.

        or,

        H=Test GetOutput
        ^$GetOutput(cmd.exe /c ^?[Command])$

        will prompt me for a command. If I enter "set", for example, I will
        get the list of environment variables. The point is, where you see
        something like "command" in a Help File explanation, that is where you
        , (the programmer) put your stuff.

        By the way, these are examples of commands, not functions :-)
        You want to spend some time in the "Clip Programming" section of Help.
      • Craig
        ... from? ... Mornin again - I belatedly saw that that I didn t address the specific command you cited... H=Test GetInputOutput2 ^$GetInputOutput(cmd.exe)$
        Message 3 of 3 , Dec 11, 2000
          --- In ntb-clips@egroups.com, "Rob " <rdarroug@c...> wrote:
          > I do not understand this or other functions.
          >
          > If "command" accepts input, where is the input supposed to come
          from?
          > I want the input to be the highlighted text in a document. Can I do
          > that?
          >
          > What if command takes command line paramemters? Is there any way to
          > get these from the document?
          >
          > ^$GetInputOutput("Command")$

          Mornin' again -

          I belatedly saw that that I didn't address the specific command you
          cited...

          H=Test GetInputOutput2
          ^$GetInputOutput(cmd.exe)$

          fires up the command interpreter (in NT; on Windows9x it will be
          command.com). If I select the following text "time /t", it will be
          replaced by:

          Microsoft(R) Windows NT(TM)
          (C) Copyright 1985-1996 Microsoft Corp.

          D:\TMP>time /t
          8:46a

          D:\TMP>

          which is the console output. Selected text is put into the Stdin
          stream, and Stdout appears in the current document.

          HTH,
          Craig
        Your message has been successfully submitted and would be delivered to recipients shortly.