Results 1 to 7 of 7
  1. #1
    anshulkatta is offline Member
    Join Date
    Oct 2011
    Posts
    5
    Rep Power
    0

    Default How to capture copy event in windows

    Dear hackers of java,

    i want to capture copy paste event through java , but the copy paste event in no tin java gui , its from windows

    that means you press crtl + c or v and then java listens to this shortcut and process on it , first before processing i need to capture it

    is there any method possible , from my perspective its like capturing event out of jvm because java uses virtual machine and out of virtual machine it can not access the machine , so i though it might be impossible

    so please share a method of making this possible if this can be done

    thanks i advance
    anshul katta

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: How to capture copy event in windows

    You can poll the system clipboard, if that serves your purpose.

    What do you need this for? There may be an easier or better approach to the problem.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    anshulkatta is offline Member
    Join Date
    Oct 2011
    Posts
    5
    Rep Power
    0

    Default Re: How to capture copy event in windows

    Quote Originally Posted by DarrylBurke View Post
    You can poll the system clipboard, if that serves your purpose.

    What do you need this for? There may be an easier or better approach to the problem.

    db
    sir , you didnt understand my problem...let say you are working on windows and text editor where you copy and paste but instead of
    pasting in text editor or whatever , the copied text must be listened into a java program which will be running aside...

    and what the hell poll the system clipboard means....."is that means copying from clipboard"

    regards
    Anshul Katta

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default Re: How to capture copy event in windows

    Java doesn't really do "listening in" on other applications, especially OS related stuff.
    Darryl is simply suggesting your only option might be to get Java to check the clipboard every so often ("poll" it) to see if there's anything in there.
    No guarantee that'll do what you want, as you haven't actually told us what you want to achieve. That is, why this requirement exists.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: How to capture copy event in windows

    Quote Originally Posted by anshulkatta View Post
    and what the hell poll the system clipboard means....."is that means copying from clipboard"
    You could have asked the question without being rude about it.

    The whole requirement looks like spyware anyhow. Java isn't suited to that.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  6. #6
    anshulkatta is offline Member
    Join Date
    Oct 2011
    Posts
    5
    Rep Power
    0

    Default Re: How to capture copy event in windows

    Quote Originally Posted by Tolls View Post
    Java doesn't really do "listening in" on other applications, especially OS related stuff.
    Darryl is simply suggesting your only option might be to get Java to check the clipboard every so often ("poll" it) to see if there's anything in there.
    No guarantee that'll do what you want, as you haven't actually told us what you want to achieve. That is, why this requirement exists.
    Ok , sir

    you are right , JVM do not allow to peep out of it and touch OS , well the main requirements is i want to develop a software which can intercept copy paste shortcut which we do oftentimes and creates a copy of it in stack , its because everytime we copy something , the before copy is overwritten with new...so i want to develop a tool to keep track of the text copies , the tool goes by the name "Copy Log"

    think like IDM pops out download this video in browser , its alive in the tray of windows , kind of that software

    please tell me how i can develop this , in any other language it is possible , i will learn , i know Java , c

    thank you
    Anshul katta

  7. #7
    anshulkatta is offline Member
    Join Date
    Oct 2011
    Posts
    5
    Rep Power
    0

    Default Re: How to capture copy event in windows

    hey sir i dont meant that way , i am nice and i know time wounds all heeels....:)

Similar Threads

  1. Replies: 13
    Last Post: 07-20-2012, 07:58 PM
  2. Capture
    By PhQ in forum New To Java
    Replies: 7
    Last Post: 10-17-2010, 05:26 PM
  3. How to capture Windows Active User
    By chyrl in forum Advanced Java
    Replies: 4
    Last Post: 06-11-2010, 09:21 AM
  4. checking for an event during an event
    By infinity in forum AWT / Swing
    Replies: 22
    Last Post: 04-09-2009, 01:08 AM
  5. Replies: 1
    Last Post: 06-23-2008, 06:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •