Hello everyone. Right now I've made simple dock where you just press Leftmousebutton and it simply opens program or a folder. But at the same time I want to add additional dock when I press Middlemousebutton.
Example: Pressing Leftmousebutton on steam opens steam, but pressing middlemousebutton on steam opens dock above it, where you can choose the game you want to start.
I can make dock no problem there, but my problem is this: I accidentally open dock which I don't wanna and I want to close it by simply pressing on desktop or pressing again Middlemousebutton on steam. Is it possible to create something like this or I have to find other means to work around it?
Cheers.
It is currently April 28th, 2024, 3:56 am
Need help regarding dock
-
- Posts: 3
- Joined: December 14th, 2023, 5:34 pm
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Need help regarding dock
Not entirely sure what you mean by "opens dock above it", but at least if I understood your intention, you probably would need some additional hidden meters, which will be shown when you middle click the meter, then hide them on a new middle click. This can be done in more ways, for instance by using the !ToggleMeter / !ToggleMeterGroup bangs on a MiddleMouseUpAction option of the appropriate meter. These bangs are showing the hidden meter or hiding the visible meter.domc wrote: ↑December 14th, 2023, 6:08 pm Example: Pressing Leftmousebutton on steam opens steam, but pressing middlemousebutton on steam opens dock above it, where you can choose the game you want to start.
I can make dock no problem there, but my problem is this: I accidentally open dock which I don't wanna and I want to close it by simply pressing on desktop or pressing again Middlemousebutton on steam. Is it possible to create something like this or I have to find other means to work around it?
To hide the meters when you click the desktop (or in fact anywhere outside of the skin) you need an OnUnfocusAction option on the [Rainmeter] section of your skin. On this option you'll want to use a !HideMeter / !HideMeterGroup bangs, to hide the same meters.
In any case, for better and more specific help, we'd need your code. Without it, just the above kind of generalities can be said.
-
- Posts: 3
- Joined: December 14th, 2023, 5:34 pm
Re: Need help regarding dock
You've understood it perfectly, sir. I was heavily overthinking this due to lack of experience, obviously... I just forgot to mention that I've already made them hidden using !togglemeter. But is it possible to perform it with !activateconfig as well? Because I wanna keep things categorized and I want to keep "hidden docks" in seperate .ini file.balala wrote: ↑December 14th, 2023, 6:34 pm Not entirely sure what you mean by "opens dock above it", but at least if I understood your intention, you probably would need some additional hidden meters, which will be shown when you middle click the meter, then hide them on a new middle click. This can be done in more ways, for instance by using the !ToggleMeter / !ToggleMeterGroup bangs on a MiddleMouseUpAction option of the appropriate meter. These bangs are showing the hidden meter or hiding the visible meter.
To hide the meters when you click the desktop (or in fact anywhere outside of the skin) you need an OnUnfocusAction option on the [Rainmeter] section of your skin. On this option you'll want to use a !HideMeter / !HideMeterGroup bangs, to hide the same meters.
In any case, for better and more specific help, we'd need your code. Without it, just the above kind of generalities can be said.
Thank you for your help by the way. Right now I'm just going to play with it by myself because that is the only way to learn it. When someone else does everything for me, I usually forget everything quickly :/ Have a nice evening.
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Need help regarding dock
!ActivateConfig as it name says, is used to activate a config. To can use it, you should have to have those meters as a different skin (a different .ini file, most probably into a different config / folder than the one in which you have the original skin). Note that a .inc file is not a (different) skin and even more: you can't even activate a .inc file.domc wrote: ↑December 14th, 2023, 7:00 pm You've understood it perfectly, sir. I was heavily overthinking this due to lack of experience, obviously... I just forgot to mention that I've already made them hidden using !togglemeter. But is it possible to perform it with !activateconfig as well? Because I wanna keep things categorized and I want to keep "hidden docks" in seperate .ini file.
Additional thing: including those meters into a different skin even if possible, is not a good idea, because there is no way to make those two skins to be always on the same position on screen. But this would be important if you want to show some icons, strings, images or whatever when you click an existing meter.
So no, long story short, unless I misunderstood something, this is not an affordable way.
Exactly. Good point. In fact one of the most basics rule of this forum is that we never write skins on demand. Better we help folks out there to write it themselves.
So, feel free to come back if any further question arises.
-
- Rainmeter Sage
- Posts: 7178
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Need help regarding dock
Yes, it is possible, via the !Toggle bang which works the same way, but with configs instead of meters like earlier:
https://docs.rainmeter.net/manual/bangs/#Skin
This obviously assumes you did separate your code into different .ini files in different folders to begin with.
As for whether this is feasible or not, see balala's answer: you'll have to position those secondary configs yourself via !Move bangs or otherwise, so that they shown based on the #CURRENTCONFIGX# and similar coordinates of the main config and "stick" to it for most of the time. It isn't complicated to do that, but for sure having them as meters of the main config is easier to handle. One advantage of doing this with separate configs would be that they would not eat or reserve space if having your main config towards the edges of your screen. You should put the advantages and disadvantages into balance here before deciding which choice is more appropriate in your case.
-
- Posts: 3
- Joined: December 14th, 2023, 5:34 pm
Re: Need help regarding dock
Took some reading to do since i'm very new at this, but hey, it works . Will try to mess around with ActionTimer later.
Edit: slapped random executables on meters and didn't bother add any to submenus since I've tried and they worked.
Edit: slapped random executables on meters and didn't bother add any to submenus since I've tried and they worked.
Code: Select all
[Rainmeter]
Update=-1
OnUnfocusAction=[!SetVariable Menu "0"][!UpdateMeasure "MeasureMenu"][!UpdateMeter *]
;;----------Variables---------;;
[Variables]
Menu=0
;;----------Measure(s)----------;;
[MeasureMenu]
Measure=Calc
Formula=#Menu#
IfCondition=(MeasureMenu >= 1) && (MeasureMenu <= 2)
IfTrueAction=[!ShowMeterGroup "SubMenu1"]
IfFalseAction=[!HideMeterGroup "SubMenu1"]
IfCondition2=(MeasureMenu >= 3) && (MeasureMenu <= 4)
IfTrueAction2=[!ShowMeterGroup "Submenu2"]
IfFalseAction2=[!HideMeterGroup "SubMenu2"]
OnUpdateAction=[!Redraw]
DynamicVariables=1
;;----------Main MeterMenu----------;;
[MeterMenu1]
Meter=Image
SolidColor=0,255,0,255
X=0
Y=0
W=20
H=20
LeftMouseUpAction=[Cmd.exe]
MiddleMouseUpAction=[!SetVariable Menu "(1-#Menu#)"][!UpdateMeasure "MeasureMenu"]
AntiAlias=1
DynamicVariables=1
[MeterMenu2]
Meter=Image
SolidColor=0,255,255,255
X=0
Y=40
W=20
H=20
LeftMouseUpAction=[Cmd.exe]
MiddleMouseUpAction=[!SetVariable Menu "(3-#Menu#)"][!UpdateMeasure "MeasureMenu"]
AntiAlias=1
DynamicVariables=1
;;----------Submenus----------;;
[Submeter1.1]
Meter=Image
SolidColor=0,255,0,255
X=30
Y=0
W=20
H=20
Group=SubMenu1
LeftMouseUpAction=[!SetVariable Menu "0"][!UpdateMeasure "MeasureMenu"][!UpdateMeter "Metermenu1"]
[Submeter1.2]
Meter=Image
SolidColor=0,0,255,255
X=60
Y=0
W=20
H=20
Group=SubMenu1
LeftMouseUpAction=[!SetVariable Menu "0"][!UpdateMeasure "MeasureMenu"][!UpdateMeter "Metermenu1"]
[Submeter2.1]
Meter=Image
SolidColor=0,255,0,255
X=30
Y=40
W=20
H=20
Group=SubMenu2
LeftMouseUpAction=[!SetVariable Menu "0"][!UpdateMeasure "MeasureMenu"][!UpdateMeter "Metermenu2"]
[Submeter2.2]
Meter=Image
SolidColor=0,0,255,255
X=60
Y=40
W=20
H=20
Group=SubMenu2
LeftMouseUpAction=[!SetVariable Menu "0"][!UpdateMeasure "MeasureMenu"][!UpdateMeter "Metermenu2"]
-
- Rainmeter Sage
- Posts: 7178
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Need help regarding dock
Sure thing. Once you have a functional system, you can polish the design however you want.
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Need help regarding dock
One suggestion: add a [!UpdateMeter "#CURRENTSECTION#"] bang to the MiddelMouseUpAction option of the [MeterMenu1] and [MeterMenu2] meters:
Code: Select all
[MeterMenu1]
...
MiddleMouseUpAction=[!SetVariable Menu "(1-#Menu#)"][!UpdateMeasure "MeasureMenu"][!UpdateMeter "#CURRENTSECTION#"]
...
[MeterMenu2]
...
MiddleMouseUpAction=[!SetVariable Menu "(3-#Menu#)"][!UpdateMeasure "MeasureMenu"][!UpdateMeter "#CURRENTSECTION#"]
...