Hello, just to know if you could direct me to create a menu list and submenu a bit like the skin fallout in very basic so that I learn I can not find in the tutorial
Liste 1 clic open and close
Text1=
LeftMouseUpAction1=
Text2=
LeftMouseUpAction2=
Liste 2 clic open and close
Text1=
LeftMouseUpAction1=
Text2=
LeftMouseUpAction2=
I am really a beginner and would like to understand
have a good date
It is currently March 27th, 2023, 9:45 am
help for start menu list and submenu
-
- Posts: 6
- Joined: March 15th, 2023, 4:40 pm
-
- Rainmeter Sage
- Posts: 15069
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: help for start menu list and submenu
I am not sure I completely understand your intention, but see bellow an example of a code of an extremely simple skin, having one single visible element (Menu). When you click it, it opens a menu, having two elements: the first one opens Notepad, while the second one opens a command line. When any of these is clicked, the appropriate app is launched and the menu closes. It closes also if you click the Menu text or click outside of the skin.
Code: Select all
[Rainmeter]
Update=-1
OnUnfocusAction=[!SetVariable OpenMenu "0"][!UpdateMeasure "MeasureOpenMenu"][!UpdateMeter "MeterMenu"]
[Variables]
OpenMenu=0
[MeasureOpenMenu]
Measure=Calc
Formula=#OpenMenu#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!HideMeterGroup "Menu"][!Redraw]
IfFalseAction=[!ShowMeterGroup "Menu"][!Redraw]
DynamicVariables=1
[MeterMenu]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Menu
DynamicVariables=1
LeftMouseUpAction=[!SetVariable OpenMenu "(1-#OpenMenu#)"][!UpdateMeasure "MeasureOpenMenu"][!UpdateMeter #CURRENTSECTION#]
[MeterMenuElement1]
Meter=STRING
X=10r
Y=1R
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Notepad
Group=Menu
LeftMouseUpAction=[!SetVariable OpenMenu "0"]["Notepad.exe"][!UpdateMeasure "MeasureOpenMenu"][!UpdateMeter "MeterMenu"]
[MeterMenuElement2]
Meter=STRING
X=0r
Y=1R
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Commandline
Group=Menu
LeftMouseUpAction=[!SetVariable OpenMenu "0"]["cmd.exe"][!UpdateMeasure "MeasureOpenMenu"][!UpdateMeter "MeterMenu"]
-
- Posts: 6
- Joined: March 15th, 2023, 4:40 pm
Re: help for start menu list and submenu
Thank you. I could leave with a good foundation to learn and understand. Good luck to you and rainmeter 

-
- Rainmeter Sage
- Posts: 15069
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: help for start menu list and submenu
If any question arises, please feel free to come back with it (them, if there are more). Good luck with Rainmeter coding.