It is currently October 4th, 2024, 12:05 am
RainRGB 4.0
-
- Developer
- Posts: 22802
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RainRGB 4.0
I think I might have zigged where I should have zagged and posted the wrong .rmskin in the first post of the thread. You might want to get the latest one there now, to be sure you have the absolute latest version.
-
- Posts: 33
- Joined: October 9th, 2014, 3:29 pm
- Location: Europe
Re: RainRGB 4.0
This is strange, when I try to open RainRGB with the RunCommand plugin nothing happens and the rainmeter log says "RainRGB4 is finished"
-
- Posts: 33
- Joined: October 9th, 2014, 3:29 pm
- Location: Europe
-
- Developer
- Posts: 22802
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RainRGB 4.0
You have:Kriust wrote:This is strange, when I try to open RainRGB with the RunCommand plugin nothing happens and the rainmeter log says "RainRGB4 is finished"
Program="#@#Addons\RainRGB4.exe"
Parameter="VarName=UniqueColor" "FileName=#@#Var.inc""RefreshConfig=-1"
Correct:
Program=""#@#Addons\RainRGB4.exe""
Parameter=""VarName=UniqueColor" "FileName=#@#Var.inc" "RefreshConfig=-1""
You are missing some beginning and ending quotes. You need to use two sets when you want to have an option that will require literal starting and ending quotes, as Rainmeter will treat a single pair of starting and ending quotes as being meant to define a string in Rainmeter, and throw them away before sending the Program / Parameter out to RainRGB.
You are also missing a space between the end quote of the FileName parm and the start quote of the RefreshConfig parm. Parameters in cmd options are always delineated by spaces between them.
Fix those things, and it should work for you.
Side note: Your .rmskin was apparently not created using the built-in Skin Packager in Rainmeter, or was modified in some way outside of that tool. In order to protect our users, Rainmeter will not install any .rmskin that it didn't create itself.
-
- Posts: 33
- Joined: October 9th, 2014, 3:29 pm
- Location: Europe
Re: RainRGB 4.0
I guess what I am trying to do is impossible, the Plugin works, but I have to update the skin if I want to change every color value to #UniqueColor#.
Yeah, thats because I opened the skin with WinRAR and deleted a Plugins folder from @resources.Side note: Your .rmskin was apparently not created using the built-in Skin Packager in Rainmeter, or was modified in some way outside of that tool. In order to protect our users, Rainmeter will not install any .rmskin that it didn't create itself.
-
- Developer
- Posts: 22802
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RainRGB 4.0
Perhaps. It all goes back to what I talked about early on. @Include files are read only when the skin is first loaded or when it is refreshed. That has to be the starting point as you design an approach to get what you want.Kriust wrote:I guess what I am trying to do is impossible, the Plugin works, but I have to update the skin if I want to change every color value to #UniqueColor#.
If you want to change a variable's value "right now" in memory, you will want to use !SetVariable. Assuming the meter or measure using the variable has DynamicVariables=1 on it, then that change will be immediate and not require any skin refresh. To make a change "permanent", you need to use !WriteKeyValue. So many times you might want to use both in the same action. Set the variable with !SetVariable and make that change persistent with !WriteKeyValue.
Keep in mind that !SetVariable has an optional "config" parameter on it, so you can have an action in one skin set a variable in another if needed.
All this is going to be quite tricky for what you are trying to do however. The core of the problem is that you are using RainRGB to set a color. RainRGB does one thing and only one thing. It "writes" a value to a file. Since you can never know what value the user chose, or what was written to the file, you can't take actions based on the changed value. The only way your skin can in any way react to the change to any file, either the skin .ini itself or an @Include .inc file, is to refresh the skin using it. There is just no way around that.
-
- Developer
- Posts: 22802
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RainRGB 4.0
Important - New version. Get the latest now...
I have updated the .rmskin in the First post of the thread to include something new with RainRGB.
There are now two versions of RainRGB4.
RainRGB4.exe
This is the latest version, which works just as it did before. No changes are required in your skins.
RainRGB4RunCommand.exe
This is a special version of RainRGB4, that MUST be executed with the RunCommand Plugin. The difference is that this version will do all that the regular version does, but in addition will return the color code chosen by the user (or the original color code if the user cancels or exits) to STDOUT (Standard Out). That will set the measure value of the RunCommand plugin measure to the selected color code, which you might use in a FinishAction to take some action based on the value without having to refresh the skin.
Be sure to examine the documentation for the RunCommand Plugin so you are sure you are using it correctly.
See the RainRGBRunCommandExample.ini skin included in the .rmskin to see how you might use this capability. I have included the RunCommand plugin in the .rmskin.
Note: The reason for two versions is due to the fact that to write to STDOUT, so the RunCommand plugin can get and use the value, I had to compile the program as a "console application". This means that if you call it without RunCommand, it will pop up a really annoying cmd window.
Since I didn't want to wreak havoc with folks just using RainRGB4 as they always have, I needed to have a separate version for the RunCommand capability.
So to use RainRGB4 as you always have, just use the RainRGB4.exe and nothing needs to be done. To take advantage of the new capability to react to the chosen value without a skin refresh, you must use RainRGB4RunCommand.exe, and use it in conjunction with the RunCommand plugin.
I have updated the .rmskin in the First post of the thread to include something new with RainRGB.
There are now two versions of RainRGB4.
RainRGB4.exe
This is the latest version, which works just as it did before. No changes are required in your skins.
RainRGB4RunCommand.exe
This is a special version of RainRGB4, that MUST be executed with the RunCommand Plugin. The difference is that this version will do all that the regular version does, but in addition will return the color code chosen by the user (or the original color code if the user cancels or exits) to STDOUT (Standard Out). That will set the measure value of the RunCommand plugin measure to the selected color code, which you might use in a FinishAction to take some action based on the value without having to refresh the skin.
Be sure to examine the documentation for the RunCommand Plugin so you are sure you are using it correctly.
See the RainRGBRunCommandExample.ini skin included in the .rmskin to see how you might use this capability. I have included the RunCommand plugin in the .rmskin.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
CurrentColor=205,219,247,255
[MeasureRunRainRGB]
Measure=Plugin
Plugin=RunCommand
Program=""#@#Addons\RainRGB4RunCommand.exe""
Parameter=""VarName=CurrentColor" "FileName=#CURRENTPATH##CURRENTFILE#" "RefreshConfig=-1""
OutputType=ANSI
FinishAction=[!UpdateMeasure MeasureSetColor]
[MeasureSetColor]
Measure=String
String=[MeasureRunRainRGB]
UpdateDivider=-1
DynamicVariables=1
IfMatch=^$
IfMatchMode=1
IfNotMatchAction=[!SetVariable CurrentColor "[MeasureRunRainRGB]"][!UpdateMeter *][!Redraw]
[MeterExample]
Meter=String
FontSize=17
FontColor=#CurrentColor#
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=Current Color
LeftMouseUpAction=[!CommandMeasure MeasureRunRainRGB "Run"]
Since I didn't want to wreak havoc with folks just using RainRGB4 as they always have, I needed to have a separate version for the RunCommand capability.
So to use RainRGB4 as you always have, just use the RainRGB4.exe and nothing needs to be done. To take advantage of the new capability to react to the chosen value without a skin refresh, you must use RainRGB4RunCommand.exe, and use it in conjunction with the RunCommand plugin.
-
- Developer
- Posts: 22802
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RainRGB 4.0
I'm not sure, but I suspect the change I just made to RainRGB4 might help with your situation.Kriust wrote:I guess what I am trying to do is impossible, the Plugin works, but I have to update the skin if I want to change every color value to #UniqueColor#.
http://rainmeter.net/forum/viewtopic.php?p=116061#p116061
-
- Posts: 33
- Joined: October 9th, 2014, 3:29 pm
- Location: Europe
Re: RainRGB 4.0
This new update is a bit confusing for me, but I got an idea on how to use
Code: Select all
IfMatch=
IfMatchMode=1
IfNotMatchAction=
You do not have the required permissions to view the files attached to this post.
-
- Posts: 33
- Joined: October 9th, 2014, 3:29 pm
- Location: Europe
Re: RainRGB 4.0
Ok, I am confused and I don't know what I am doing anymore and I made this.
Code: Select all
[MeasureRunRainRGB]
Measure=Plugin
Plugin=RunCommand
Program=""#@#Addons\RainRGB4RunCommand.exe""
Parameter=""VarName=UniqueColor" "FileName=#CURRENTPATH##CURRENTFILE#" "RefreshConfig=-1""
OutputType=ANSI
FinishAction=[!UpdateMeasure MeasureSetColor]
[MeasureSetColor]
Measure=String
String=[MeasureRunRainRGB]
UpdateDivider=-1
DynamicVariables=1
IfMatch=^$
IfMatchMode=1
IfNotMatchAction=[!ToggleMeter "ApplyString"]
[BoxColor]
DynamicVariables=1
Meter=Image
W=32
H=32
X=85
Y=165
SolidColor=#CPUColor#
Hidden=1
Group=Config
LeftMouseUpAction=[!CommandMeasure MeasureRunRainRGB "Run"]
[ApplyString]
Meter=String
DynamicVariables=1
Hidden=1
Group=Config
LeftMouseUpAction=[!WriteKeyValue "Variables" "CPUColor" "#UniqueColor#" "#@#Variables.inc"][!WriteKeyValue "Variables" "CPUColorBg" "#UniqueColor#" "#@#Variables.inc"][!WriteKeyValue "Variables" "CPUColorTxt" "#UniqueColor#" "#@#Variables.inc"][!WriteKeyValue "Variables" "CPUColorTemp" "#UniqueColor#" "#@#Variables.inc"][!WriteKeyValue "Variables" "CpuColorNumb" "#UniqueColor#" "#@#Variables.inc"][!refresh]
[ApplyButton]
Meter=Image
W=66
H=22
X=30
Y=203
ImageName=#@#LouButton1.png
Hidden=1
ImageAlpha=0
Group=Config
LeftMouseUpAction=[!Refresh]