Hi! Thanks for the reply and sorry if I wasn't very clear. I'm aware that in its current form the code writes all the labels to the same position. I want this position to be controlled by a variable. I'd rather not use relative positioning because when the labels grow in size they change the position of subsequent labels. If they have static Y positions then only the label being moused over will move. I've tried to write something like this.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
[Variables]
ypos=0
[Outlook]
Meter=String
Group=Labels
MeterStyle=Label
DynamicVariables=1
Text=Outlook
Y=#ypos#
LeftMouseUpAction=["C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE"]
[!SetVariable ypos "ypos+20"]
[Connectwise]
Meter=String
Group=Labels
MeterStyle=Label
DynamicVariables=1
Text=Connectwise
Y=#ypos#
LeftMouseUpAction=["C:\Program Files (x86)\ConnectWise\PSA.net\ConnectWise.exe"]
[!SetVariable ypos "ypos+20"]
[Excel]
Meter=String
Group=Labels
MeterStyle=Label
Text=Excel
Y=#ypos#
LeftMouseUpAction=["C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE"]
[!SetVariable ypos "ypos+20"]
[Word]
Meter=String
Group=Labels
MeterStyle=Label
Text=Word
Y=#ypos#
LeftMouseUpAction=["C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE"]
[!SetVariable ypos "ypos+20"]
[Teamviewer]
Meter=String
Group=Labels
MeterStyle=Label
Text=Teamviewer
Y=#ypos#
LeftMouseUpAction=["C:\Program Files (x86)\TeamViewer\TeamViewer.exe"]
[!SetVariable ypos "ypos+20"]
[Discord]
Meter=String
Group=Labels
MeterStyle=Label
Text=Discord
Y=#ypos#
LeftMouseUpAction=["C:\Users\codym\AppData\Local\Discord\app-0.0.301\Discord.exe"]
[!SetVariable ypos "ypos+20"]
[Label]
Meter=String
SolidColor=0,0,0,1
FontColor="255,255,255,255"
FontFace=Spectral SC Light
FontSize=17
AntiAlias=1
StringEffect=Shadow
FontEffectColor=0,0,0,255
H=30
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "23,148,228,255"] [!SetOption #CURRENTSECTION# FontSize 25] [!SetOption #CURRENTSECTION# H 50] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "255,255,255,255"] [!SetOption #CURRENTSECTION# FontSize 20][!SetOption #CURRENTSECTION# H 30] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
If I can get something similar to this working then I can try to move the option Y=#ypos# to the MeterStyle to cut out a few lines of code. There will eventually be more labels.
In other words it should behave like the following code but without having to manually enter the Y values.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
[Outlook]
Meter=String
Group=Labels
MeterStyle=Label
DynamicVariables=1
Text=Outlook
Y=0
LeftMouseUpAction=["C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE"]
[Connectwise]
Meter=String
Group=Labels
MeterStyle=Label
DynamicVariables=1
Text=Connectwise
Y=20
LeftMouseUpAction=["C:\Program Files (x86)\ConnectWise\PSA.net\ConnectWise.exe"]
[Excel]
Meter=String
Group=Labels
MeterStyle=Label
Text=Excel
Y=40
LeftMouseUpAction=["C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE"]
[Word]
Meter=String
Group=Labels
MeterStyle=Label
Text=Word
Y=60
LeftMouseUpAction=["C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE"]
[Teamviewer]
Meter=String
Group=Labels
MeterStyle=Label
Text=Teamviewer
Y=80
LeftMouseUpAction=["C:\Program Files (x86)\TeamViewer\TeamViewer.exe"]
[Discord]
Meter=String
Group=Labels
MeterStyle=Label
Text=Discord
Y=100
LeftMouseUpAction=["C:\Users\codym\AppData\Local\Discord\app-0.0.301\Discord.exe"]
[Label]
Meter=String
SolidColor=0,0,0,1
FontColor="255,255,255,255"
FontFace=Spectral SC Light
FontSize=17
AntiAlias=1
StringEffect=Shadow
FontEffectColor=0,0,0,255
H=30
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "23,148,228,255"] [!SetOption #CURRENTSECTION# FontSize 25] [!SetOption #CURRENTSECTION# H 50] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "255,255,255,255"] [!SetOption #CURRENTSECTION# FontSize 20][!SetOption #CURRENTSECTION# H 30] [!UpdateMeter #CURRENTSECTION#] [!Redraw]