It is currently October 26th, 2021, 6:21 pm

Some Plugins Converted to Measures

Release announcements and important news from the developers.
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Some Plugins Converted to Measures

Post by Yincognito »

jsmorley wrote: February 6th, 2018, 5:51 pmIf you use Notepad++, there is a way to do it in one go...
Or, a more comprehensive one go (too bad replacing !PluginBang with !CommandMeasure requires a different approach, than this general form below) ...

Find What : (?i)(?|!Execute (\[)|(!)Rainmeter|Plugin\RPlugin=(?:Plugins\\)?(MediaKey|NowPlaying|RecycleManager|WebParser)(?:\.dll)?)
Replace With : \1
Dummy Test Content:

Code: Select all

[Variables]
SomeVar=SomeFile.dll

[MeasureOne]
Measure=Plugin
Plugin=RunCommand
SomeOption=!execute [!RainmeterHideMeter SomeMeter][!PluginBang SomeMeasure SomeArguments]

[MeasureTwo]
Measure=Plugin
Plugin=MediaKey
SomeOption=SomeValue

[MeasureThree]
Measure=Plugin
Plugin=Plugins\WebParser.dll
SomeOption=SomeValue

[MeasureFour]
Measure=Plugin
Plugin=ActionTimer
SomeOption=SomeValue
Result:

Code: Select all

[Variables]
SomeVar=SomeFile.dll

[MeasureOne]
Measure=Plugin
Plugin=RunCommand
SomeOption=[!HideMeter SomeMeter][!PluginBang SomeMeasure SomeArguments]

[MeasureTwo]
Measure=MediaKey
SomeOption=SomeValue

[MeasureThree]
Measure=WebParser
SomeOption=SomeValue

[MeasureFour]
Measure=Plugin
Plugin=ActionTimer
SomeOption=SomeValue
P.S. Sorry for resurrecting this, but maybe this will be of some use for adjusting very old skins.
User avatar
Jeff
Posts: 232
Joined: September 3rd, 2018, 11:18 am

Re: Some Plugins Converted to Measures

Post by Jeff »

https://github.com/rainmeter/rainmeter/blob/fd109eb7d6c843ae13251225e33d502742614a72/Library/CommandHandler.cpp#L255-L267

It really isn't needed to change how skins are written in the old way since Rainmeter does the job automatically for both !RainmeterShow/!RainmeterPluginBang/!PluginBang and !Execute
It's a thing to do for spring cleaning though
User avatar
Yincognito
Rainmeter Sage
Posts: 4071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Some Plugins Converted to Measures

Post by Yincognito »

Jeff wrote: July 29th, 2021, 11:03 pm https://github.com/rainmeter/rainmeter/blob/fd109eb7d6c843ae13251225e33d502742614a72/Library/CommandHandler.cpp#L255-L267

It really isn't needed to change how skins are written in the old way since Rainmeter does the job automatically for both !RainmeterShow/!RainmeterPluginBang/!PluginBang and !Execute
It's a thing to do for spring cleaning though
For sure. :thumbup: Google Translate automatically translates things from other languages to English too, but most of the times is less confusing and more consistent to have it all following a certain syntax, and that goes for skins as well. Not required, but probably preferable. ;-)