It is currently March 28th, 2024, 10:41 pm

Copy Text from Screen / Window

Get help with creating, editing & fixing problems with skins
nyuga
Posts: 1
Joined: October 18th, 2017, 12:54 pm

Copy Text from Screen / Window

Post by nyuga »

Hi,

I'm currently working on a Click-Search-Skin. I want to klick on a word in a window / on the screen an get information from the web, like wikipedia etc.

But now I have the problem that I don't know how to get the text from a window / the screen to a the webparser or to the clipboard. Currently I can search for Strings fromthe clipboard. But how to get text to the clipboard by clicking on them?

I read about the WindowMessagePlugin and sending commands to a window. But how do I use it?

Thanks for your help
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Copy Text from Screen / Window

Post by jsmorley »

You have to select the text you want in whatever application you are getting it from, and right-click and say "copy" or use CTRL-C. There is no magic way to get a string you just click on in an application to the clipboard. You have to copy it there. If you think about it, one of the primary purposes of the clipboard is to copy some text, then highlight some other test and "replace it" by pasting the clipboard contents. Anything that reacted to just clicking on some text by sticking it in the clipboard would defeat the entire purpose.

Then if you are running this skin from user eclectic-tech:

https://forum.rainmeter.net/viewtopic.php?p=128900#p128900

You can see the last 15 items you put in the clipboard.

This skin more or less "demonstrates" how the Clipboard plugin from user zzeneg works, you can of course just use the plugin in your own skin(s) to view and use the contents of the clipboard.

The !SetClip bang in Rainmeter can be used to add things from Rainmeter itself to the clipboard.