It is currently March 28th, 2024, 11:33 am

RainRGB 4.0

Plugins and Addons popular with the Community
Post Reply
User avatar
Dank420
Posts: 145
Joined: April 3rd, 2013, 1:04 am
Location: O-High-O

Re: RainRGB 4.0

Post by Dank420 »

ya i dig it, was thinking of ONCHANGE actions but felt a little costly as your not changing colors all the time.. ill look into runcommand,( i do like Brian's plugins) thank you for time.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainRGB 4.0

Post by jsmorley »

Dank420 wrote:ya i dig it, was thinking of ONCHANGE actions but felt a little costly as your not changing colors all the time.. ill look into runcommand,( i do like Brian's plugins) thank you for time.
I don't see how OnChangeAction can possibly play a role, as nothing will be "changed" until you refresh the skin to re-read the .ini or .inc you changed with RainRGB. Of course even then it won't be "changed", as the refresh just sorta "starts over" with the new variable value from the .ini or .inc. As far as Rainmeter knows, it has always been that value.

RainRGB is simple in concept. It opens the color picker dialog, then when you click "OK" it uses the parameters you pass it to 1)Write the color to an existing [Variables] in an existing .ini formatted file. 2)Refresh the skin or skins that depend on that variable to set some colors in meters.

Other than perhaps with RunCommand, there is no way to make the interaction between Rainmeter and RainRGB anything where Rainmeter "waits" for RainRGB. That is both impossible and undesirable. RainRGB is not a threaded plugin inside the running Rainmeter environment. Also, having RainRGB try to "set" variables rather than just "writing" them, is not something that I am particularly interested in. It feels like a lot of "feature creep" that has limited usefulness.

I think RunCommand is the best bet (and I certainly have not tested with it) to execute RainRGB, with some option on RunCommand that tells it to wait for the called executable to exit, then set some FinishAction on the RunCommand measure to take whatever action you want. Refresh some skin(s), read and parse the file with WebParser, read the file with Lua, whatever you want.
User avatar
Dank420
Posts: 145
Joined: April 3rd, 2013, 1:04 am
Location: O-High-O

Re: RainRGB 4.0

Post by Dank420 »

well i was thinking of having RainRGB refresh the configskin then on change refresh the group, but run command finishaction prob a better way to go,(less refreshes) which easier? got me , need to try Runcommand anyhow , haven't giving it a workout.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainRGB 4.0

Post by jsmorley »

Dank420 wrote:well i was thinking of having RainRGB refresh the configskin then on change refresh the group, but run command finishaction prob a better way to go,(less refreshes) which easier? got me , need to try Runcommand anyhow , haven't giving it a workout.
RunCommand might work out, I suspect it will. OnChangeAction can NEVER work in any simple scenario I can envision. Nothing you write to a file can ever trigger an OnChangeAction unless you re-read the file, which means a refresh, which means it isn't "changed". The only possible way I can see would be to have some "disabled" WebParser measure or Lua script measure be "enabled" to read the file as a part of the action that fires RainRGB, and then set an OnChangeAction on it that takes some action and "disables" itself. I think a little trap falls on a mouse at the end.
User avatar
Dank420
Posts: 145
Joined: April 3rd, 2013, 1:04 am
Location: O-High-O

Re: RainRGB 4.0

Post by Dank420 »

well think easiest way to go will be have config skin load/close dummy skin to refresh group and have Rainrgb refresh the dummy

in config:
(wish had onloadaction, but rainmeter dosent know the difference between load and refresh i dont think)
onrefreshaction=[!Activateconfig Dummy]
oncloseaction=[!deactivateconig Dummy]

the dummy:
[rainmeter]
update=-1
onrefreshaction=[!refreshgroup livingsound]

[meterblank]
meter=image
solidcolor=0,0,0,0
x=0
y=0
w=1
h=1
ill get errors about already active i think but ??? see anything other the that wrong with this approach? or would this be a perpetual loop of activate refreshing?

whats wrong with this?(dummy in folder in samefolder as config?)
[!Activateconfig "#CURRENTPATH#refreshDummy" "refreshdummy.ini"]

method works but do get already active warning and had to type out whole path to dummy skin( which means no folder copy for clones)
might have to use runcommand......

[!Activateconfig "#ROOTCONFIG#\configurator\refreshDummy" "refreshdummy.ini"] works but still that error warning... yarg!!!!
well thanks for time thou ,, ill think about it......
User avatar
Dank420
Posts: 145
Joined: April 3rd, 2013, 1:04 am
Location: O-High-O

Re: RainRGB 4.0

Post by Dank420 »

Ended up using dummy method,
inconfigurationskin:
oncloseaction=[!Writekeyvalue Variables "Loadaction" "0"][!deActivateconfig "#ROOTCONFIG#\configurator\refreshDummy" "refreshdummy.ini"]

[Variables]
Loadaction=0


[loadaction]
measure=calc
formula=1
ifequalvalue=1
ifequalaction=[!Activateconfig "#ROOTCONFIG#\configurator\refreshDummy" "refreshdummy.ini"][!Writekeyvalue Variables "loadaction" "1"][!disablemeasure loadaction]
disabled=#loadaction#
dynamicvariables=1

then same dummy as above... works no error ...good enough!

Thanks for hashing out options thou, made me think, and cleared up onchange a bit for me.
Oxmaster
Posts: 33
Joined: February 18th, 2013, 6:06 pm

Re: RainRGB 4.0

Post by Oxmaster »

I've got very strange problem:

After the command executes the config does not refresh on its own, but it works on your example. I have no idea why. I've got SettingsBasic and Advanced in SettingsBasic there is include to Advanced so they can communicate, but that's not a problem, I tried copying adv to basic and same result. Manual refreshing works.

Code: Select all

[Rainmeter]
Author=Oxmaster
Update=1000
Background=#@#Backgrounds\Background.png
BackgroundMode=3
BackgroundMargins=14,34,14,14

[Metadata]
License=Creative Commons BY-NC-SA 3.0
Information=Basic options.
Version=2.0

[Variables]
@Include=#@#SettingsBasic.inc

[BarCalc]
Measure=Calc
Formula=50
MinValue=0
MaxValue=100

[meterButton]
Meter=Button
ButtonImage=#@#\Icons\Refresh.png
X=180
Y=13
LeftMouseUpAction=!RefreshApp

[ChangeColorBarsSample]
Meter=Bar
MeterStyle=BarStyle
MeasureName=BarCalc
X=100
Y=50
W=160
H=10
LeftMouseUpAction=["#@#Addons\RainRGB4.exe" "VarName=BarsColor" "FileName=#@#SettingsBasic.inc" "RefreshConfig=#CURRENTCONFIG#"]
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainRGB 4.0

Post by jsmorley »

Oxmaster wrote:I've got very strange problem:

After the command executes the config does not refresh on its own, but it works on your example. I have no idea why. I've got SettingsBasic and Advanced in SettingsBasic there is include to Advanced so they can communicate, but that's not a problem, I tried copying adv to basic and same result. Manual refreshing works.

Code: Select all

[Rainmeter]
Author=Oxmaster
Update=1000
Background=#@#Backgrounds\Background.png
BackgroundMode=3
BackgroundMargins=14,34,14,14

[Metadata]
License=Creative Commons BY-NC-SA 3.0
Information=Basic options.
Version=2.0

[Variables]
@Include=#@#SettingsBasic.inc

[BarCalc]
Measure=Calc
Formula=50
MinValue=0
MaxValue=100

[meterButton]
Meter=Button
ButtonImage=#@#\Icons\Refresh.png
X=180
Y=13
LeftMouseUpAction=!RefreshApp

[ChangeColorBarsSample]
Meter=Bar
MeterStyle=BarStyle
MeasureName=BarCalc
X=100
Y=50
W=160
H=10
LeftMouseUpAction=["#@#Addons\RainRGB4.exe" "VarName=BarsColor" "FileName=#@#SettingsBasic.inc" "RefreshConfig=#CURRENTCONFIG#"]
Do you have spaces in any folder names in the skins involved in this?
Oxmaster
Posts: 33
Joined: February 18th, 2013, 6:06 pm

Re: RainRGB 4.0

Post by Oxmaster »

jsmorley wrote:
Overall yes, but this skin is called Options.ini so no spaces, and #currentconfig# should only refresh Options.ini AFAIK.

The changing values works, but it only doesn't refresh the skin. I have to manually do it.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainRGB 4.0

Post by jsmorley »

Oxmaster wrote:
Overall yes, but this skin is called Options.ini so no spaces, and #currentconfig# should only refresh Options.ini AFAIK.

The changing values works, but it only doesn't refresh the skin. I have to manually do it.
Yes, but #CURRENTCONFIG# is defined by the path starting from ..Rainmeter\Skins\ to the folder containing the skin.

So ..Rainmeter\Skins\My Skins\Options\Options.ini would be a #CURRENTCONFIG# of My Skins\Options. That has a space in it, even though "Options" doesn't.

Just feels like we are running into a problem with a space in a folder name here.

What is the FULL path to Options.ini?
Post Reply