It is currently May 2nd, 2024, 8:43 am

Using InputText and .inc files?

General topics related to Rainmeter.
Riboe
Posts: 25
Joined: March 12th, 2011, 11:39 pm

Using InputText and .inc files?

Post by Riboe »

I'm trying to create a skin to control various settings of other skins, like in Kaelri's Enigma package.

So after experimenting a bit, I came to the conclusion that the best way to do this, was to create a skin which loads different .inc files, depending on which 'page' the config skin is on. This seems to be the same way that Kaelri has done it in his package.

My problem is this: the InputText plugin doesn't seem to work when used in a .inc file (Appearance.inc in this case). It just won't do anything when clicking on it on the skin. The weird thing is, I'm sure it worked a couple of days ago when I started working on it.
Removing @Include3=.... from Config.ini and copying the contents of Appearance.inc into Config.ini, will make everything work.


Anything below this line is only to clarify my problem and if you've already understood it, there's no need to continue reading.

In case I haven't made myself clear, you're welcome to take a look at my code and hopefully you'll understand what I'm trying to do and what my problem is.

Here's my code: (I've left out some of the unrelated code..)
Config.ini (Displays background and will have buttons to change the #CurrentTab# variable in ConfigVariables.inc.. CurrentTab in this case is Appearance.inc)

Code: Select all

[Variables]
@Include1=#Skinspath#/Yuna/Variables.inc
@Include2=#Skinspath#/Yuna/ConfigVariables.inc
@Include3=#Skinspath#/Yuna/_Resources/ConfigFiles/#CurrentTab#.inc

[Background]
Meter=IMAGE
SolidColor==0,0,0,155
W=300
H=450

[CloseButton]
Meter=IMAGE
ImageName=#CurrentPath#/Images/Close.png
ImageTint=#SecondColorConfig#
LeftMouseDownAction=!Execute [!RainmeterDeactivateConfig]
AntiAlias=1
PreserveAspectRatio=1
W=11
ToolTipTitle=Close
ToolTipText=Click to close this screen.
X=279
Y=10
Appearance.inc (Loaded by Config.ini and used to actually change the variables in ConfigVariables.inc)

Code: Select all

[FontLabel]
Meter=STRING
FontColor=#SecondColorConfig#
FontSize=#Config.iniMainSize#
FontFace=#FontConfig#
AntiAlias=1
StringEffect=#OutlineConfig#
FontEffectColor=#OutlineColorConfig#
StringAlign=#ConfigAlign#
Text=Font
X=145
Y=90

[Input_Font]
Measure=Plugin
Plugin=InputText.dll
SolidColor=0,0,0,255
FontColor=#MainColorConfig#
FontFace=#FontConfig#
FontSize=#Config.iniMainSize#
X=150
Y=90
H=15
W=130
DefaultValue=#Font#
Command1=!WriteKeyValue Variables Font "$UserInput$" "#Skinspath#/Yuna/ConfigVariables.inc"
Command2=!Refresh #CURRENTCONFIG#

[Output_Font]
Meter=String
X=150
Y=90
FontSize=#Config.iniMainSize#
FontColor=#MainColorConfig#
FontFace=#FontConfig#
AntiAlias=1
Text=#Font#
LeftMouseUpAction=!RainmeterPluginBang "Input_Font ExecuteBatch 1-2"
ConfigVariables.inc (Contains some variables that are supposed to be changed by the Config.ini and Appearance.inc)

Code: Select all

[Variables]

Font=Trebuchet MS
Size=8

CurrentTab=Appearance
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Using InputText and .inc files?

Post by Kaelri »

This is a known issue. It's why I keep my InputText measures in my main Options.ini, rather than the "page" .inc files (which is what I, like you, would really prefer).

As far as I know, however, this has not been possible at any point since InputText was introduced. If you could recreate the older version of your skin in which it seemed to be working, it would be extremely helpful for diagnosing and solving the problem.
Riboe
Posts: 25
Joined: March 12th, 2011, 11:39 pm

Re: Using InputText and .inc files?

Post by Riboe »

I think I have 2 or 3 older versions of my skin somewhere.

I'm at school right now, so I'll take a look at them, either during one of my breaks or when I get home.

Also, thanks for the tip about keeping the InputText measures in the main Config.ini file.
Riboe
Posts: 25
Joined: March 12th, 2011, 11:39 pm

Re: Using InputText and .inc files?

Post by Riboe »

Okay, so now I've been looking through my 3 older versions of the skin, but none of them were using "page" .inc files when I created them... I then tried to recreate the skin in the state where it seemed to be working, but I had no luck. :-(

Anyway, thanks for the info, Kaelri. Hopefully this will be solved at some time in the future, and I'm sorry for not being able to help.


P.S: I'll keep trying for a few more days, and if I manage to get it working, I'll PM you. :-)