It is currently June 24th, 2019, 2:25 pm

Group Positioning

Help with creating, editing & fixing problems with skins
roguetrip
Posts: 22
Joined: March 11th, 2019, 5:42 pm

Group Positioning

roguetrip » March 16th, 2019, 4:33 pm

And on to my next question. LOL

I'm trying to figure a Easier way to set Y= positioning in my skin. I already have A meterstyle controlling the X= value.

I thought I could Group the meters and set a value but having diffulties.

Can you set a Group Y= position in the [Rainmeter] or [MeterStyle] sections using group or is it only for bang commands?

Code: Select all

[STYLE_RIGHT_BLUE] ;blue right justified 1st Parent
DynamicVariables=1
LeftMouseUpAction=[taskmgr.exe]
ToolTipText="Open Task Manager"
StringAlign=RIGHT
StringCase=NONE
StringStyle=BOLD
StringEffect=BORDER
FontEffectColor=#FEC1#
FontColor=#FC1#
FontFace=#Font2#
FontSize=#FS1#
AntiAlias=1
X=57
	
[STYLE_RIGHT_PINK] ;pink right justified 2nd Parent
;STYLE_RIGHT_BLUE | STYLE_RIGHT_PINK
StringAlign=RIGHT
StringStyle=NORMAL
FontEffectColor=#FEC2#
FontColor=#FC2#
FontSize=#FS2#
X=24r 
		
[STYLE_LEFT_BLUE] ;blue left justified 2nd Parent
;STYLE_RIGHT_BLUE | STYLE_LEFT_BLUE
StringAlign=LEFT
X=1r

[MeterLabelCPU]
Meter=STRING
MeterStyle=STYLE_RIGHT_BLUE
Text=#CPU#
Group=GCPU	
		
[MeterValueCPU]
Meter=STRING
MeterStyle=STYLE_RIGHT_BLUE | STYLE_RIGHT_PINK
MeasureName=Measure_CPU	
Group=GCPU		
		
[MeterLabelCPU_POST]
Meter=STRING
MeterStyle=STYLE_RIGHT_BLUE | STYLE_LEFT_BLUE
Text=%
Group=GCPU	
	
Tried in [Rainmeter] setion
[!SetOption GCPU Y "16"]
[!SetOption [GCPU:Y] "16"]

In MeterStyle section
([GCPU:Y]+16)

Also some otherstuff, never a error log though. :(
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group Positioning

balala » March 16th, 2019, 5:09 pm

roguetrip wrote:
March 16th, 2019, 4:33 pm
Can you set a Group Y= position in the [Rainmeter] or [MeterStyle] sections using group or is it only for bang commands?
In [Rainmeter] you can set the position of a meter or a group, using !SetOption bang, for example:

Code: Select all

[Rainmeter]
...
OnRefreshAction=[!SetOptionGroup MyGroup Y "25"][!UpdateMeterGroup "MyGroup"][!Redraw]
In a [MeterStyle] section, you can set the coordinates of meters, but all meters belonging to that group will get the set Y position.
roguetrip wrote:
March 16th, 2019, 4:33 pm
Tried in [Rainmeter] setion
[!SetOption GCPU Y "16"]
[!SetOption [GCPU:Y] "16"]
There are too less parameters in the [!SetOption [GCPU:Y] "16"] bang. !SetOption requires a section name, an option to be set and a value, which will be set to the previously typed option. But there are only two parameters: [GCPU:Y] and "16", which is not enough. Plus [GCPU:Y] is a section variable, which requires to set on the dynamic variables, but they are not allowed into the [Rainmeter] section.
[!SetOption GCPU Y "16"] is correct and will work, setting the Y position of the [GCPU] meter to 16.
roguetrip wrote:
March 16th, 2019, 4:33 pm
In MeterStyle section
([GCPU:Y]+16)
This will work if you set the dynamic variables, using the DynamicVariables=1 option (onto the same [MeterStyle] section, or on each meter which use the [MeterStyle] style).
roguetrip
Posts: 22
Joined: March 11th, 2019, 5:42 pm

Re: Group Positioning

roguetrip » March 16th, 2019, 5:43 pm

Major Thanks again for the help!

Your code in the [Rainmeter] section works fine. :great:


When adding the other code to the meterstyle it isn't working:

Code: Select all

 [STYLE_RIGHT_BLUE] ;blue right justified 1st Parent
DynamicVariables=1
LeftMouseUpAction=[taskmgr.exe]
ToolTipText="Open Task Manager"
StringAlign=RIGHT
StringCase=NONE
StringStyle=BOLD
StringEffect=BORDER
FontEffectColor=#FEC1#
FontColor=#FC1#
FontFace=#Font2#
FontSize=#FS1#
AntiAlias=1
X=57
[!SetOption GCPU Y "16"]

Tried also:
[!SetOptionGroup GCPU Y "16"]
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group Positioning

balala » March 16th, 2019, 5:56 pm

roguetrip wrote:
March 16th, 2019, 5:43 pm
Your code in the [Rainmeter] section works fine. :great:
:thumbup:
roguetrip wrote:
March 16th, 2019, 5:43 pm
When adding the other code to the meterstyle it isn't working:

Code: Select all

 [STYLE_RIGHT_BLUE] ;blue right justified 1st Parent
DynamicVariables=1
LeftMouseUpAction=[taskmgr.exe]
ToolTipText="Open Task Manager"
StringAlign=RIGHT
StringCase=NONE
StringStyle=BOLD
StringEffect=BORDER
FontEffectColor=#FEC1#
FontColor=#FC1#
FontFace=#Font2#
FontSize=#FS1#
AntiAlias=1
X=57
[!SetOption GCPU Y "16"]

I'm not sure here what have you done. You want to set the Y position of the GCPU group, with the !SetOption bang? If so, that's not possible this way, because you can't just add a bang, with no option name. It isn't executed. You have to include that bang into an option. For example if you add the bang to an OnUpdateAction option, the Y position will be set properly: OnUpdateAction=[!SetOption GCPU Y "16"]
roguetrip wrote:
March 16th, 2019, 5:43 pm
Tried also:
[!SetOptionGroup GCPU Y "16"]
If this, or the [!SetOption GCPU Y "16"] form of the bang is working depends on what the GCPU is. Is it a meter or a group? You have to use the appropriate !SetOption(Group) bang.
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group Positioning

balala » March 16th, 2019, 6:09 pm

roguetrip wrote:
March 16th, 2019, 5:43 pm

Code: Select all

 [STYLE_RIGHT_BLUE] ;blue right justified 1st Parent
And one more: always add the comment into a new line, never in the same line as any section name or option. Details: https://forum.rainmeter.net/viewtopic.php?f=5&t=27443&p=142422&hilit=next+line#p142422
roguetrip
Posts: 22
Joined: March 11th, 2019, 5:42 pm

Re: Group Positioning

roguetrip » March 16th, 2019, 9:01 pm

Ok, you can figure I'm not so great at this and do appreciate the help.

I have been learning the hard way actually about the ;commenting after a variable, had not has a problem under a meter or meterstyle but I have been trying to fix them as I go along.


So in Rainmeter I created this huge Y value. :sly: It works :o

Code: Select all

OnRefreshAction=[!SetOptionGroup GUPTime Y "#MUPTime#"][!UpdateMeterGroup "GUPTime"][!SetOptionGroup GCPU Y "#MCPU#"][!UpdateMeterGroup "GCPU"][!SetOptionGroup GCPUT Y "#MPUTemp#"][!UpdateMeterGroup "GCPUT"][!SetOptionGroup GRAM Y "#MRAM#"][!UpdateMeterGroup "GRAM"][!SetOptionGroup GGFX Y "#MGFXTemp#"][!UpdateMeterGroup "GGFX"][!SetOptionGroup GNETIN Y "#MNetIn#"][!UpdateMeterGroup "GNETIN"][!SetOptionGroup GIPISP Y "#MWanISP#"][!UpdateMeterGroup "GIPISP"][!Redraw]

Just so I'm clear, I want to use !SetoptionGroup anytime i'm calling Group=GCPU ??
A !SetOption is only for a Meter or a Measure ??


Edit:

Just tried the OnUpdateAction and works, Awesome :bow:

Code: Select all

OnUpdateAction=[!SetOptionGroup GUPTime Y "#MUPTime#"][!SetOptionGroup GCPU Y "#MCPU#"][!SetOptionGroup GCPUT Y "#MPUTemp#"][!SetOptionGroup GRAM Y "#MRAM#"][!SetOptionGroup GGFX Y "#MGFXTemp#"][!SetOptionGroup GNETIN Y "#MNetIn#"][!SetOptionGroup GIPISP Y "#MWanISP#"]
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Group Positioning

Yincognito » March 16th, 2019, 9:35 pm

roguetrip wrote:
March 16th, 2019, 9:01 pm
So in Rainmeter I created this huge Y value. :sly: It works :o
Just so you know, if the meter groups you are repositioning have some sort of relationship in terms of their positioning, you can always use a single !SetOptionGroup if you also set the positions to be relative to one another (using the r or R suffix, as explained here in the X,Y section).

Of course, if the position of each group is independent of each other, you can't do the above, and you'll have to reposition each group separately, like you already did (resulting in that "huge" bang). The bang is not at all huge, by the way, I've seen much longer, LOL.
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group Positioning

balala » March 16th, 2019, 9:41 pm

roguetrip wrote:
March 16th, 2019, 9:01 pm
Ok, you can figure I'm not so great at this and do appreciate the help.
I'm glad to help. If you keep working and you'll acumulate experience, you can become "great". Keep working!
roguetrip wrote:
March 16th, 2019, 9:01 pm
Just so I'm clear, I want to use !SetoptionGroup anytime i'm calling Group=GCPU ??
What do you mean by "calling Group=GCPU"? The !SetOptionGroup bang sets an option to the same value on all meters / measures belonging to the group.
roguetrip wrote:
March 16th, 2019, 9:01 pm
A !SetOption is only for a Meter or a Measure ??
Precisely for one of them. I mean for a group of meters OR a group of measures. As needed...
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group Positioning

balala » March 16th, 2019, 9:47 pm

Yincognito wrote:
March 16th, 2019, 9:35 pm
Just so you know, if the meter groups you are repositioning have some sort of relationship in terms of their positioning, you can always use a single !SetOptionGroup if you also set the positions to be relative to one another (using the r or R suffix, as explained here in the X,Y section).
To be precise, if the meters are positioned relatively to each others, usually there is no need (and usually it's not even possible) to set their position with a !SetOptionGroup bang. Setting the position of only the first meter, with a !SetOption bang, is completely enough. The other meters being set relatively to the first one, they will follow that one, when it is repositioned.
roguetrip
Posts: 22
Joined: March 11th, 2019, 5:42 pm

Re: Group Positioning

roguetrip » March 16th, 2019, 9:55 pm

Yincognito wrote:
March 16th, 2019, 9:35 pm
Just so you know, if the meter groups you are repositioning have some sort of relationship in terms of their positioning, you can always use a single !SetOptionGroup if you also set the positions to be relative to one another (using the r or R suffix, as explained here in the X,Y section).

Of course, if the position of each group is independent of each other, you can't do the above, and you'll have to reposition each group separately, like you already did (resulting in that "huge" bang). The bang is not at all huge, by the way, I've seen much longer, LOL.
I am afraid how many huge bangs you've seen ;)

In this Skin Each Y position Group Contains 3 meters. The X= currently is just set within my 1st and 2nd parent MeterStyles. Was thinking maybe adding a 2nd Group to each meter to associate the X position values.


I've used Rainmeter since around the time windows 7 came out (litestep before with XP and previous OS'es).

I'm poking and prodding to see how rainmeter works. I never pushed more than the basics around until the last few weeks. Reading the Documentation helps but not nearly enough examples or cheat sheets of what can be done with it. Thank goodness for the forums and everyone's help!