ShopDreamUp AI ArtDreamUp
Deviation Actions
One of Rainmeter's most useful feature for suite creation is the include statement. This single line allows all the skins across your future suite to share the same exact code, allowing global changes with just the edit of one file. It also cuts down on redundant code.
The most common use of include is global variables. This allows a user (or developer) to customize or change the variables of the suite easily. It also works very well with RainConfigure (or similar program).
But it's more powerful than that. Styles and measures can be used too. Meters can also be used, but they are rendered last, making them on top of everything else. I wouldn't recommend using meters.
Without further ado, sample skin(s)!
Download the .rmskin file to see how everything is set up. These two very simple skins show how to use multiple include statements and demonstrates using Variables and Styles. include measures aren't used for simplicity of the code.
These text files and skin files are in a folder called AtInclude. Subfolder are CPU and RAM where the respective skins are. include files are in the main directory.
include:
This is the contents of Variables.txt. Obviously, this is just like how variables would be used in any Rainmeter skin. Don't forget to use [Variables].
@include2:
This is Style.txt. It contains the heart and soul of these two little skins--The Text. Both of these include files could be combined into one.
SKIN 1: CPU
I'm using DynamicWindowSize because Rainmeter was displaying double digit CPU usage incorrectly and that fixed the problem.
This is how you use multiple include files. Of course you can use @include3, etc.
This used the [Text] style from Style.txt. All the code in the include statements are used as if they are written in the skin's .ini file. So this allows [Text] to use the variables in Variables.txt.
SKIN 2: RAM
This is basically identical to the CPU so I won't rehash what's going on. It's just included to demonstrate using the same include statements in multiple skins.
TIPS and TRICKS
include statements can be included in files are used in include statements. Nested include statements if you will. I've used this and Nircmd to switch visual styles in Seclorum by switching the nested include path. A current skins I'm using will include multiple languages using this method.
I've also used a file to parse a variables file so I could perform calculations on the font colors to create automatic hover colors. Convoluted and unnecessary, yes. Cool, definitely.
PS: Make suggestions. Ask questions. Give me ideas for future workshops. Please!
Varelse42
The most common use of include is global variables. This allows a user (or developer) to customize or change the variables of the suite easily. It also works very well with RainConfigure (or similar program).
But it's more powerful than that. Styles and measures can be used too. Meters can also be used, but they are rendered last, making them on top of everything else. I wouldn't recommend using meters.
Without further ado, sample skin(s)!
Download the .rmskin file to see how everything is set up. These two very simple skins show how to use multiple include statements and demonstrates using Variables and Styles. include measures aren't used for simplicity of the code.
These text files and skin files are in a folder called AtInclude. Subfolder are CPU and RAM where the respective skins are. include files are in the main directory.
include:
This is the contents of Variables.txt. Obviously, this is just like how variables would be used in any Rainmeter skin. Don't forget to use [Variables].
[Variables]
FONT=Trebuchet MS
SIZE=12
COLOR=255,255,255
@include2:
This is Style.txt. It contains the heart and soul of these two little skins--The Text. Both of these include files could be combined into one.
[Text]
SolidColor=0,0,0,1
StringStyle=Normal
StringAlign=Left
FontColor=#COLOR#
FontSize=#SIZE#
FontFace=#FONT#
AntiAlias=1
SKIN 1: CPU
I'm using DynamicWindowSize because Rainmeter was displaying double digit CPU usage incorrectly and that fixed the problem.
[Rainmeter]
Update=1000
DynamicWindowSize=1
This is how you use multiple include files. Of course you can use @include3, etc.
include=#SKINSPATH#TutorialsAtIncludeStyle.txt
@include2=#SKINSPATH#TutorialsAtIncludeVariables.txt
[MeasureCPU]
Measure=CPU
This used the [Text] style from Style.txt. All the code in the include statements are used as if they are written in the skin's .ini file. So this allows [Text] to use the variables in Variables.txt.
[CpuText]
MeasureName=MeasureCPU
Meter=String
MeterStyle=Text
Text=CPU: %1
SKIN 2: RAM
This is basically identical to the CPU so I won't rehash what's going on. It's just included to demonstrate using the same include statements in multiple skins.
[Rainmeter]
Update=1000
include=#SKINSPATH#TutorialsAtIncludeStyle.txt
@include2=#SKINSPATH#TutorialsAtIncludeVariables.txt
[MeasureRAM]
Measure= PhysicalMemory
[RamText]
MeasureName=MeasureRAM
Meter=String
MeterStyle=Text
Text=RAM: %1
Percentual=1
TIPS and TRICKS
include statements can be included in files are used in include statements. Nested include statements if you will. I've used this and Nircmd to switch visual styles in Seclorum by switching the nested include path. A current skins I'm using will include multiple languages using this method.
I've also used a file to parse a variables file so I could perform calculations on the font colors to create automatic hover colors. Convoluted and unnecessary, yes. Cool, definitely.
PS: Make suggestions. Ask questions. Give me ideas for future workshops. Please!
Varelse42
[Skin of the Season] Winter 2014 Congrats!!!
Congratulations goes to evertonstz (https://www.deviantart.com/evertonstz) for winning Skin of the Season Winter 2014 with July Flat'ish 2.0!
:thumb429262245:
smurfier (https://www.deviantart.com/smurfier)
[Skin of the Season] Winter 2014 [closed]
It's time for the first Skin of the Season contest of 2014!
Go out and find your favorite skins that were submitted between January 1st and March 31st and post a link in the comments below. Don't forget to follow the rules.
smurfier (https://www.deviantart.com/smurfier)
Nominations
:thumb436188595::thumb434252934::thumb430395868::thumb442236472::thumb429262245::thumb431759790::thumb429361340:
[Skin of the Season] Holidays 2013 Congrats!!!
Congratulations goes to ActiveColors (https://www.deviantart.com/activecolors) for winning Skin of the Season Holidays 2013 with Work Launcher 1.3!
:thumb420195198:
smurfier (https://www.deviantart.com/smurfier)
[Skin of the Season] Holidays 2013 [closed]
It's time to finish out the 2013 year with the last of the Skin of the Season contests.
As always please post your nominations below. All skins must have been submitted between October 1st to December 31st 2013. The nomination period will end February 1st. Also, don't forget, no nominating your own skins.
smurfier (https://www.deviantart.com/smurfier)
Nominations
:thumb420195198::thumb414621206::thumb414280551::thumb404942566::thumb410080356::thumb406692600:
Featured in Groups
© 2010 - 2024 Rainmeter
Comments6
Join the community to add your comment. Already a deviant? Log In
Very nice tutorial / workshop. Good idea. If you are interested, I would like to also put these workshops up in the Tip and Tricks area of the main Rainmeter documentation. My thinking would be to put up the older one as soon as you put up new one, so it can be have maximum exposure here, and then offered to the additional audience on the main site and kept handy for future reference after a new one is released.
Up to you guys, glad to have this excellent info on the main site if you are interested.
Up to you guys, glad to have this excellent info on the main site if you are interested.