Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 906

Help: Rainmeter Skins • Re: Calculating the text width

$
0
0
Hello, I have a general question about the Textfield and #CRLF#. I actually wanted to help someone with a skin, but I noticed that the Textfield records #CRLF# when I type, but ignores its meaning.

When I enter text into the textfield, it simply records it like this:
Long#CRLF#Text

Only when the skin is refreshed is this string correctly resolved by the String Meter. Why is this? :oops: Or is there still somthing missing? :confused:

Klick to play the GIF
ezgif-53823693ab4853.gif

Code-below:
-> Simply click on the text to enter it into the text field.
-> Text can be enlarged or reduced using the mouse scroll function.

Code:

[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1[Variables]FontSz=60MyText=Long#CRLF#Text ;==================================================================; #BASE#BASE#BASE#BASE;==================================================================;[Background]Meter=ShapeShape=Rectangle 0,0,([DisplayText:W]+15),([DisplayText:H]+10),10 | Fill Color 0,0,0,1 | StrokeWidth 2 | Stroke Color 0,0,0,1AntiAlias=1DynamicVariables=1MouseScrollUpAction=[!SetVariable FontSz "(Clamp((#FontSz#+1),50,200))"][!UpdateMeter *][!Redraw]MouseScrollDownAction=[!SetVariable FontSz "(Clamp((#FontSz#-1),50,200))"][!UpdateMeter *][!Redraw];===========================================================================[DisplayText]Meter=StringFontFace=ArialFontStyle=BOLDFontSize=[#FontSz]FontColor=255,255,255,255SolidColor=0,0,0,1InlineSetting=Shadow | 1 | 1 | 2 | 0,0,0,255X=8Y=5StringEffect=BorderFontEffectColor=0,0,0,255Text=[#MyText]DynamicVariables=1AntiAlias=1LeftMouseUpAction=[!CommandMeasure TextField "ExecuteBatch All"][TextField]Measure=PluginPlugin=InputTextX=([DisplayText:X])Y=([DisplayText:Y])W=([DisplayText:W])H=([DisplayText:H])FontSize=(#FontSz#/2)FontColor=255,255,255,255SolidColor=64,64,64,255AntiAlias=1FocusDismiss=1DefaultValue=""Command1=[!SetVariable MyText "$UserInput$"][!WriteKeyValue Variables MyText "[TextField]"] DefaultValue=[#MyText]Command2=[!UpdateMeter DisplayText][!UpdateMeter Background][!Redraw]OnDismissAction=[!UpdateMeter DisplayText][!UpdateMeter Background][!Redraw]DynamicVariables=1Hidden=1
Thank you for your attention, your knowledge and your contribution :rosegift: :great: :bow:

Statistics: Posted by Rooky_89 — Yesterday, 9:42 pm



Viewing all articles
Browse latest Browse all 906

Trending Articles