It is currently April 27th, 2024, 2:15 pm

[Help] Input box and write key value

Get help with creating, editing & fixing problems with skins
Lightz39
Posts: 98
Joined: August 1st, 2012, 12:48 am

[Help] Input box and write key value

Post by Lightz39 »

Hey there, so basically on my weather tile I would like to have it so the user clicks the location and it gives them a box to type in. You type your location code and it changes the location. I got everything working up to setting the new variable. The box appears, you type in it, you press enter, the skin refreshes but the location code is untouched.

My variables section, the location code is used in the rss url

Code: Select all

[Variables]
LocationCode=CAXX0802
Unit=m
My input measure

Code: Select all

[mInput]
Measure=Plugin
Plugin=InputText
SolidColor=FFFFFF
FontColor=646464
FontFace=Myriad Apple
FontSize=10
DefaultValue="Enter Location Code"
FocusDismiss=1
Command1=!WriteKeyValue Variables LocationCode $UserInput$
Command2=!Refresh #CURRENTCONFIG#
W=100
H=20
X=5
Y=5
The text you click to bring up the input box

Code: Select all

[Location]
Meter=String
MeterStyle=sLocation
MeasureName=mLocation
SolidColor=0,0,0,1
LeftMouseUpAction=!CommandMeasure "mInput" "ExecuteBatch 1-2"
X=5
Y=5
Any help would be appreciated. NOTE: The example skin in the database doesn't even work. The write key value doesn't do anything only the set variable does. http://rainmeter.net/cms/Plugins-InputText
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Help] Input box and write key value

Post by Kaelri »

You need to specify the file to be written to.

I also find it helps to put user input parameters in quotes, just in case.

Code: Select all

Command1=!WriteKeyValue Variables LocationCode "$UserInput$" "#CURRENTPATH##CURRENTFILE#"
Lightz39
Posts: 98
Joined: August 1st, 2012, 12:48 am

Re: [Help] Input box and write key value

Post by Lightz39 »

Excellent, thank you. Just a note you might want to or get someone that can edit the example skin on the support page. I didn't name my config file the same as they did which caused it to not work and I didn't notice until now. Maybe swtich it from the name to #CurrentFile#
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Help] Input box and write key value

Post by Kaelri »

Lightz39 wrote:Just a note you might want to or get someone that can edit the example skin on the support page. I didn't name my config file the same as they did which caused it to not work and I didn't notice until now. Maybe swtich it from the name to #CurrentFile#
Done. Thanks for bringing this to our attention. :)