It is currently March 29th, 2024, 8:54 am

Process plugin not working in one skin

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
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, 8:35 pm Do you mean to say that it always works this way? That's enlightening! Thanks
Yes. Meters are "hidden" by setting their W and H to zero. Thus they in effect become a singularity, having a "position" (X/Y) in space, but no "size" (W/H).

This is why, when you are considering "hiding" meters based on some event, it is worth considering the effect this will have on your design. It might be better to consider hiding meters by setting their color(s) to use a transparent alpha component. This will make them invisible without altering the size. You might also consider making the meter(s) that follow not use "R" on the X or Y, but hard-coding those values or using "r" instead. There is no right or wrong, different approaches work best for different circumstances.
User avatar
jsmorley
Developer
Posts: 22628
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, 10:09 pm Thanks. It's ok, I found the problem! I had Update=-1 :?


Image
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 »

Yeah that explains why I was getting things moving incorrectly in a skin after hiding loads of stuff! Finally I now know why. I just worked around it by creating [Footer] bars. I didn't understand what the cause was so it was all I could think of!
- 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 »

:rolmfao: That pic sums it up nicely!

I bet you've had one or two moments like that eh? :oops:
- MuLab -
User avatar
jsmorley
Developer
Posts: 22628
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, 10:36 pm :rolmfao: That pic sums it up nicely!

I bet you've had one or two moments like that eh? :oops:
Today? Yep...
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 »

Haha! :p
- 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 »

I've hit another Process Plugin isue.

I have 3 section monitoring 3 apps, but the Action performed is the same, so I thought about combining them into one Section.
Here's what I tried...

Code: Select all

========================================
; EMULATION
========================================
[mProcessEmu]
Measure=Plugin
Plugin=Process
ProcessName=Dolphin.exe
ProcessName2=pcsx2.exe
ProcessName3=rpcs3.exe
IfCondition=mProcessDolphin=1 | mProcessPCSX2=1 | mProcessRPCS3=1
IfTrueAction=[!ActivateConfig "RM\ScreenSaver" "ScreenSaver.ini"] [!Redraw]
IfFalseAction=[!DeactivateConfig "RM\ScreenSaver" "ScreenSaver.ini"] [!Redraw]
Each worked separately. I added PCXE2 and opened the app, it worked. Then I added RPCS3 and it broke! now none work! :?
I have Drive meters that measure 2 processes so this should work shouldn't it?

EDIT: I'm thinking you can't have more than 1 ProcessName? I'm also thinking that when it worked maybe I didn't refresh the skin after editing it.

I can see the mistake. mProcessPCSX2 has been commented out so RM's looking for something that doesn't exist! I then tried:
IfCondition=%1=1 | %2=1 | %3=1

But that didn't work either.

I can only assume you can't use more than one process per monitor?
- MuLab -
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Process plugin not working in one skin

Post by eclectic-tech »

sl23 wrote: August 12th, 2019, 2:06 am I've hit another Process Plugin isue.

I have 3 section monitoring 3 apps, but the Action performed is the same, so I thought about combining them into one Section.
Here's what I tried...

Code: Select all

========================================
; EMULATION
========================================
[mProcessEmu]
Measure=Plugin
Plugin=Process
ProcessName=Dolphin.exe
ProcessName2=pcsx2.exe
ProcessName3=rpcs3.exe
IfCondition=mProcessDolphin=1 | mProcessPCSX2=1 | mProcessRPCS3=1
IfTrueAction=[!ActivateConfig "RM\ScreenSaver" "ScreenSaver.ini"] [!Redraw]
IfFalseAction=[!DeactivateConfig "RM\ScreenSaver" "ScreenSaver.ini"] [!Redraw]
Each worked separately. I added PCXE2 and opened the app, it worked. Then I added RPCS3 and it broke! now none work! :?
I have Drive meters that measure 2 processes so this should work shouldn't it?
You can not measure multiple processes, the Process plugin works with only 1 process.
To measure other processes would require a separate measure for each (what you had before trying to combine them).

Even though each process must have it's own measure, you can have 1 IfCondition in any of those measures (or a separate measure) to take actions based on the status of as many measured processes you desire.

Note that logical comparisons use double characters 'AND' uses '&&' while 'OR' uses '||'
You do not need to [!Redraw] after activating/deactivating configs.

Code: Select all

========================================
; EMULATION
========================================
[mProcessDolphin]
Measure=Plugin
Plugin=Process
ProcessName=Dolphin.exe

[mProcessPCSX2]
Measure=Plugin
Plugin=Process
ProcessName=pcsx2.exe

[mProcessRPCS3]
Measure=Plugin
Plugin=Process
ProcessName=rpcs3.exe

[mProcessEmu]
Measure=Calc
Formula=1
IfCondition=(mProcessDolphin=1) || (mProcessPCSX2=1) || (mProcessRPCS3=1)
IfTrueAction=[!ActivateConfig "RM\ScreenSaver" "ScreenSaver.ini"]
IfFalseAction=[!DeactivateConfig "RM\ScreenSaver" "ScreenSaver.ini"]
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 explaining. I thought as much!
But g didn't think of combining mouse actions for some reason?! So cheers for that too :thumbup: :D

Odd cos I've used that in all my skins! :oops:

One thing though, why the double pipe chars?
- MuLab -
User avatar
Brian
Developer
Posts: 2674
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Process plugin not working in one skin

Post by Brian »

sl23 wrote: August 12th, 2019, 6:02 am One thing though, why the double pipe chars?
To expand on what eclectic-tech said, the double pipe you are seeing is the Logical Or operator. It can be easily confused with the bit-wise operator | (single pipe).

https://docs.rainmeter.net/manual/formulas/#Logical

So in this case, if any of the conditions evaluate to "true", the IfTrueAction will be executed. If none of the conditions evaluate to true (all are false), the IfFalseAction will execute.

So, basically:
If (mProcessDolphin=1) OR (mProcessPCSX2=1) OR (mProcessRPCS3=1) is TRUE, then IfTrueAction is executed.
If (mProcessDolphin=1) AND (mProcessPCSX2=1) AND (mProcessRPCS3=1) is FALSE, then IfFalseAction is executed.

Note: IfConditions can be on any measure, so that extra "mProcessEmu" is not needed (although is sometimes easier to read). The following will work as well:

Code: Select all

========================================
; EMULATION
========================================
[mProcessDolphin]
Measure=Plugin
Plugin=Process
ProcessName=Dolphin.exe

[mProcessPCSX2]
Measure=Plugin
Plugin=Process
ProcessName=pcsx2.exe

[mProcessRPCS3]
Measure=Plugin
Plugin=Process
ProcessName=rpcs3.exe
IfCondition=(mProcessDolphin=1) || (mProcessPCSX2=1) || (mProcessRPCS3=1)
IfTrueAction=[!ActivateConfig "RM\ScreenSaver" "ScreenSaver.ini"]
IfFalseAction=[!DeactivateConfig "RM\ScreenSaver" "ScreenSaver.ini"]
Hopefully that makes sense.

-Brian