What I want to do is this: I want to setup a toggle in 'Skin A' that shows a meter included in 'Skin B', with !ShowMeter Bang. I wanted to know if this possible.
This is what I've tried doing in 'Skin A':
LeftMouseUpAction=[!ShowMeter "[Meter]" "Skin B\Skin B.ini"]
This hasn't worked, though
It is currently April 23rd, 2024, 5:25 pm
Is it possible to use !ShowMeter Bang to show a meter in a different skin
-
- Posts: 22
- Joined: December 14th, 2020, 3:04 am
-
- Rainmeter Sage
- Posts: 2604
- Joined: March 23rd, 2015, 5:26 pm
Re: Is it possible to use !ShowMeter Bang to show a meter in a different skin
Yes, this is possible. The problem is that you did not reference the meter correctly. The name of a section (meter or measure) does not include the square brackets. So just use:
Code: Select all
LeftMouseUpAction=[!ShowMeter "Meter" "Skin B\Skin B.ini"]
-
- Rainmeter Sage
- Posts: 16162
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Is it possible to use !ShowMeter Bang to show a meter in a different skin
Unfortunately this doesn't work this way, because the last parameter has to be the name of the appropriate config, not the name and path of the skin's file. So instead of LeftMouseUpAction=[!ShowMeter "Meter" "Skin B\Skin B.ini"], the option should look like this: LeftMouseUpAction=[!ShowMeter "Meter" "Skin B"], where Skin B is the name of the config (colored green above), not the name of the skin (red above).SilverAzide wrote: ↑January 6th, 2021, 6:32 pmCode: Select all
LeftMouseUpAction=[!ShowMeter "Meter" "Skin B\Skin B.ini"]
Additionally I'd add a !Redraw bang with the same config parameter: LeftMouseUpAction=[!ShowMeter "Meter" "Skin B][!Redraw "Skin B"]
-
- Posts: 22
- Joined: December 14th, 2020, 3:04 am
Re: Is it possible to use !ShowMeter Bang to show a meter in a different skin
balala wrote: ↑January 6th, 2021, 6:48 pm
Unfortunately this doesn't work this way, because the last parameter has to be the name of the appropriate config, not the name and path of the skin's file. So instead of LeftMouseUpAction=[!ShowMeter "Meter" "Skin B\Skin B.ini"], the option should look like this: LeftMouseUpAction=[!ShowMeter "Meter" "Skin B"], where Skin B is the name of the config (colored green above), not the name of the skin (red above).
Additionally I'd add a !Redraw bang with the same config parameter: LeftMouseUpAction=[!ShowMeter "Meter" "Skin B][!Redraw "Skin B"]
Thanks a lot guys It works perfectly after removing the brackets and path of skin.SilverAzide wrote: ↑January 6th, 2021, 6:32 pm Yes, this is possible. The problem is that you did not reference the meter correctly. The name of a section (meter or measure) does not include the square brackets. So just use:
Code: Select all
LeftMouseUpAction=[!ShowMeter "Meter" "Skin B\Skin B.ini"]
I have one more question: I want a skin that allows to switch b/w Light and Dark windows theme. I took some code from 'powerplan switcher' skin of Khanhas's Notch suite: https://github.com/khanhas/Notch
powerplan skin: https://github.com/khanhas/Notch/blob/master/Themes/Notch/Assets/powerPlanSwitcher.ini
It uses PowershellRM plugin.
Code: Select all
[Rainmeter]
Update=1000
[Variables]
@Include=#@#MainBarVariables.inc
PlanZoneStart = 135
[PSRM]
Measure = plugin
Plugin = PowershellRM
ScriptFile = #@#BrightnessPowerPlan.ps1
UpdateDivider = -1
[GetThemeMode]
Measure = Plugin
Plugin = powershellrm
Parent = PSRM
Line = GetThemeMode
; Ancient Windows
IfCondition = GetThemeMode = -1
IfTrueAction = [!HideMeterGroup ThemeMode][!SetVariable PlanZoneStart 85][!UpdateMeter *][!Redraw]
; Dark theme
IfCondition2 = GetThemeMode = 0
IfTrueAction2 = [!SetOption Dark FontColor "#Color_Scheme3#"][!SetOption Light FontColor "#Color_Scheme2#"][!UpdateMeter Dark][!UpdateMeter Light][!Redraw]
; Light theme
IfCondition3 = GetThemeMode = 1
IfTrueAction3 = [!SetOption Light FontColor "#Color_Scheme3#"][!SetOption Dark FontColor "#Color_Scheme2#"][!UpdateMeter Dark][!UpdateMeter Light][!Redraw]
[Mode]
Meter=String
Text=App mode:
FontFace=#Font_Face#
FontColor=#Color_Scheme2#50
FontSize=(#Font_Size#*10/12)
AntiAlias=1
StringAlign=LeftBottom
X=#SubSkinPadding#
Y=30R
Group = ThemeMode
[Light]
Meter = String
Text=Light
FontFace=#Font_Face#
FontWeight=800
FontColor=#Color_Scheme2#
FontSize=#Font_Size#
AntiAlias=1
StringAlign=LeftBottom
Y=r
X=40R
LeftMouseDownAction=[!CommandMeasure PSRM "SetThemeMode 1"][!UpdateMeasure GetThemeMode]
Group = ThemeMode
[Dark]
Meter=String
MeterStyle=Light
Text=Dark
LeftMouseDownAction=[!CommandMeasure PSRM "SetThemeMode 0"][!UpdateMeasure GetThemeMode]