Jump to content

Auto copy to clipboard


Recommended Posts

Good day,

I would like to make a utility which automatically copies selected text to clipboard, however I couldn't find any functions in Autoit to implement this. Any suggestions?

There is a way to do this in AutoIt. You might use the WinActive function to get the active window; you could even use another available function to get the handle to the active control within that window. Finally, you could use the Send function to execute a ^C copy operation, or use the ClipPut function to put given text onto the clipboard; so there are numerous ways to accomplish what you have vaguely described.

Das Häschen benutzt Radar.

Link to comment
Share on other sites

Thanks for your answer. Yes, I know this, however could you suggest a method how to detect when text is selected(in all windows and applications). Sorry for my English :)

If you really mean "in all applications which have a window", this is possible, but I would surely suggest that you have a good reason for doing this - text could end up being selected in various sorts of controls, edit control, .swf's, maybe even applets and browser windows. Much of this could be done with AutoIt.

Are you monitoring the activity of your children or employees?

_GUICtrlEdit_GetSel works to get the text selected in the passed edit control.

Edited by Squirrely2

Das Häschen benutzt Radar.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...