It is currently September 16th, 2024, 9:06 am
Paste from clipboard?
-
- Posts: 307
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Paste from clipboard?
Just a quick question, is there a way to paste what's in the clipboard? Like, using !SetClip and then pasting that on another part of the skin. I want to use this to paste colors not using InputText.
-
- Rainmeter Sage
- Posts: 16544
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Paste from clipboard?
The classic way? Like clicking where you want to paste the content of clipboard and hitting Ctrl - V.
-
- Posts: 307
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Re: Paste from clipboard?
I mean, to use it to set a variable, something like [!SetVariable Color $Clipboard$]. Or an Option, like [!SetOption meter fontcolor $Clipboard$]
-
- Posts: 1383
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Paste from clipboard?
the !SEtClip bang is usually for that, but I am guessing that is too simple. The setclip is flexible like any Bang, but it would rely on either a variable that is already set or to use the inputtext feature with the setrclip in fron=t. like this: !SetClip $TypedText$ or a set from a variable such as like this; !SetClip "Test"
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Posts: 307
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Re: Paste from clipboard?
Yah I know, but !SetClip is to copy to the clipboard, I need to paste what's in the clipboard to use it in a bang. Like on a color selector you can usually copy the color that you selected, but, I want a way to insert a color into the selector without using InputText because that requires Click - Ctrl+V - Enter. A one click solution would be great.CodeCode wrote: ↑March 1st, 2024, 4:40 pm the !SEtClip bang is usually for that, but I am guessing that is too simple. The setclip is flexible like any Bang, but it would rely on either a variable that is already set or to use the inputtext feature with the setrclip in fron=t. like this: !SetClip $TypedText$ or a set from a variable such as like this; !SetClip "Test"
-
- Posts: 1383
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Paste from clipboard?
You could use whatever you are getting the vlaue with, in conjunction with a lerftmouseupaction that's purpose is to past a variable in there. Something (not exactly) Setvariable into the value. that idea might also require !WriteKeyValue to have it happen as soon as the variablee is changed/updated. OnCHangeaction or onUpdateAction as the modus.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 5516
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Paste from clipboard?
The Clipboard plugin may help you. After !SetClip the value of this measure will be the most recent clipboard item.
Code: Select all
[MeasureClip]
Measure=Plugin
Plugin=PluginClipboard
DynamicVariables=1
Easiest way to get the Clipboard plugin is from SilverAzide's Gadget patch.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 16544
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Paste from clipboard?
Oh, sorry, I misunderstood you, but now I see what you need. Actually there is a way to achieve what you want. You have to use a RunCommand measure, to get assigned the content of the clipboard as a variable.
If you want to try this out, add the following measure to your code:
Code: Select all
[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=get-clipboard
OutputType=ANSI
OnChangeAction=[!SetVariable Variable "[MeasureRun]"]
State=Hide
Now to execute the measure, use for instance a mouse action like this one: LeftMouseUpAction=[!CommandMeasure "MeasureRun" "Run"]. If you add this option to a meter, you get the content of the clipboard assigned to the Variable variable, when you click the meter.
-
- Posts: 307
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Re: Paste from clipboard?
This is exactly what I'm looking for. Thank you E-T.eclectic-tech wrote: ↑March 1st, 2024, 5:00 pm The Clipboard plugin may help you. After !SetClip the value of this measure will be the most recent clipboard item.You can !SetVariable Color [MeasureClip] or !SetOption meter FontColor [MeasureClip]Code: Select all
[MeasureClip] Measure=Plugin Plugin=PluginClipboard DynamicVariables=1
Easiest way to get the Clipboard plugin is from SilverAzide's Gadget patch.
-
- Posts: 307
- Joined: December 28th, 2022, 9:30 pm
- Location: México
Re: Paste from clipboard?
Thanks Balala! I'll also try this method.balala wrote: ↑March 1st, 2024, 5:04 pm Oh, sorry, I misunderstood you, but now I see what you need. Actually there is a way to achieve what you want. You have to use a RunCommand measure, to get assigned the content of the clipboard as a variable.
If you want to try this out, add the following measure to your code:When executing this measure, you get the content of the clipboard pasted into the Variable variable.Code: Select all
[MeasureRun] Measure=Plugin Plugin=RunCommand Program=PowerShell Parameter=get-clipboard OutputType=ANSI OnChangeAction=[!SetVariable Variable "[MeasureRun]"] State=Hide
Now to execute the measure, use for instance a mouse action like this one: LeftMouseUpAction=[!CommandMeasure "MeasureRun" "Run"]. If you add this option to a meter, you get the content of the clipboard assigned to the Variable variable, when you click the meter.