Sign in to follow this  
Followers 0
StandardUser

Auto copy to clipboard

5 posts in this topic

#1 ·  Posted (edited)

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?

Edited by 871

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

Take a look here maybe help you.


When the words fail... music speaks

Share this post


Link to post
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
Sign in to follow this  
Followers 0