AveryNightshade wrote: ↑January 27th, 2023, 9:38 am
So I'm not able to use only certain sections of the code in my variables, for example, if I had a different section in the same variables.inc. Keep them in separate .inc files?
If I am understanding your question correctly, you are asking if you can use different sections within an @Include file? The answer is yes! You just want variables in a section called [Variables] (just like a regular skin).
Think of @include files as an extension of the skin. The code is the same. There is no special way to refer to any variable or section (measure, meter, or meter style) when used in the main skin, or in the @include file. When the skin is read and encounters the @Include option, it immediately opens the @Include file, and reads its contents. This part is important to understand because the order of measures and meters can be important.
So any variables you want to define, need to be a section called [Variables] regardless of which file they are defined (also, each @Include file can have their own [Variables] section, just note that in case of duplicated variables, the first defined variable in order of being read is considered the "real" variable). You can also place measures, meters, and meter styles in @Include files if you want - but you refer to those items just same as you would if they were all defined in the skin itself.
You can use @Include to group similar variables or sections used in separate skins to cut down on repetitive code. It can also help organize bits of code that pertain to one another, so you don't have to hunt around your main skin code to find them. For example, a spectrum analyzer skin might put all the variables and AudioLevel measures in an @Include file to keep all the similar stuff in one place.
Hopefully that all makes sense.
Here is a helpful guide on @Include files:
https://docs.rainmeter.net/tips/include-guide/
-Brian