Hi everyone:
I am building a dictionary(translator) . My dictionary is completed, now I want to add some feature to it. I want to add a feature that once the user highlight a word in any application, afte 2 seconds which the mouse is IDLE my dictionary automatically COPY and PASTE the highlighted word into the dictionary. I know, I have to use MOUSE IDLE API, COPY API( CTRL +C) and PASTE API( CTRL +V). But I don't know how can I do it and what should I study about. I want to pass the key automatically. Do you have any Idea about my Case?

Sincerely

Recommended Answers

All 2 Replies

Spying on other processes is not very trivial. I think Microsoft did this on purpose to make writing malicious code not all that easy to do. I am not overly familiar with the API's you are talking about, but suspect they come from the USER32.dll library. Though I strongly suspect that the idle time is relative to the process that it is being run under (ie idle time in YOUR app, not system wide). There ARE methods of injecting code into other processes to report back to your app via windows messaging, is this the functionality you wish to achieve?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.