Redirect Standard output to keyboard port

Discussion in 'Java' started by JimWilh, Jun 22, 2005.

  1. JimWilh

    JimWilh Guest

    I have written a Class, that reads from a COM-port. I have a tag-reader
    attached to my COM-port, and I want to write the ID of the readed tag
    into whatever application I want, for example notepad. Not just as an
    output on the running program.

    That means, I will run the "Reading-application" in the background. And
    every time a tag is read, the output goes to the aplication having
    focus. Just like a keyboard. Anyone have an idea.

    I have made the part reading the tags, so it is just the redirection
    that I need help for...

    Jim
     
    JimWilh, Jun 22, 2005
    #1
    1. Advertising

  2. JimWilh wrote:
    > I have written a Class, that reads from a COM-port. I have a tag-reader
    > attached to my COM-port, and I want to write the ID of the readed tag
    > into whatever application I want, for example notepad. Not just as an
    > output on the running program.
    >
    > That means, I will run the "Reading-application" in the background. And
    > every time a tag is read, the output goes to the aplication having
    > focus. Just like a keyboard. Anyone have an idea.


    This is quite platform-specific, so I doubt you can do this in Java
    natively. For example, if you log in to a server via SSH (or remote
    desktop, or some other remote access tools) then you'd probably not want
    the input to come from the "keyboard", but from whatever source the
    "normal" input is coming from.

    For some programs, this might be "standard input", but not for the ones
    interfacing with the "input" in a more low-level way (such as most text
    editors).

    You might want to have a look at JNI and write some platform-dependent code.

    It is probably much easier to generate the output in your program, and
    copy it to the clipboard (or X buffer or whatever). Not exactly what you
    asked for, but maybe that's an alternative.

    Greetings,
    Aaron
     
    Aaron Isotton, Jun 22, 2005
    #2
    1. Advertising

  3. JimWilh

    Lucy Guest

    "JimWilh" <> wrote in message
    news:...
    > I have written a Class, that reads from a COM-port. I have a tag-reader
    > attached to my COM-port, and I want to write the ID of the readed tag
    > into whatever application I want, for example notepad. Not just as an
    > output on the running program.
    >
    > That means, I will run the "Reading-application" in the background. And
    > every time a tag is read, the output goes to the aplication having
    > focus. Just like a keyboard. Anyone have an idea.
    >
    > I have made the part reading the tags, so it is just the redirection
    > that I need help for...
    >
    > Jim
    >

    Try using a pipe.

    java myjavaprogram | someotherprogram
     
    Lucy, Jun 23, 2005
    #3
  4. JimWilh

    JimWilh Guest

    This application will run on Windows XP or Windows 2000. And it doesn't
    matter if it is platform dependent. It should be used to load text into
    an applet. And since the applet can't interact with the local COM-port
    I have to think of other solutions.

    Anyone have an idea?

    Jim
     
    JimWilh, Jun 27, 2005
    #4
  5. Andrew Thompson, Jun 27, 2005
    #5
  6. JimWilh

    JimWilh Guest

    I have tried to use the class from an applet, but my knowledge of
    applets is limited.
    Which libraries does the applet use? Is it the local libraries on the
    client, or th libraries on the server, in which the applet reside?
    Doesn't the applet have limited access to the client?
     
    JimWilh, Jun 29, 2005
    #6
  7. On 29 Jun 2005 05:55:07 -0700, JimWilh wrote:

    > I have tried to use the class from an applet, but my knowledge of
    > applets is limited.
    > Which libraries does the applet use? Is it the local libraries on the
    > client, or th libraries on the server, in which the applet reside?
    > Doesn't the applet have limited access to the client?


    Move this thread (or repost it) over to c.l.j.help and I will continue..

    --
    Andrew Thompson
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.PhySci.org/ Open-source software suite
    http://www.1point1C.org/ Science & Technology
    http://www.LensEscapes.com/ Images that escape the mundane
     
    Andrew Thompson, Jun 29, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean Wolfe
    Replies:
    1
    Views:
    2,260
    Joerg Jooss
    Apr 28, 2005
  2. KC Wong
    Replies:
    0
    Views:
    383
    KC Wong
    Aug 19, 2003
  3. Roedy Green
    Replies:
    0
    Views:
    377
    Roedy Green
    Aug 19, 2003
  4. Sal
    Replies:
    1
    Views:
    530
  5. Venks
    Replies:
    5
    Views:
    242
    Ken Bloom
    Dec 6, 2007
Loading...

Share This Page