It is currently September 20th, 2020, 8:03 pm

Clipboard manager plugin

Share and get help with Plugins and Addons
zzeneg
Posts: 7
Joined: October 18th, 2011, 10:07 am

Clipboard manager plugin

Post by zzeneg »

Hey, guys!

I've created Clipboard Manager for Rainmeter about 4.5 years ago (oh my, I can't believe it). Now I think it's the time to get rid of these two crappy utilities and create normal Rainmeter plugin.

Overview
This plugin helps to work with clipboard - saving it's history and restoring items from history. All types of copied items are supported as it just basically saving all data properties. The amount of stored items is unlimited, but they are lost after restart.

Image
Oh yes I'm still using this skin, for 5 years now - thanks @poiru :)

Usage
First of all you need to download the correct version of the plugin from this post (or compile it from sources) and copy it to the "Rainmeter/Plugins" folder.

To setup a skin you just need to create as many measures as you want for storing history and then show this measures as strings.
There are no settings at all, but plugin supports two bangs - "Set" and "Delete". First one puts item from history to clipboard, second deletes it.

Code: Select all

[line1]
Measure=Plugin
Plugin=PluginClipboard.dll

Code: Select all

[Left1]
Meter=STRING
MeasureName=line1
Text="%1"
LeftMouseDownAction=!CommandMeasure "line1" "Set"
RightMouseDownAction=!CommandMeasure "line1" "Delete"
You can also check skin sample:

Code: Select all

    [Rainmeter]
    Update=1000

    [sLeft]
    Y=18r
    H=18
    W=200
    ClipString=1
    AntiAlias=1

    [line1]
    Measure=Plugin
    Plugin=PluginClipboard.dll

    [line2]
    Measure=Plugin
    Plugin=PluginClipboard.dll

    [line3]
    Measure=Plugin
    Plugin=PluginClipboard.dll

    [Left1]
    Meter=STRING
    MeterStyle=sLeft
    MeasureName=line1
    Text="%1"
    LeftMouseDownAction=!CommandMeasure "line1" "Set"
    RightMouseDownAction=!CommandMeasure "line1" "Delete"

    [Left2]
    Meter=STRING
    MeterStyle=sLeft
    MeasureName=line2
    Text="%1"
    LeftMouseDownAction=!CommandMeasure "line2" "Set"
    RightMouseDownAction=!CommandMeasure "line2" "Delete"

    [Left3]
    Meter=STRING
    MeterStyle=sLeft
    MeasureName=line3
    Text="%1"
    LeftMouseDownAction=!CommandMeasure "line3" "Set"
    RightMouseDownAction=!CommandMeasure "line3" "Delete"

Details
There are three convertors in the plugin which handle how different types are showing in the interface. Now it supports text, image and files/folders and I believe all types can be converted to one of these (at least I couldn't find other examples). In case of unsupported type the data will be rendered as a timestamp. If it's happening very often in your apps, you can add new converter in the source code (or just ping me and I'll do it).

Source code is available on Github inside my fork. It's pretty ready for pull request to the main repository but I'm not sure Rainmeter team wants it :)
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 11369
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Clipboard manager plugin

Post by balala »

This is, I think, a pretty interesting plugin. The most useful property of it seems to be the possibility to paste an older string/file from the clipboard.
Congratulations and keep working on it!
User avatar
Virginityrocks
Posts: 510
Joined: February 26th, 2011, 10:22 pm

Re: Clipboard manager plugin

Post by Virginityrocks »

A couple of things like being able to count the number of items on the clipboard, or substitute a blank clip with a string would be nice.
User avatar
jsmorley
Developer
Posts: 21372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Clipboard manager plugin

Post by jsmorley »

zzeneg,

This needs to be turned into a .rmskin so a normal user can install it.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clipboard manager plugin

Post by eclectic-tech »

OP hasn't been around for almost a year, so I rewrote the demo skin, made some changes to make it more useable, and included the dll's in the @Resources folder ( x32 & x64 for redistribution).

DA Site Download
Last edited by eclectic-tech on May 15th, 2018, 8:01 pm, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clipboard manager plugin

Post by eclectic-tech »

[Update 11/2016]
My original demo was not the prettiest thing (too dark and minimal features),
so I did an update for this cool plugin by zzeneg that is 'lighter' and with more features...
cb+.png
Manage your Clips with ClipBoard+

Lists all your recent clip types for quick access:
+ Text Clips
+ Image Clips
+ File Clips
+ Folder Clips

Features:
- Scale to any size
- Display Auto-Expands to show all available Clips (Large clips will display first 5 lines of clip)
- Set Active Clip (Moves to top and is highlighted in green)
- Delete Old Clips (Any unselected clip)
- Hide/Show the Clips List (left-click Title)
- Toggle Skin as TopMost Position (Middle-click Title)

Also available from my DA site
You do not have the required permissions to view the files attached to this post.
Last edited by eclectic-tech on May 15th, 2018, 7:59 pm, edited 1 time in total.
User avatar
LGP123
Posts: 60
Joined: November 5th, 2016, 12:15 pm

Re: Clipboard manager plugin

Post by LGP123 »

Is there a ways to stop the plugin (measure) of updating the value/ to store the value.
Thanks
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clipboard manager plugin

Post by eclectic-tech »

LGP123 wrote:Is there a ways to stop the plugin (measure) of updating the value/ to store the value.
Thanks
Not sure what you need... it saves the last 15 copied items (as long as the skin is active). :???:

It would be possible to use the !WriteKeyValue bang in an OnChangeAction of any measure to write the value to an external file, but then those values would have to be managed and somehow added when wanted. :x
User avatar
LGP123
Posts: 60
Joined: November 5th, 2016, 12:15 pm

Re: Clipboard manager plugin

Post by LGP123 »

But if the stored item is an image (with printscreen), it won't restore the correct data isn't it ?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clipboard manager plugin

Post by eclectic-tech »

LGP123 wrote:But if the stored item is an image (with printscreen), it won't restore the correct data isn't it ?
You are right, that would only work for text...
I still don't understand what you hope to achieve by a "save" in relation to this plugin; if I want to save a certain clip, I would save it in the program I use it in. :confused: