It is currently April 25th, 2024, 8:03 am
Get help with creating, editing & fixing problems with skins
mrniss
Posts: 2 Joined: October 10th, 2018, 5:55 pm
Post
by mrniss » October 10th, 2018, 6:04 pm
can someone help me with this? i'm obviously stupid, i can't figure out something with two elements, but there it is.
super small calculator (bpm into seconds), input a number into the text box, 60 gets divided by that number, it displays. whenever i uncomment MeasureCalc it just doesn't display anymore.
Code: Select all
[Variables]
bpm=tempo
[MeterInput]
Meter=String
W=100
H=20
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
Text=#bpm#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure MeasureInputText "ExecuteBatch 1"]
[MeterResult]
Meter=String
Measure=MeasureCalc
W=100
H=20
Y=20
FontColor=255,255,255,255
SolidColor=255,0,0,255
Text=%1
DynamicVariables=1
[MeasureInputText]
Measure=Plugin
Plugin=InputText
W=100
H=20
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
Command1=[!SetVariable bpm "$UserInput$"][!WriteKeyValue Variables bpm "[MeasureInputText]"][!UpdateMeter *][!Redraw]
[MeasureResult]
Measure=Calc
DynamicVariables=1
Formula=60/#bpm#
balala
Rainmeter Sage
Posts: 16168 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » October 10th, 2018, 7:10 pm
mrniss wrote: super small calculator (bpm into seconds), input a number into the text box, 60 gets divided by that number, it displays. whenever i uncomment MeasureCalc it just doesn't display anymore.
Not sure I can completely follow what1s going on there, but definitely there is a mistake: a Measure option doesn't exist on String meters (otherwise a such option doesn't exist on no meter or measure). Probably this option should have to be
Measure[color=#FF0000]Name[/color]=MeasureCalc ([MeterResult] meter).
If fixing the above option doesn't help, you have to know that a [MeasureCalc] measure doesn't even exist, that's why I'm not sure what the skin should have to do. Please post the whole code, because I think there should have to exist some unposted sections.
eclectic-tech
Rainmeter Sage
Posts: 5406 Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Post
by eclectic-tech » October 10th, 2018, 11:32 pm
The correction balala suggested is needed, but you also need to change the value to
MeasureName=MeasureResult .
Here is your code with that change and a few other "tweaks" for you to consider...
Code: Select all
[Variables]
bpm=60
[MeasureInputText]
Measure=Plugin
Plugin=InputText
W=235
H=20
FontSize=10
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
DefaultValue=Enter BPM
Command1=[!SetVariable bpm "$UserInput$"][!WriteKeyValue Variables bpm "[MeasureInputText]"][!UpdateMeter *][!Redraw]
[MeasureResult]
Measure=Calc
DynamicVariables=1
Formula=60/#bpm#
Substitute="1":""
IfCondition=#CurrentSection#=1
IfTrueAction=[!SetOption MeterResult Text "One Beat Every Second"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterResult Text "One Beat Every %1 Seconds"][!UpdateMeter *][!Redraw]
IfConditionMode=1
[MeterInput]
Meter=String
W=235
H=20
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
Text=#bpm# BPM Translates To
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure MeasureInputText "ExecuteBatch 1"]
[MeterResult]
Meter=String
MeasureName=MeasureResult
W=235
H=20
Y=20
FontSize=12
FontColor=0,0,0,255
StringStyle=Bold
SolidColor=255,0,0,255
Text=One Beat Every %1 Seconds
DynamicVariables=1
NumOfDecimals=2
bpm.png
You do not have the required permissions to view the files attached to this post.
mrniss
Posts: 2 Joined: October 10th, 2018, 5:55 pm
Post
by mrniss » October 11th, 2018, 3:42 am
i
did post all my code... and i also haven't used rainmeter in about 12 years, so, i might as well have never used it, at this point. :(
thank you, though! this is far nicer than keeping openoffice on my screen... though i did make it a little more minimal :)
bpmcalc.PNG
You do not have the required permissions to view the files attached to this post.
eclectic-tech
Rainmeter Sage
Posts: 5406 Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Post
by eclectic-tech » October 11th, 2018, 3:52 am
I like the look of your solution!
Yeah, I completely understand "
Use It or Lose It! "... 12 years!
balala
Rainmeter Sage
Posts: 16168 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » October 11th, 2018, 12:35 pm
eclectic-tech wrote: The correction balala suggested is needed, but you also need to change the value to MeasureName=MeasureResult .
The original code had no [MeasureCalc] measure, but it was used into the code.