It is currently April 17th, 2024, 1:07 pm

Spaces in [Measure Names] \ [Meter Names]

Report bugs with the Rainmeter application and suggest features.
User avatar
GHOST®
Posts: 55
Joined: March 11th, 2011, 6:33 pm
Location: Garden City, MI

Spaces in [Measure Names] \ [Meter Names]

Post by GHOST® »

I Sware I read sumwhere when I first got into Rainmmeter 6 months or so ago, that spaces in Measure\Meter names should not be used\ were not allowed, ie they would keep the Measure from firing\Meter from showing etc?? I think I even recall doing this once or thrice when I first started tweaking.
ANYWAYS,ever tweaking one of my skins and noticed this goof up, but the skin still ran fine, with no error reports in About.

[MSUR_Adapter 0]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=0
Substitute="":"unavailable", "(R)":"®", "(TM)":"™", "(C)":"©"

[MSUR_Adapter 1]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=1
Substitute="":"unavailable", "(R)":"®", "(TM)":"™", "(C)":"©"

;<><><><><><><><><><><><><>

[Adapter0_Txt]
Meter=STRING
MeterStyle=STYL_Text_Cntr | STYL_Title | STYL_Font13
Text="• Adapter 0 •"
Y=( #Skn_CntrY# - 74 )
Hidden=#Calc_SknHigh#

[Adapter0_MSUR]
Meter=STRING
MeterStyle=STYL_Text_Cntr | STYL_Text
MeasureName=MSUR_Adapter 0
Y=-1R
W=135
H=30
ClipString=1
Hidden=#Calc_SknHigh#

[Adapter1_Txt]
Meter=STRING
MeterStyle=STYL_Text_Cntr | STYL_Title | STYL_Font13
Text="• Adapter 1 •"
Y=R
Hidden=#Calc_SknHigh#

[Adapter1_MSUR]
Meter=STRING
MeterStyle=STYL_Text_Cntr | STYL_Text
MeasureName=MSUR_Adapter 1
Y=-1R
W=135
H=30
ClipString=1
Hidden=#Calc_SknHigh#

gets me this. . .
Spaced_Names.jpg
Sooo, I was just wondering if Ive been mistaken all this time, or has something changed, or is this a glitch and I should continue using _ In my Namings ??
You do not have the required permissions to view the files attached to this post.
"Do you want to be healed, now? Or would you prefer to bleed to death so I can try my hand at resurrection?"
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Spaces in [Measure Names] \ [Meter Names]

Post by jsmorley »

Personally, I would NOT use spaces in measure or meter names. It may work some places, and give you nothing but heartache in others, when using measure/meter names in Bangs or going back and forth from Lua. It's not worth the hassle of trying to always figure out how you need to "quote" things so they work right.

Generally speaking, I don't use white space where I don't need to use white space. Saves some head scratching later.

[Variables]
My Font Color=255,255,255,255

[Meter1]
Meter=String
FontColor=#My Font Color#

Might work, probably will. But why bother finding out where it doesn't...

[Variables]
My.Font.Color=255,255,255,255

Just as readable and no questions.
User avatar
GHOST®
Posts: 55
Joined: March 11th, 2011, 6:33 pm
Location: Garden City, MI

Re: Spaces in [Measure Names] \ [Meter Names]

Post by GHOST® »

jsmorley wrote:Personally, I would NOT use spaces in measure or meter names. It may work some places, and give you nothing but heartache in others, when using measure/meter names in Bangs or going back and forth from Lua. It's not worth the hassle of trying to always figure out how you need to "quote" things so they work right.

Generally speaking, I don't use white space where I don't need to use white space. Saves some head scratching later.

[Variables]
My Font Color=255,255,255,255

[Meter1]
Meter=String
FontColor=#My Font Color#

Might work, probably will. But why bother finding out where it doesn't...

[Variables]
My.Font.Color=255,255,255,255

Just as readable and no questions.
Right. Ive read similiar postings of yours in the past and while that all seemed to apply to the general body of a script, I was wondering mostly on [Measure Name] vs [Measure_Name]??

I tend to not use any white space at all and have always made sure my [Measures_Meters] NEVER had any white space. I was surprised that one got through and that it worked.

Anyways, if its not a bug, and its basically as I have learned reading through past posts, including your reply here, etc, then no biggie. I'll just continue to cover my arse with _ wherever needed and try not to let another missed one slip through. :o)

Thanks for the feedback.
"Do you want to be healed, now? Or would you prefer to bleed to death so I can try my hand at resurrection?"
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Spaces in [Measure Names] \ [Meter Names]

Post by poiru »

Just avoid spaces. It makes life complicated, especially with bangs. Consider the !DisableMeasure bang, for example:

!DisableMeasure MeasureName
-> Disables 'MeasureName' in current skin

!DisableMeasure Measure Name
-> Disables 'Measure' in the 'Name' skin

You could fix it with quotes, but that may not always work (e.g. with !PluginBang).