It is currently January 26th, 2021, 8:40 pm

Notes skin created by me not working

Help with creating, editing & fixing problems with skins
Tejas
Posts: 20
Joined: January 7th, 2021, 9:32 am

Notes skin created by me not working

Post by Tejas »

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]
User avatar
balala
Rainmeter Sage
Posts: 12112
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Notes skin created by me not working

Post by balala »

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.
User avatar
ikarus1969
Posts: 410
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Notes skin created by me not working

Post by ikarus1969 »

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]
User avatar
balala
Rainmeter Sage
Posts: 12112
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Notes skin created by me not working

Post by balala »

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
Posts: 20
Joined: January 7th, 2021, 9:32 am

Re: Notes skin created by me not working

Post by Tejas »

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]
Harshsrcc
Posts: 17
Joined: December 14th, 2020, 3:04 am

Re: Notes skin created by me not working

Post by Harshsrcc »

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
Posts: 20
Joined: January 7th, 2021, 9:32 am

Re: Notes skin created by me not working

Post by Tejas »

Whoa it works!!!!!!!! :D :D Am really grateful to you bro!!! :D
User avatar
balala
Rainmeter Sage
Posts: 12112
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Notes skin created by me not working

Post by balala »

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