It is currently April 19th, 2024, 9:41 pm

Clearing Clipboard History

Get help with creating, editing & fixing problems with skins
User avatar
tass_co
Posts: 514
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Clearing Clipboard History

Post by tass_co »

Hi everyone,

Me again :D

I have a question.
How can I clear everything on the clipboard with the help of rainmeter?
Do we have a code for this?
Of course without clipboard plugin...
I don't want to add plugin just for this :thumbdown:

PS: please dont say that cmd /c "echo off | clip"
I don't know where i going from here, but i promise it won't be boring... :great:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2604
Joined: March 23rd, 2015, 5:26 pm

Re: Clearing Clipboard History

Post by SilverAzide »

tass_co wrote: May 9th, 2022, 11:57 pm Hi everyone,

Me again :D

I have a question.
How can I clear everything on the clipboard with the help of rainmeter?
Do we have a code for this?
Of course without clipboard plugin...
I don't want to add plugin just for this :thumbdown:

PS: please dont say that cmd /c "echo off | clip"
OK, then:

Code: Select all

powershell.exe -NoProfile -ExecutionPolicy Bypass -NonInteractive -Command "$null | & $env:windir\System32\clip.exe"
or...

Code: Select all

powershell.exe -NoProfile -ExecutionPolicy Bypass -NonInteractive -Command "Set-Clipboard -Value $null"
I didn't say it... and those are your basic choices, plugin or no. (There are probably a few other Powershell tricks, but all accomplish the same thing.)
Gadgets Wiki GitHub More Gadgets...
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Clearing Clipboard History

Post by CodeCode »

Why not this:
LeftMouseUpAction=[!SetClip ""][!Update] It effectively sets the clipboard to empty string, ya?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
tass_co
Posts: 514
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Clearing Clipboard History

Post by tass_co »

SilverAzide wrote: May 10th, 2022, 1:57 am OK, then:

Code: Select all

powershell.exe -NoProfile -ExecutionPolicy Bypass -NonInteractive -Command "$null | & $env:windir\System32\clip.exe"
or...

Code: Select all

powershell.exe -NoProfile -ExecutionPolicy Bypass -NonInteractive -Command "Set-Clipboard -Value $null"
I didn't say it... and those are your basic choices, plugin or no. (There are probably a few other Powershell tricks, but all accomplish the same thing.)
CodeCode wrote: May 10th, 2022, 4:22 am Why not this:
LeftMouseUpAction=[!SetClip ""][!Update] It effectively sets the clipboard to empty string, ya?

Apologize guys. My problem was something different :oops:
I don't know where i going from here, but i promise it won't be boring... :great:
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Clearing Clipboard History

Post by balala »

tass_co wrote: May 10th, 2022, 6:01 am Apologize guys. My problem was something different :oops:
Not sure what your problem is, however your initial idea is perfectly working, through a RunCommand plugin measure (RunCommand, unlike some external plugin manipulating the clipboard, is a built-in plugin and can be used without having to add it):
tass_co wrote: May 9th, 2022, 11:57 pm PS: please dont say that cmd /c "echo off | clip"

Code: Select all

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program=cmd
Parameter=/c "echo off | clip"
State=Hide

[MeterClear]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Clear
LeftMouseUpAction=[!CommandMeasure "MeasureRun" "Run"]
Is there anything wrong with such a solution?
User avatar
tass_co
Posts: 514
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Clearing Clipboard History

Post by tass_co »

balala wrote: May 10th, 2022, 11:25 am Not sure what your problem is, however your initial idea is perfectly working, through a RunCommand plugin measure (RunCommand, unlike some external plugin manipulating the clipboard, is a built-in plugin and can be used without having to add it):

Code: Select all

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program=cmd
Parameter=/c "echo off | clip"
State=Hide

[MeterClear]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Clear
LeftMouseUpAction=[!CommandMeasure "MeasureRun" "Run"]
Is there anything wrong with such a solution?
At first I thought clearing the clipboard would solve my problem but I was wrong :oops:
This was the first way I tried balala.
All of the your codes written are clearing the clipboard :great:
I don't know where i going from here, but i promise it won't be boring... :great: