It is currently May 6th, 2024, 12:16 pm

Clipboard plugin request.

Share and get help with Plugins and Addons
User avatar
SilverAzide
Rainmeter Sage
Posts: 2618
Joined: March 23rd, 2015, 5:26 pm

Re: Clipboard plugin request.

Post by SilverAzide »

Yes, the Win32 API is pretty extensive. It can hold all sorts of data types and can tell which is which. It even seems to know the difference between "c:\test.txt" (a file) and "c:\test.txt" (a string of text). I'm not sure how the Windows clipboard history is implemented, but if you can tap into that, there's no need to keep the data in the plugin's memory.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 7205
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Clipboard plugin request.

Post by Yincognito »

Brian wrote: April 25th, 2024, 8:13 pmMy thoughts on a newer version....
[...]
Anybody have any other wants?
This is entirely optional and might not be really needed or consistent with the type of data (strings and numbers) Rainmeter works with, of course, but since it's kind of related, not sure if the !SetClip bang could / should be adjusted for a seamless complementarity (i.e. get vs set) with the potential update of your clipboard plugin. I'm thinking about maybe an ability to set the clipboard to more than just strings (e.g. media or path to media and so on), or an ability to set a certain clipboard item instead of the last one (I have no idea how Windows works in that regard, so if always setting the last clipboard item is how Windows works, then it would make no sense to even consider this in Rainmeter). I only mention this given the "recent" Windows versions' ability to work with multiple and more varied clipboard items, which I don't know if it existed at the time of the initial writing of the plugin. Again, it's just an idea to think of, by no means a "request" or something like that - at least not from me at this time. Might be useful in general though. :)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Clipboard plugin request.

Post by Brian »

SilverAzide wrote: April 26th, 2024, 12:12 pm Yes, the Win32 API is pretty extensive. It can hold all sorts of data types and can tell which is which. It even seems to know the difference between "c:\test.txt" (a file) and "c:\test.txt" (a string of text). I'm not sure how the Windows clipboard history is implemented, but if you can tap into that, there's no need to keep the data in the plugin's memory.
I am not sure you can get the clipboard history from Windows, but I do know that the user can manually turn off the clipboard history.
Yincognito wrote: April 26th, 2024, 12:43 pm This is entirely optional and might not be really needed or consistent with the type of data (strings and numbers) Rainmeter works with, of course, but since it's kind of related, not sure if the !SetClip bang could / should be adjusted for a seamless complementarity (i.e. get vs set) with the potential update of your clipboard plugin. I'm thinking about maybe an ability to set the clipboard to more than just strings (e.g. media or path to media and so on), or an ability to set a certain clipboard item instead of the last one (I have no idea how Windows works in that regard, so if always setting the last clipboard item is how Windows works, then it would make no sense to even consider this in Rainmeter). I only mention this given the "recent" Windows versions' ability to work with multiple and more varied clipboard items, which I don't know if it existed at the time of the initial writing of the plugin. Again, it's just an idea to think of, by no means a "request" or something like that - at least not from me at this time. Might be useful in general though. :)
To be honest, I am not sure how useful this would be. Rainmeter deals with strings and numbers (both text as far as the clipboard is concerned). I guess the ability to copy the visual parts of the skin (as an image) to the clipboard could be useful. I guess you could copy a file or something....but I am not seeing any more usefulness than that.

-Brian
User avatar
Yincognito
Rainmeter Sage
Posts: 7205
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Clipboard plugin request.

Post by Yincognito »

Brian wrote: April 26th, 2024, 5:14 pmTo be honest, I am not sure how useful this would be. Rainmeter deals with strings and numbers (both text as far as the clipboard is concerned). I guess the ability to copy the visual parts of the skin (as an image) to the clipboard could be useful. I guess you could copy a file or something....but I am not seeing any more usefulness than that.
Yeah, what I meant is that currently (and as per your upgrade thoughts), your plugin would have the ability to "get" almost anything from the clipboard, potentially even saving the result to a file (that's the paste part from a copy-paste process). Meanwhile, the !SetClip bang, even though technically everything is a string, has a limited ability to "set" the clipboard to something, e.g. you can't copy an image unless you pass, say, a local WebParser result to !SetClip as a string (that's the copy part from a copy-paste process). My thought was simply reducing / eliminating the discrepancy between the abilities of your plugin and those of !SetClip as part of such a process, that's all. Whether this is useful or worth trying in a Rainmeter context is up to you, I was just laying it out as an afterthought, mostly. :D
Off topic, but mentioning the ability to copy visual parts of the skin as an image reminded me of one of my objectives: make my Screen Ruler skin able to screenshot (preferably as animated GIF too) what's behind the skin, without resorting to 3rd party software like ImageMagick or NirCMD. I found some methods via PowerShell, but it involves embedding some C# code too. That would be a handy plugin to have, especially for illustrating short skin demos - might be a good starting point in Rainmeter plugin making for me, if I'll ever pursue that path.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth