It is currently April 19th, 2024, 12:56 pm

Process plugin not working in one skin

Get help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Process plugin not working in one skin

Post by sl23 »

Arghh! Not another issue! :?

Ok well, I copy/pasted some code from one skin to another. Which I believe is self contained to measure for a process, VLC in this case, then hide meters if that process is running.

The weird thing is that it works in other skins but not the new launcher I made. :???:

Code: Select all

========================================
; VLC
========================================
[mProcessVLC]
Measure=Plugin
Plugin=Process
ProcessName=VLC.exe
IfCondition=mProcessVLC=1
IfTrueAction=[!HideMeterGroup VLC] [!UpdateMeterGroup *] [!Redraw]
IfFalseAction=[!ShowMeterGroup VLC] [!UpdateMeterGroup *] [!Redraw]
DynamicVariables=1
Is this an instance that requires Dynamic Variables=1 btw? Or is it unnecessary?
Last edited by sl23 on August 16th, 2019, 4:21 pm, edited 1 time in total.
- MuLab -
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Process plugin not working in one skin

Post by jsmorley »

sl23 wrote: August 9th, 2019, 5:45 pm Arghh! Not another issue! :?

Ok well, I copy/pasted some code from one skin to another. Which I believe is self contained to measure for a process, VLC in this case, then hide meters if that process is running.

The weird thing is that it works in other skins but not the new launcher I made. :???:

Code: Select all

========================================
; VLC
========================================
[mProcessVLC]
Measure=Plugin
Plugin=Process
ProcessName=VLC.exe
IfCondition=mProcessVLC=1
IfTrueAction=[!HideMeterGroup VLC] [!UpdateMeterGroup *] [!Redraw]
IfFalseAction=[!ShowMeterGroup VLC] [!UpdateMeterGroup *] [!Redraw]
DynamicVariables=1
Is this an instance that requires Dynamic Variables=1 btw? Or is it unnecessary?
No, DynamicVariables is not needed. Be sure you have Group=VLC on the meters you want to be shown/hidden/updated. Also, you can't use the * wildcard on any Group bang, like !UpdateMeterGroup. The group name must always be specified. There is no such concept as "all groups".
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Process plugin not working in one skin

Post by sl23 »

Thanks for the advice.
I have Group=VLC in the Style part of the skin:

Code: Select all

========================================
; STYLES
========================================

[sStroke]
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color 128,255,0,255"][!ShowMeter #CURRENTSECTION#Name][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""][!HideMeter #CURRENTSECTION#Name][!UpdateMeter *][!Redraw]
Shape=Rectangle 0,0,24,24,50 | Fill Color 100,100,100 | StrokeWidth 3 | Extend StrokeAlpha
StrokeAlpha=Stroke Color 128,255,0,0
DynamicVariables=1
Group=VLC
X=-2
Y=30r

[sName]
FontFace=Corbel
StringStyle=Bold
FontSize=12
FontColor=100,100,100
AntiAlias=1
Hidden=1
DynamicVariables=1
X=10R
Y=1r

========================================
; APP 1
========================================

[BG1]
Meter=Shape
MeterStyle=sStroke
DynamicVariables=1
LeftMouseUpAction=["#PROGRAMPATH#..\..\MyApps\WaterfoxPortable\WaterfoxPortable.exe"]

[BG1Name]
Meter=STRING
MeterStyle=sName
Text=Waterfox
X=10R
I already tried it on the Meter itself and still didn't work!
What did work in a screwed up way was when I changed the [sName] Hidden=0 then hovered over all the launchers, this hid the names on MouseLeave then the BG#'s hid too??? The odd thing is that they slid to the left, which is offscreen. Can't repeat it now though.
In another skin, that's how I did it and it works ok:

Code: Select all

========================================
; STYLES
========================================
[sText]
StringAlign=Left
FontFace=Corbel
StringStyle=Bold
FontSize=10
FontColor=0,255,255,150
AntiAlias=1
ClipString=2
DynamicVariables=1
Group=VLC
Ha all this time I've using that * thinking it updated the groups! Think I saw it used for meters or something years ago so thought it worked for groups too. Oh well. Seems to work ok but I'll try removing that part if it's actually doing nothing!
- MuLab -
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Process plugin not working in one skin

Post by jsmorley »

I don't know, I can only tell you that this works...

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[mProcessVLC]
Measure=Plugin
Plugin=Process
ProcessName=VLC.exe
IfCondition=mProcessVLC=1
IfTrueAction=[!HideMeterGroup VLC][!UpdateMeterGroup VLC][!Redraw]
IfFalseAction=[!ShowMeterGroup VLC][!UpdateMeterGroup VLC][!Redraw]

[MeterOne]
Meter=String
Group=VLC
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Meter One

[MeterTwo]
Meter=String
Group=VLC
Y=30r
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Meter Two
And this works...

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[myStyle]
Group=VLC

[mProcessVLC]
Measure=Plugin
Plugin=Process
ProcessName=VLC.exe
IfCondition=mProcessVLC=1
IfTrueAction=[!HideMeterGroup VLC][!UpdateMeterGroup VLC][!Redraw]
IfFalseAction=[!ShowMeterGroup VLC][!UpdateMeterGroup VLC][!Redraw]

[MeterOne]
Meter=String
MeterStyle=myStyle
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Meter One

[MeterTwo]
Meter=String
MeterStyle=myStyle
Y=30r
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Meter Two

If vlc.exe is running, the meters are hidden, if not, they are shown.

Keep in mind that meters are "hidden" by Rainmeter by setting their W and H (width and height) to zero. So if you hide meter(s), and other meters after are positioned relative to them with the "R" modifier, those meters will move.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Process plugin not working in one skin

Post by sl23 »

You don't know! Whadya mean you don't know? That's not good enough! :rofl: ;-)

Ok , I see your code samples, and they work with text only, could it be a shape issue? I am after all trying to hide a shape. I had similar issues when using RoundBars. MouseOver wouldn't work on them even though the code was identical to that used on text meters. So I switched to using Shape meters instead, but now I'm having this issue. :confused:
- MuLab -
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Process plugin not working in one skin

Post by jsmorley »

Nope, Shape works fine.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[mProcessVLC]
Measure=Plugin
Plugin=Process
ProcessName=VLC.exe
IfCondition=mProcessVLC=1
IfTrueAction=[!HideMeterGroup VLC][!UpdateMeterGroup VLC][!Redraw]
IfFalseAction=[!ShowMeterGroup VLC][!UpdateMeterGroup VLC][!Redraw]

[MeterOne]
Meter=Shape
Group=VLC
Shape=Rectangle 2,2,150,100

[MeterTwo]
Meter=Shape
Group=VLC
Y=110r
Shape=Rectangle 2,2,150,100
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Process plugin not working in one skin

Post by sl23 »

jsmorley wrote: August 9th, 2019, 7:23 pm Keep in mind that meters are "hidden" by Rainmeter by setting their W and H (width and height) to zero. So if you hide meter(s), and other meters after are positioned relative to them with the "R" modifier, those meters will move.
Do you mean to say that it always works this way? That's enlightening! Thanks
- MuLab -
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Process plugin not working in one skin

Post by sl23 »

That's weird! How the hell is it not working in my skin then??? He asks rhetorically, hoping for some divine intervention! Failing that, a forum user supplying the solution. :D
- MuLab -
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Process plugin not working in one skin

Post by jsmorley »

Pack up your skin in a .zip file, including any .inc, images or other external files needed to run it, and attach it here.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Process plugin not working in one skin

Post by sl23 »

Thanks. It's ok, I found the problem! I had Update=-1 :?
- MuLab -