It is currently June 5th, 2023, 7:47 pm

## Is R useable following a short formula [SOLVED]

Get help with creating, editing & fixing problems with skins
CodeCode
Posts: 1177
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

### Is R useable following a short formula [SOLVED]

Hello,
So, I have this line - it is supposed to separate A lot of numbers evenly:
X=(#Space.X# + #OffSetR#)R

This would not evaluate:
X=(#Space.X#R + #OffSetR#)

I am appending the #OffsetR# so the numbers will slide out or in.

Is there a better way to use #OffsetR# after the original #Space.X#R

Thanks for any help or advice that will get this X axis alignment working.
Last edited by CodeCode on May 27th, 2023, 4:19 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
balala
Rainmeter Sage
Posts: 15316
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Is R useable following a short formula

CodeCode wrote: May 25th, 2023, 5:39 pm This would not evaluate:
X=(#Space.X#R + #OffSetR#)

I am appending the #OffsetR# so the numbers will slide out or in.
What do you mean by "This would not evaluate:". It definitely is evaluated, I doubt it isn't. If you're altering any of those variables (namely OffSetR) with a !SetVariable bang, make sure you've added the DynamicVariables=1 option to the meter which uses the above X option.
CodeCode
Posts: 1177
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

### Re: Is R useable following a short formula

balala wrote: May 25th, 2023, 7:07 pm What do you mean by "This would not evaluate:". It definitely is evaluated, I doubt it isn't. If you're altering any of those variables (namely OffSetR) with a !SetVariable bang, make sure you've added the DynamicVariables=1 option to the meter which uses the above X option.
I guess there is something else I m not doing right.

Here is the line from the log:
Formula: "R" is unknown: (11*2.4)R + 1140
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
balala
Rainmeter Sage
Posts: 15316
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Is R useable following a short formula

CodeCode wrote: May 25th, 2023, 8:33 pm Here is the line from the log:
Formula: "R" is unknown: (11*2.4)R + 1140
How does the appropriate meter is looking like (post the whole meter, please)?
CodeCode
Posts: 1177
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

### Re: Is R useable following a short formula

Ok, so I am editing Smurfier's lua calendar.

I am trying to make it one of two sections that slide right, and the other to the left. I know it isnt dynamicvariables, since I tried it with no effect.

If anyone has the time to look at the modified code, here it is:
Last edited by CodeCode on May 26th, 2023, 6:02 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
balala
Rainmeter Sage
Posts: 15316
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Is R useable following a short formula

CodeCode wrote: May 25th, 2023, 8:39 pm I am trying to make it one of two sections that slide right, and the other to the left. I know it isnt dynamicvariables, since I tried it with no effect.
Alright, but which skin are you working with (because there are more in the package)?
Which is the meter you'd like to slide in and out?
Yincognito
Rainmeter Sage
Posts: 5365
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Is R useable following a short formula

CodeCode wrote: May 25th, 2023, 5:39 pm Hello,
So, I have this line - it is supposed to separate A lot of numbers evenly:
X=(#Space.X# + #OffSetR#)R

This would not evaluate:
X=(#Space.X#R + #OffSetR#)

I am appending the #OffsetR# so the numbers will slide out or in.

Is there a better way to use #OffsetR# after the original #Space.X#R

Thanks for any help or advice that will get this X axis alignment working.
I'm going to answer the relative positioning question and skip the slide thing since balala seems to be on top of it, but yeah, you're correct, the 2nd variant is not valid, because the r or R must be appended at the end of the option, whether the option uses a formula or not. For example:

Code: Select all

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

---Meters---

[Meter1]
Meter=String
SolidColor=255,0,0,255
FontFace=Consolas
FontSize=16
FontColor=255,255,255
AntiAlias=1
Text="Meter1"

[Meter2]
Meter=String
X=(20+10)R
;X=(20R+10)
SolidColor=0,255,0,255
FontFace=Consolas
FontSize=16
FontColor=255,255,255
AntiAlias=1
Text="Meter2"
``````
The 1st X=... line will work, but the 2nd (i.e. the commented one) will not, because the R suffix is not at the end of the option. That being said, the two options should give the same result, so I don't see a reason to insist in using the 2nd one. You'll probably have to find another way to deal with your sliding problem, if the relative syntax even plays a key role in that regard, that is, since, like balala implied, it depends on context and what you actually want to do in your skin.
Profiles: Rainmeter ProfileDeviantArt Profile ◆ Suites: MYiniMeter ◆ Skins: Earth
CodeCode
Posts: 1177
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

### Re: Is R useable following a short formula

balala wrote: May 25th, 2023, 8:54 pm Alright, but which skin are you working with (because there are more in the package)?
Which is the meter you'd like to slide in and out?
Ok, apologies for the vague posts.
I am trying to put together three skins so that one would always show. One of the other two would slide out right (this one) or left (not put together yet).

So the lua calendar ( I renamed it back as I was avoiding having working examples get confused with the one I am modifying).

The skin I will post here again is being made with the skin in the slide right position, so if you ctrl alt click on the skin you can see it is in the far right position.

This is what I am going for with the skin in the right position ( taken from the original version):
Capture1.PNG
But this is the problem I am struggling with, and the skin is in the far right position:
Capture2.PNG
Here is the skin without the other files (I am going to incorporate all three into one file for the sliding - eventually).
[RMSkin Removed By OP]

I hope this is more clear.
You do not have the required permissions to view the files attached to this post.
Last edited by CodeCode on May 26th, 2023, 6:03 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
balala
Rainmeter Sage
Posts: 15316
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Is R useable following a short formula

CodeCode wrote: May 26th, 2023, 6:06 am I hope this is more clear.
Yep, it is. But I still sustain what I sustained a few replies before: you have to add a DyanmicVariables=1 option to all meters you want to move right (or left) with the ActionTimer plugin, by altering their X position. Additionally you have to update them altogether on every update of the ActionTimer plugin measure. You didn't do all this. And additionally once again, the position of all those String meters are completely broken. When you want to use the R parameter in the X options, you have to place one meter relatively to the previous one. So you don't need to use an extremely complicated formula in the X option of all meters, just in the X position of the first ones, to which the further meters are placed relative to. For instance: you need a formula in the X option of the [l0] meter (the one you've used), but don't need a same-complicated formula in the X position of the [l1], [l2] and so on meters. So you have to replace this option (X=#Space.X#R + #OffSetR#) by the much simpler X=#Space.X#R. The OffSetR variable is not needed in this case anymore, because it has been added to the X option of the previous meter ([l0] in this case) and since the following meters are placed relatively to the first one, when the first one starts to move, it move the upcoming, relatively positioned meters as well. But what you have to do is to include all meter showing dates to the SlideR meter group (by adding a Group=SlideR option to all of them), to can get them updated on every update of the ActionTimer plugin measure.
Taking into account all I wrote above, here is an altered code of the lua calendar.ini skin file. Please try it out and let me know how it works.

Code: Select all

``````[Rainmeter]
Update=36000
MouseScrollUpAction=[!CommandMeasure Lua "CombineScroll(-1)"]
MouseScrollDownAction=[!CommandMeasure Lua "CombineScroll(1)"]
SkinWidth=1710

[Variables]
@include=#@#Settings.inc
@include2=#@#Styles\Variables.inc
@include3=#@#Vars.inc

OffsetL=0
OffSetR=1140

Left=0
Right=0

C=[!UpdateMeasureGroup SlideL][!UpdateMeterGroup SlideL][!Redraw]
D=[!UpdateMeasureGroup SlideR][!UpdateMeterGroup SlideR][!Redraw]

[Lua]
Measure=Script
ScriptFile=#@#Scripts\CScript.lua
;============================================ GCalendar ===========================================

;========================================== LUA CALENDAR SLIDE R ==================================

[MeasureSliderR]
Measure=Plugin
Plugin=ActionTimer
Group=SlideR
ActionList1=Repeat Right,1,57
ActionList2=Repeat Left,1,57
Right=[!SetVariable OffSetR "(Clamp(#OffSetR#+20,1140,1710))"][!WriteKeyValue Variables OffSetR "[#OffSetR]"]#D#
Left=[!SetVariable OffSetR "(Clamp(#OffSetR#-20,1140,1710))"][!WriteKeyValue Variables OffSetR "[#OffSetR]"]#D#
IfCondition=(#OffSetR# = 1710) && (#OffSetR# >= 1660)
IfTrueAction=[!SetOption ButtonMainFourIcon LeftMouseUpAction """[!CommandMeasure MeasureSliderR "Stop 2"][!CommandMeasure MeasureSliderR "Execute 1"]"""][!SetVariable OffSetR "1710"][!WriteKeyValue Variables OffSetR "[#OffSetR]"][!Update]
IfCondition2=(#OffSetR# = 568) && (#OffSetR# <= 140)
IfTrueAction2=[!SetOption ButtonMainFourIcon LeftMouseUpAction """[!CommandMeasure MeasureSliderR "Stop 1"][!CommandMeasure MeasureSliderR "Execute 2"]"""][!SetVariable OffSetR "0"][!WriteKeyValue Variables OffSetR "[#OffSetR]"][!Update]
IfCondition3=(#OffsetR# < 44)
IfTrueAction3=[!SetVariable Right "1"][!WriteKeyValue Variables Right "[#Right]"][!Update]
IfFalseAction3=[!SetVariable Right "0"][!WriteKeyValue Variables Right "[#Right]"][!Update]
DynamicVariables=1

;============================================= LUA CALENDAR ======================================

[BorderBack]
Meter=Shape
Shape=Rectangle (46 + #OffSetR#),44,478,386,10 | Fill Color 5,5,5,255 | StrokeWidth 2 | Stroke Color #MainColor#
AntiAlias=1
Group=SlideR
DynamicVariables=1

[MyBkgdRayz]
Meter=Image
ImageName=#@#Images\Ray.png
X=(38 + #OffSetR#)
Y=40
W=478
H=395
AntiAlias=1
Group=SlideR
DynamicVariables=1

@include=#@#Styles\Styles.inc

[MeterUpLeft]
Meter=Image
ImageName=#@#Images\Border.png
ImageTint=#MainColor#
X=(0 + #OffSetR#)
Y=0
W=130
H=130
AntiAlias=1
Group=SlideR
DynamicVariables=1

[MeterLowLeft]
Meter=Image
ImageFlip=Vertical
ImageName=#@#Images\Border.png
ImageTint=#MainColor#
X=(0 + #OffSetR#)
Y=346
W=130
H=130
AntiAlias=1
Group=SlideR
DynamicVariables=1

[MeterUpRight]
Meter=Image
ImageFlip=Horizontal
ImageName=#@#Images\Border.png
ImageTint=#MainColor#
X=(440 + #OffSetR#)
Y=0
W=130
H=130
AntiAlias=1
Group=SlideR
DynamicVariables=1

[Gothica]
Meter=Image
ImageName=#@#Images\ChapterC.png
ImageTint=#MainColor#
X=(121 + #OffSetR#)
Y=0
W=326
H=40
AntiAlias=1
Group=SlideR
DynamicVariables=1

[Gothic]
Meter=Image
ImageName=#@#Images\ChapterC.png
ImageTint=#MainColor#
ImageFlip=Vertical
X=(121 + #OffSetR#)
Y=435
W=326
H=40
AntiAlias=1
Group=SlideR
DynamicVariables=1

[MeterLowRight]
Meter=Image
ImageFlip=Both
ImageName=#@#Images\Border.png
ImageTint=#MainColor#
X=(440 + #OffSetR#)
Y=346
W=130
H=130
AntiAlias=1
Group=SlideR
DynamicVariables=1

;Day Labels
[l0]
Meter=string
H=#C.h#
W=#C.w#
X=((#Bumper.x#+#C.w#/2) + #OffSetR#)
Y=(#Bumper.top#+#C.h#*1.5+#Space.y#)
FontFace=Tele-Marines
FontColor=200,200,200,220
SolidColor=255,255,255,0
FontSize=(8*#Scaler#)
stringAlign=CenterCenter
StringEffect=Border
FontEffectColor=0,0,0,200
AntiAlias=1
Group=SlideR
DynamicVariables=1

[l1]
Meter=string
H=#C.h#
W=#C.w#
X=#Space.X#R
Y=r
FontFace=Tele-Marines
FontColor=200,200,200,220
SolidColor=255,255,255,0
FontSize=(8*#Scaler#)
stringAlign=CenterCenter
StringEffect=Border
FontEffectColor=0,0,0,200
AntiAlias=1
Group=SlideR

[l2]
Meter=string
H=#C.h#
W=#C.w#
X=#Space.X#R
Y=r
FontFace=Tele-Marines
FontColor=200,200,200,220
SolidColor=255,255,255,0
FontSize=(8*#Scaler#)
stringAlign=CenterCenter
StringEffect=Border
FontEffectColor=0,0,0,200
AntiAlias=1

[l3]
Meter=string
H=#C.h#
W=#C.w#
X=#Space.X#R
Y=r
FontFace=Tele-Marines
FontColor=200,200,200,220
SolidColor=255,255,255,0
FontSize=(8*#Scaler#)
stringAlign=CenterCenter
StringEffect=Border
FontEffectColor=0,0,0,200
AntiAlias=1

[l4]
Meter=string
H=#C.h#
W=#C.w#
X=#Space.X#R
Y=r
FontFace=Tele-Marines
FontColor=200,200,200,220
SolidColor=255,255,255,0
FontSize=(8*#Scaler#)
stringAlign=CenterCenter
StringEffect=Border
FontEffectColor=0,0,0,200
AntiAlias=1

[l5]
Meter=string
H=#C.h#
W=#C.w#
X=#Space.X#R
Y=r
FontFace=Tele-Marines
FontColor=200,200,200,220
SolidColor=255,255,255,0
FontSize=(8*#Scaler#)
stringAlign=CenterCenter
StringEffect=Border
FontEffectColor=0,0,0,200
AntiAlias=1

[l6]
Meter=string
H=#C.h#
W=#C.w#
X=#Space.X#R
Y=r
FontFace=Tele-Marines
FontColor=200,200,200,220
SolidColor=255,255,255,0
FontSize=(8*#Scaler#)
stringAlign=CenterCenter
StringEffect=Border
FontEffectColor=0,0,0,200
AntiAlias=1

;Week 1 Begin
[mDay1]
Meter=string
Group=SlideR
DynamicVariables=1

[mDay2]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay3]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay4]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay5]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay6]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay7]
Meter=string
X=#Space.X#R
Group=SlideR

;Week 2 Begin
[mDay8]
Meter=string
Group=SlideR
DynamicVariables=1

[mDay9]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay10]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay11]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay12]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay13]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay14]
Meter=string
X=#Space.X#R
Group=SlideR

;Week 3 Begin
[mDay15]
Meter=string
Group=SlideR
DynamicVariables=1

[mDay16]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay17]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay18]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay19]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay20]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay21]
Meter=string
X=#Space.X#R
Group=SlideR

;Week 4 Begin
[mDay22]
Meter=string
Group=SlideR
DynamicVariables=1

[mDay23]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay24]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay25]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay26]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay27]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay28]
Meter=string
X=#Space.X#R
Group=SlideR

;Week 5 Begin
[mDay29]
Meter=string
Group=SlideR
DynamicVariables=1

[mDay30]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay31]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay32]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay33]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay34]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay35]
Meter=string
X=#Space.X#R
Group=SlideR

;Week 6 Begin
[mDay36]
Meter=string
Group=SlideR
DynamicVariables=1

[mDay37]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay38]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay39]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay40]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay41]
Meter=string
X=#Space.X#R
Group=SlideR

[mDay42]
Meter=string
X=#Space.X#R
Group=SlideR

[Scaler]``````
Additionally the code is not finished yet, a few other improvements are also needed, but check it before I work with it further, to see if it matches your need.
CodeCode
Posts: 1177
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

### Re: Is R useable following a short formula

OK. WOW!

WOW!

Now I can see what I needed to do - beyond Dynamic Variables - which I should have realised is absolutely necessary.

It looks great - finally seeing it all properly aligned. I was beginning to think I just couldn't work this way.
Now I see that asking for help in the forum alleviated some headaches. Well I was nearly out of ideas. Seeing the #Space.X#R working without having the #OffSetR# being added to it (in almost all cases here), was a bit of a surprise. All we are needing to do is move the left most column, and the rest follow it.

Balala, you mentioned there were some things that need to be done/added. I am guessing the mouseclick to activate the slide is obviously not there yet, along with making accord for the skin to properly become hidden behind the center part, etc.
Seeing that your help has gotten me past that hurdle, I would be happy for any other help, balala, and the forum in general.

Thank you balala, for taking the time to sort things out.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.