It is currently April 24th, 2024, 9:18 pm
Get help with creating, editing & fixing problems with skins
Tejas
Post
by Tejas » January 7th, 2021, 10:16 am
Hye friends, I installed rainmeter just a week ago and created a skin for taking notes. When I click it a textbox appears and what I write is visible but after I press enter it disappears. Please help me out.
Here's the code :
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
CurrentInput=""
[Main]
Meter=String
Text=#CurrentInput#
H=120
W=200
FontSize=12
FontColor=170,170,170,255
SolidColor=47,47,47,255
Padding=5,6,5,5
AntiAlias=1
LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]
[MeasureInput]
Measure=Plugin
Plugin=InputText
W=200
H=125
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
FocusDismiss=1
DefaultValue=#CurrentInput#
OnDismissAction=[!SetVariable CurrentInput #CurrentInput#][Play "#@#Sounds\Dismiss.wav"]
Command1=[!SetVariable CurrentInput $UserInput$][!UpdateMeter *][!Redraw]
balala
Rainmeter Sage
Posts: 16168 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » January 7th, 2021, 11:03 am
Tejas wrote: ↑ January 7th, 2021, 10:16 am
When I click it a textbox appears and what I write is visible but after I press enter it disappears. Please help me out.
Just add a
DynamicVariables=1 option to the [Main] meter. It is needed because the meter uses a dynamically set variable (CurrentInput) and such variables require to set on this option.
ikarus1969
Posts: 571 Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria
Post
by ikarus1969 » January 7th, 2021, 11:11 am
additionally i would set $UserInput$ under double-quotes in the
Command1=... -line so that when you enter more than 1 word you don't get error-messages in the Log and everything is kept in the variable
Code: Select all
Command1=[!SetVariable CurrentInput "$UserInput$"][!UpdateMeter *][!Redraw]
balala
Rainmeter Sage
Posts: 16168 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » January 7th, 2021, 12:20 pm
ikarus1969 wrote: ↑ January 7th, 2021, 11:11 am
additionally i would set $UserInput$ under double-quotes in the
Command1=... -line so that when you enter more than 1 word you don't get error-messages in the Log and everything is kept in the variable
Code: Select all
Command1=[!SetVariable CurrentInput "$UserInput$"][!UpdateMeter *][!Redraw]
Right, correct. I missed this.
Tejas
Post
by Tejas » January 7th, 2021, 2:52 pm
Thanks for replying guys, but its still not working, any other mistakes?
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
DynamicVariables=1
[Variables]
CurrentInput=""
[Main]
Meter=String
Text=#CurrentInput#
H=120
W=200
FontSize=12
FontColor=170,170,170,255
SolidColor=47,47,47,255
Padding=5,6,5,5
AntiAlias=1
LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]
[MeasureInput]
Measure=Plugin
Plugin=InputText
W=200
H=125
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
FocusDismiss=1
DefaultValue=#CurrentInput#
OnDismissAction=[!SetVariable CurrentInput #CurrentInput#][Play "#@#Sounds\Dismiss.wav"]
Command1=[!SetVariable CurrentInput "$UserInput$"][!UpdateMeter *][!Redraw]
Morsmodre
Posts: 22 Joined: December 14th, 2020, 3:04 am
Post
by Morsmodre » January 7th, 2021, 3:10 pm
Tejas wrote: ↑ January 7th, 2021, 2:52 pm
Thanks for replying guys, but its still not working, any other mistakes?
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
DynamicVariables=1
[Variables]
CurrentInput=""
[Main]
Meter=String
Text=#CurrentInput#
H=120
W=200
FontSize=12
FontColor=170,170,170,255
SolidColor=47,47,47,255
Padding=5,6,5,5
AntiAlias=1
LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]
[MeasureInput]
Measure=Plugin
Plugin=InputText
W=200
H=125
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
FocusDismiss=1
DefaultValue=#CurrentInput#
OnDismissAction=[!SetVariable CurrentInput #CurrentInput#][Play "#@#Sounds\Dismiss.wav"]
Command1=[!SetVariable CurrentInput "$UserInput$"][!UpdateMeter *][!Redraw]
You have to add DynamicVariables=1to [Main], not [Rainmeter]
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
CurrentInput=""
[Main]
Meter=String
Text=#CurrentInput#
H=120
W=200
FontSize=12
FontColor=170,170,170,255
SolidColor=47,47,47,255
Padding=5,6,5,5
AntiAlias=1
LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]
DynamicVariables=1
[MeasureInput]
Measure=Plugin
Plugin=InputText
W=200
H=125
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
FocusDismiss=1
DefaultValue=#CurrentInput#
OnDismissAction=[!SetVariable CurrentInput #CurrentInput#][Play "#@#Sounds\Dismiss.wav"]
Command1=[!SetVariable CurrentInput "$UserInput$"][!UpdateMeter *][!Redraw]
Tejas
Post
by Tejas » January 7th, 2021, 3:12 pm
Whoa it works!!!!!!!!
Am really grateful to you bro!!!
balala
Rainmeter Sage
Posts: 16168 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » January 7th, 2021, 4:24 pm
Harshsrcc wrote: ↑ January 7th, 2021, 3:10 pm
You have to add DynamicVariables=1to [Main], not [Rainmeter]
Yep, a
DynamicVariables=1 option is supported only on measures and meters. It can't be used on the [Rainmeter] section. Details:
https://docs.rainmeter.net/manual/variables/#DynamicVariables