It is currently April 19th, 2024, 10:31 pm

Y Position not relative to last VISIBLE meter

General topics related to Rainmeter.
Formidable
Posts: 6
Joined: June 24th, 2009, 7:24 pm

Y Position not relative to last VISIBLE meter

Post by Formidable »

When displaying one meter below another I use the y=R option.
This only seems to work if the meter listed directly above in the ini file is visible.
If I'm creating a skin where one or more meters may conditionally be hidden, then the meter listed directly below a hidden meter will position itself as if y=0.

In the simple example below, there are two STRING meters named MTRTest01 and MTRTest02. Every few seconds, one is visible and the other is hidden. The next meter shows the time and below that there's just a simple counter. Notice that when the meter directly above MTRTime is hidden, then the Y value for MTRTime goes to zero.

Does anyone know a way around this? Am I missing something? Is there any way to make sure that a meter is positioned relative to the last VISIBLE meter?

I hope this makes sense.

Code: Select all

; Looking for solution to relative X problem.

[Rainmeter]
Author=Formidable
AppVersion=1.0
Update=1000

[Variables]
Color1=255, 255, 255, 255
ColorPlaceHolder=0,0,0,0
FontText=Ariel
FontHeightText=35
AntiAlias=1
MarginLeft=20

;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
; Measures
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[MSRTimer]
Measure=Calc
Formula=Counter%10

[MSRTimer01]
Measure=Calc
Formula=Counter%10
IfBelowAction=!RainmeterHideMeter MTRTest01
IfBelowValue=5
IfAboveAction=!RainmeterShowMeter MTRTest01
IfAboveValue=5

[MSRTimer02]
Measure=Calc
Formula=Counter%10
IfBelowAction=!RainmeterShowMeter MTRTest02
IfBelowValue=5
IfAboveAction=!RainmeterHideMeter MTRTest02
IfAboveValue=5

[MSRTime]
Measure=Time
Format="%I:%M"

;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
; Meters
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


[MTRTest01]
Meter=STRING
Text=TEST01

x=0
y=0

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

[MTRTest02]
Meter=STRING
Text=TEST02

x=0
y=0

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

; ------------------------------
; If the following meter is included as 
; a placeholder, then MTRTime will appear
; at the appropriate place.   The placeholder
; Meter is entirely invisible.  
; Using placeholders gets cumbersome, howerver
; if there's more than one meter in a column
; that will be shown/hidden.
; [MTRPlaceHolder]
; Meter=STRING
; Text=XX

; x=0
; y=0

; StringStyle=NORMAL
; StringAlign=LEFT
; FontColor=0,0,0,0
; FontSize=#FontHeightText#
; FontFace=#FontText#
; AntiAlias=1
; -------------------------------
[MTRTime]
MeasureName=MSRTime
Meter=STRING
x=0
y=R

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

[MTRCounter]
Meter=STRING
MeasureName=MSRTimer
Prefix=Count:
x=0
y=R

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1
User avatar
bhadkow
Posts: 36
Joined: May 5th, 2009, 7:28 am

Re: Y Position not relative to last VISIBLE meter

Post by bhadkow »

Formidable wrote:When displaying one meter below another I use the y=R option.
This only seems to work if the meter listed directly above in the ini file is visible.
If I'm creating a skin where one or more meters may conditionally be hidden, then the meter listed directly below a hidden meter will position itself as if y=0.

In the simple example below, there are two STRING meters named MTRTest01 and MTRTest02. Every few seconds, one is visible and the other is hidden. The next meter shows the time and below that there's just a simple counter. Notice that when the meter directly above MTRTime is hidden, then the Y value for MTRTime goes to zero.

Does anyone know a way around this? Am I missing something? Is there any way to make sure that a meter is positioned relative to the last VISIBLE meter?

I hope this makes sense.

Code: Select all

; Looking for solution to relative X problem.

[Rainmeter]
Author=Formidable
AppVersion=1.0
Update=1000

[Variables]
Color1=255, 255, 255, 255
ColorPlaceHolder=0,0,0,0
FontText=Ariel
FontHeightText=35
AntiAlias=1
MarginLeft=20

;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
; Measures
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[MSRTimer]
Measure=Calc
Formula=Counter%10

[MSRTimer01]
Measure=Calc
Formula=Counter%10
IfBelowAction=!RainmeterHideMeter MTRTest01
IfBelowValue=5
IfAboveAction=!RainmeterShowMeter MTRTest01
IfAboveValue=5

[MSRTimer02]
Measure=Calc
Formula=Counter%10
IfBelowAction=!RainmeterShowMeter MTRTest02
IfBelowValue=5
IfAboveAction=!RainmeterHideMeter MTRTest02
IfAboveValue=5

[MSRTime]
Measure=Time
Format="%I:%M"

;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
; Meters
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


[MTRTest01]
Meter=STRING
Text=TEST01

x=0
y=0

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

[MTRTest02]
Meter=STRING
Text=TEST02

x=0
y=0

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

; ------------------------------
; If the following meter is included as 
; a placeholder, then MTRTime will appear
; at the appropriate place.   The placeholder
; Meter is entirely invisible.  
; Using placeholders gets cumbersome, howerver
; if there's more than one meter in a column
; that will be shown/hidden.
; [MTRPlaceHolder]
; Meter=STRING
; Text=XX

; x=0
; y=0

; StringStyle=NORMAL
; StringAlign=LEFT
; FontColor=0,0,0,0
; FontSize=#FontHeightText#
; FontFace=#FontText#
; AntiAlias=1
; -------------------------------
[MTRTime]
MeasureName=MSRTime
Meter=STRING
x=0
y=R

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

[MTRCounter]
Meter=STRING
MeasureName=MSRTimer
Prefix=Count:
x=0
y=R

StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

i think i have a solution , but its a bit odd...., so here it goes,..

1) create another meter (anything , be it text, line etc etc ..your wish) ,
2) for the 'color' give a transperant color,
3) then give this meter's x, y same as those for the that hides conditionally,
4) next everything is the same as remaining code.

so irrespective of the 'hiding' meter posiion values u will have the required position of all the meters.
u can even use some background transperant image as this 'temporary meter' or a simple text meter with text = . (a dot!!) with small font size..... etc etc (there are many options!!)

ps: its only simplest thing i could think of :D ( i dont think there's any other way around this or..., may be i am wrong!! but it's one solution:))
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Y Position not relative to last VISIBLE meter

Post by Chewtoy »

[MeterImageThingy]
Meter=Image
X=0
Y=0
W=10
H=#FontHeightText#

[MTRTest01]
Meter=STRING
Text=TEST01
x=r
y=r
StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1

[MTRTest02]
Meter=STRING
Text=TEST02
x=r
y=R
StringStyle=NORMAL
StringAlign=LEFT
FontColor=#Color1#
FontSize=#FontHeightText#
FontFace=#FontText#
AntiAlias=1


That should work... I think...
I don't think, therefore I'm not.
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Y Position not relative to last VISIBLE meter

Post by dragonmage »

I'm pretty sure you need a number to go along with your R
sgtevmckay

Re: Y Position not relative to last VISIBLE meter

Post by sgtevmckay »

Agreed, even if that number is a "0"
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Y Position not relative to last VISIBLE meter

Post by Chewtoy »

dragonmage wrote:I'm pretty sure you need a number to go along with your R
Nope. You don't. I'm using a simple R (without a number ie 0R, 1R, 2R etc.) in most of my skins.
I don't think, therefore I'm not.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Y Position not relative to last VISIBLE meter

Post by jsmorley »

I guess Y=r would be the same thing as Y=0r
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Y Position not relative to last VISIBLE meter

Post by Chewtoy »

jsmorley wrote:I guess Y=r would be the same thing as Y=0r
It is indeed.
X=r == X=0r
X=R == X=0R
Y=r == Y=0r
Y=R == Y=0R
I don't think, therefore I'm not.
Formidable
Posts: 6
Joined: June 24th, 2009, 7:24 pm

Re: Y Position not relative to last VISIBLE meter

Post by Formidable »

Thank you for all your posts, but so far there's no solution. I've tried using a placeholder and I've included one in the code I posted (It's commented out). That will work, but only once. If another appearing/disappearing meter is put below the placeholder, the problem starts all over again and another placeholder won't help.

Is this a design flaw in Rainmeter?
User avatar
bhadkow
Posts: 36
Joined: May 5th, 2009, 7:28 am

Re: Y Position not relative to last VISIBLE meter

Post by bhadkow »

Formidable wrote:Thank you for all your posts, but so far there's no solution. I've tried using a placeholder and I've included one in the code I posted (It's commented out). That will work, but only once. If another appearing/disappearing meter is put below the placeholder, the problem starts all over again and another placeholder won't help.

Is this a design flaw in Rainmeter?
its not a 'flaw' , rainmeter is not coded to do certain things thats all , hopefully it may be resolved in future builds.
and regarding your question like i said u need to use another meter after your 'appearing/disappearing meter' with same x,y values as your 'appearing/disappearing meter' inorder to achieve what you want. if you can post a picture of what you are doing and what you wanted may be i can help you out. post your picture of your screen with and without your 'appearing/disappearing meter'