Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: Reading contents of another window

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Reading contents of another window

    Is it possible to read the text contents of another program's window? In C one can use hwnd handle to manage a window, does Java offer any similar support?


  2. #2
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: Reading contents of another window

    No, you can't write spyware in Java.

    db

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Reading contents of another window

    Quote Originally Posted by Darryl.Burke View Post
    No, you can't write spyware in Java.

    db
    Who said anything about spyware? I just it need for a monitoring tool.

    So this isn't possible in java?

  4. #4
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: Reading contents of another window

    Any access to a program in a way that it wasn't designed for and for which it doesn't expose a public API qualifies as spyware. Many monitoring tools are in fact spyware.

    And regardless of what name you give it, you can't write spyware in Java. At least, not without going through the extremely complicated and roundabout -- and unreliable -- route of screen captures and OCR. And before you ask, no, there isn't an open source Java OCR implementation I know of.

    db

  5. #5
    Junior Member
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Reading contents of another window

    Okay.
    I'll ask something else then. Is there a way to monitor system calls? More specifically can I know which files a program is using at a certain time? (by monitoring the read call)

  6. #6
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: Reading contents of another window

    Spammer WPThomas reported.

    db

  7. #7
    Junior Member
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Reading contents of another window

    Quote Originally Posted by Darryl.Burke View Post
    Spammer WPThomas reported.

    db
    Was I supposed to understand something from this?

  8. #8
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Reading contents of another window

    Was I supposed to understand something from this?
    No. A spammer tried to highjack your post. Darryl.Burke reported him/her and their post was deleted.

  9. #9
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: Reading contents of another window

    Yup. Would be nice if they deleted the post reporting spam at the same time (that's what they do over at the Oracle forums)

    And thanks to the Admins for deleting the spam!

    db

Similar Threads

  1. How to create a sorted set from the contents of an array
    By davie in forum Collections and Generics
    Replies: 1
    Last Post: March 11th, 2010, 03:44 PM
  2. cmd.exe DOS Window
    By Curious in forum File I/O & Other I/O Streams
    Replies: 4
    Last Post: March 1st, 2010, 10:30 AM
  3. How to read from all files in a directory & plot the contents?
    By 123 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: February 11th, 2010, 12:43 PM
  4. Convert contents of JTextArea / JEditorPane to PDF
    By rangarajank in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: September 30th, 2009, 02:38 PM
  5. Navigating from one window to another
    By visharaddhavle83 in forum AWT / Java Swing
    Replies: 2
    Last Post: August 6th, 2009, 07:55 AM