It is currently March 24th, 2019, 8:37 pm

Working with InputText

Our most popular Tips and Tricks from the Rainmeter Team and others
User avatar
fonpaolo
Moderator
Posts: 1351
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Working with InputText

fonpaolo » June 2nd, 2017, 8:51 am

While I was sure you know it, I prefer to not give anything for granted. ;-)
User avatar
rbriddickk84
Rainmeter Sage
Posts: 211
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Working with InputText

rbriddickk84 » June 2nd, 2017, 12:47 pm

fonpaolo wrote:While I was sure you know it, I prefer to not give anything for granted. ;-)
Yes, yes! :D And i appretiate it! :)
You never know, when you will realise some obvious thing, what you missed, and you took granted. :) :thumbup:

But yeah, i write in here, when i am absolutely clueless, and checked my things over and over thousand time. :) (even that i miss some obvious, basic things sometime :D ). Also i'm not a pro titled forumer here :) but i am working with Rainmeter more than 3 years now. I can focus really on one thing at a time to be good at, and i choose Rainmeter, but i would gladly help in here too. :D
User avatar
jsmorley
Developer
Posts: 19075
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Working with InputText

jsmorley » June 2nd, 2017, 1:11 pm

rbriddickk84 wrote:i'm not a pro titled forumer here :) but i am working with Rainmeter more than 3 years now. I can focus really on one thing at a time to be good at, and i choose Rainmeter, but i would gladly help in here too. :D
Raise your right hand and repeat after me...
User avatar
rbriddickk84
Rainmeter Sage
Posts: 211
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Working with InputText

rbriddickk84 » June 2nd, 2017, 1:17 pm

jsmorley wrote:Raise your right hand and repeat after me...
:great: (<- right hand raised...sort of :) )

OnCheckAction=[PlayLoop "rbriddickk84_oath.wav"] (<- repeat section :D )
J-Mo
Posts: 3
Joined: February 13th, 2019, 8:18 pm

Re: Working with InputText

J-Mo » February 22nd, 2019, 9:56 pm

Hello,

I'm working on a countdown timer that starts from a date/time input by the user rather than starting from the current time.
When I enter a time string such as "10:00", I get a popup that indicates windows is attempting to open an unknown file type. But when I enter a date (mm/dd/yy) or just a number, the popup doesn't happen. Any idea what's going on?


Here's the popup:
Capture.png

And here's some code:

Code: Select all

[MeterSetTimeLabel]
Meter=String
FontFace=System
FontSize=12
FontColor=255,255,100,255
Text="Chamber Start Time"
x=150
y=5
Hidden=1
Group=SetTimer

[MeterSetTimeValue]
Meter=String
FontFace=System
FontSize=12
FontColor=255,255,100,255
Text=hh:mm
x=150
y=25
Hidden=1
Group=SetTimer
LeftMouseUpAction= [!HideMeter MeterSetTimeValue][!CommandMeasure MeasureTimeInput "ExecuteBatch 1"]

[MeasureTimeInput]
Measure=Plugin
Plugin=InputText
x=150
y=45
SolidColor=200,200,200,200
StringAlign=CenterCenter
W=100
H=50
FontFace=System
FontSize=18
FontColor=0,0,0,255
AntiAlias=1
Hidden=1
Command1=["$UserInput$"][!ShowMeter MeterTimeInput]

[MeterTimeInput]
Meter=string
FontFace=System
FontSize=12
FontColor=255,255,100,255
MeasureName=MeasureTimeInput
x=150
y=25
Hidden=1
Group=Values
LeftMouseUpAction= [!HideMeter MeterTimeInput][!CommandMeasure MeasureTimeInput "ExecuteBatch 1"]
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 7912
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Working with InputText

balala » February 23rd, 2019, 7:46 am

J-Mo wrote:
February 22nd, 2019, 9:56 pm
When I enter a time string such as "10:00", I get a popup that indicates windows is attempting to open an unknown file type. But when I enter a date (mm/dd/yy) or just a number, the popup doesn't happen. Any idea what's going on?
Not exactly sure, but even if you enter a time, if you enter one with one single digit before the colon, this isn't going on, but if you're using two digits, it does.
However, there is a small mistake in the Command1 option of the [MeasureTimeInput] measure. Usually you don't have to execute what you've entered through the InputText plugin. In most cases you have to assign it / write it as a variable. Not having the whole code (because I think this isn't the whole code, probably there are some not posted parts of it), it is hard to tell what you should have to do, but probably something like: Command1=[!ShowMeter MeterTimeInput][!SetVariable SomeVariable "$UserInput$"], or Command1=[!ShowMeter MeterTimeInput][!WriteKeyValue Variables SomeVariable "$UserInput$"].
So, what's your intention with the entered value, how do you want to use it?