It is currently May 5th, 2024, 10:50 pm
@include and relative positioning
-
- Posts: 185
- Joined: December 4th, 2009, 2:05 am
@include and relative positioning
Hello all.I was wondering if someone could explain what is happening in this code as the @Include statements are not acting as i had expected them to.
With the red meters being the contents of the two Included files,I had expected them to be positioned relative to each of the image meters they follow,but the meters from the first include are positioning themselves relative to Image02 and the those of the second Include,positioning themselves relative to the first include.Obviously my understanding of how @Include works is wrong,so how does it work?
-
- Posts: 36
- Joined: February 1st, 2011, 6:35 pm
Re: @include and relative positioning
Code: Select all
;===========================================
; Rainmeter configuration file
;===========================================
[Rainmeter]
Author=Crish29
Update=1000
;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins
[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=
;End of added Metadata
[Variables]
@Include=#CURRENTPATH#Inc1.inc
@Include1=#CURRENTPATH#Inc2.inc
; [Meters]
[Image01]
Meter=Image
Solidcolor=0,0,0,100
X=0
Y=0
W=200
H=65
[String_0_1]
Meter=String
MeterStyle=Style1
StringAlign=Center
X=100r
Y=30r
Text=Test01
[String_0_2]
Meter=String
MeterStyle=Style1
StringAlign=Center
X=-70r
Y=r
Text=01
[String_0_3]
Meter=String
MeterStyle=Style1
StringAlign=Center
X=140r
Y=r
Text=02
[Image02]
Meter=Image
Solidcolor=0,0,0,100
X=250
Y=0
W=200
H=65
[String_1_1]
Meter=String
MeterStyle=Style2
StringAlign=Center
X=100r
Y=30r
Text=Test02
[String_1_2]
Meter=String
MeterStyle=Style2
StringAlign=Center
X=-70r
Y=r
Text=01
[String_1_3]
Meter=String
MeterStyle=Style2
StringAlign=Center
X=140r
Y=r
Text=02
end of skin.
@Include=#CURRENTPATH#Inc1.inc
[Style1]
FontColor=255,255,255,200
FontFace=Calibri
FontSize=8
AntiAlias=1
Hidden=0
@Include1=#CURRENTPATH#Inc2.inc
[Style2]
FontColor=255,255,255,200
FontFace=Calibri
FontSize=8
AntiAlias=1
Hidden=0
You do not have the required permissions to view the files attached to this post.
Last edited by crish29 on February 11th, 2011, 12:39 pm, edited 1 time in total.
-
- Posts: 185
- Joined: December 4th, 2009, 2:05 am
Re: @include and relative positioning
I'm sorry but i dont understand the point you are trying to make in your post.As far as i understood,@include can be used under any section,I am therefore trying to understand why the 3 string meters included in each of the 2 included files are not positioning themselves relative to the meter they are placed after.
-
- Posts: 36
- Joined: February 1st, 2011, 6:35 pm
Re: @include and relative positioning
not really understand what you mean by positioning?., and the second thing., @Include=#CURRENTPATH#Inc1.inc must be place under variables and in order @include and @include1 ... so on
@Include=#CURRENTPATH#Inc1.inc
@Include1=#CURRENTPATH#Inc2.inc
@Include=#CURRENTPATH#Inc1.inc
@Include1=#CURRENTPATH#Inc2.inc
Last edited by crish29 on February 11th, 2011, 1:29 pm, edited 1 time in total.
-
- Posts: 185
- Joined: December 4th, 2009, 2:05 am
Re: @include and relative positioning
@include can be used under any [section],it does not have to be under [variables].A numerical postfix is only needed if i have more then 1 @include statement under the same section.As for "positioning",what i mean is that the 3 string meters in each of the @include inc files,all use X=r (relative positioning),yet they are not positioning themselves relative to the [Image#] section they are placed after.
-
- Posts: 366
- Joined: November 12th, 2009, 4:47 pm
- Location: Ukraine
Re: @include and relative positioning
intresting...but at first look it should work...
Maybe you forgot to add [Variables] in .inc file
and maybe try to add "2" to your second @include (i.e. @include2=.....)
i will look at it deeper...
..or just use it like crish29 suggested using Styles...
Maybe you forgot to add [Variables] in .inc file
and maybe try to add "2" to your second @include (i.e. @include2=.....)
i will look at it deeper...
..or just use it like crish29 suggested using Styles...
-
- Posts: 36
- Joined: February 1st, 2011, 6:35 pm
Re: @include and relative positioning
@include can be used under any [section],it does not have to be under [variables].A numerical postfix is only needed if i have more then 1 @include statement under the same section
yes you are right @include can be used under any [section],it does not have to be under [variables]
~Faradey~ Do not laugh. i make mistakes. I am not perfect
yes you are right @include can be used under any [section],it does not have to be under [variables]
~Faradey~ Do not laugh. i make mistakes. I am not perfect
-
- Posts: 185
- Joined: December 4th, 2009, 2:05 am
Re: @include and relative positioning
Hi there Fareday,there seems to be some confusion here as to what it is i am trying to achieve so I'll try to explain in full.The sample code i provided above is simplified from something i am working on.It is a dock with a user selected number of tabs on it and the user chooses what information each tab shows,mail,system etc,etc and that is where the @include statements come in.Each @include(the "Inc1.inc" in the sample above being replaced by a variable) links to an inc file containing nothing more then a few string meters and measures.So putting [variables] in the inc is not required and the numerical postfix makes no difference either.I just don't understand why the relevant positioning is messed up.
-
- Developer
- Posts: 318
- Joined: July 14th, 2009, 5:57 pm
Re: @include and relative positioning
@include files are not "inserted" into the skin in the way you are assuming, they are read after the main file, and hence will appear as if the are at the end of the skin.
I don't think there is any way round it I'm afraid.
I don't think there is any way round it I'm afraid.
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Quis custodiet ipsos custodes?
-
- Posts: 185
- Joined: December 4th, 2009, 2:05 am
Re: @include and relative positioning
That explains it alright.Ah well,suppose i'll have to find another route.Thanks for explaining it.Do you know if it is possible to import the value of a measure from one skin to another.@include="someconfig [section]",would be sweet:)