It is currently March 28th, 2024, 2:37 pm

Expandable Folder

Get help with installing and using Rainmeter.
creepercardz
Posts: 5
Joined: August 27th, 2018, 12:56 pm

Expandable Folder

Post by creepercardz »

I found someone on reddit who made a collapsible folder to use, it is really good but I don't know how to add more buttons and change where the button goes i.e. opening a steam game or a folder. Here is the link to the skin: http://www.mediafire.com/file/k1z6e2kytgg5fgu/Expandable.zip
and here is the code

Code: Select all

[Rainmeter]
Author=Ceigee
Update=100
BackgroundMode=1

[Metadata]
Name=Expandable Icons
Version=1.0
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[expandablepassive]
Meter=Image
x=0
y=0
ImageName=1.png
AntiAlias=1
DynamicVariables=1
LeftMouseUpAction=!Execute [!hidemeter expandablepassive][!showmeter expandableactive][!showmeter expanded1][!showmeter expanded2][!showmeter expanded3][!update]

[expandableactive]
meter=Image
x=r
y=r
ImageName=5.png
AntiAlias=1
DynamicVariables=1
Hidden=1
LeftMouseUpAction=!Execute [!hidemeter expandableActive][!hidemeter expanded1][!hidemeter expanded2][!hidemeter expanded3][!showmeter expandablepassive][!update]

[expanded1]
Meter=Image
x=100
y=0
ImageName=2.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=!Execute [::{20D04FE0-3AEA-1069-A2D8-08002B30309D}]

[expanded2]
Meter=Image
x=0
y=100
ImageName=3.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=!Execute [::{450D8FBA-AD25-11D0-98A8-0800361B1103}]


[expanded3]
Meter=Image
x=100r
y=r
ImageName=4.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=!Execute [::{645FF040-5081-101B-9F08-00AA002F954E}]
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Expandable Folder

Post by balala »

creepercardz wrote:I found someone on reddit who made a collapsible folder to use, it is really good but I don't know how to add more buttons and change where the button goes i.e. opening a steam game or a folder. Here is the link to the skin: http://www.mediafire.com/file/k1z6e2kytgg5fgu/Expandable.zip
and here is the code
What exactly you would like to add?

Just as a side note I'd say that probably this is a very old code, because the !Execute bang was long time ago deprecated. All its occurrences should have to be removed.
On the other hand, there are some other small imperfections, too. For example the Author option also was moved from the [Rainmeter] section, to [Metadata]. And I don't see why a such small Update should have to be used. In fact the mouse commanded skins (like this one) don't have to be updated at all. I'd replace the Update=100 option of the [Rainmeter] section with Update=-1, but at least with the default Update=1000.
creepercardz
Posts: 5
Joined: August 27th, 2018, 12:56 pm

Re: Expandable Folder

Post by creepercardz »

balala wrote:What exactly you would like to add?

Just as a side note I'd say that probably this is a very old code, because the !Execute bang was long time ago deprecated. All its occurrences should have to be removed.
On the other hand, there are some other small imperfections, too. For example the Author option also was moved from the [Rainmeter] section, to [Metadata]. And I don't see why a such small Update should have to be used. In fact the mouse commanded skins (like this one) don't have to be updated at all. I'd replace the Update=100 option of the [Rainmeter] section with Update=-1, but at least with the default Update=1000.
Thanks for the help, I was wondering if you could let me know how to add more buttons as at the moment only three come out
e.PNG
Also what do I change this code to
f.PNG
to direct it to a folder or program, do I replace the numbers with the file location? e.g. C:\Program Files (x86)\Adobe Photoshop CS6

thanks :)
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Expandable Folder

Post by balala »

creepercardz wrote:Thanks for the help, I was wondering if you could let me know how to add more buttons as at the moment only three come out e.PNG
First, I'd include all meters (buttons) shown up when you click the blue button, into a group of meters. Let's name this group Buttons1. So, add a Group=Buttons1 option to all of the [expandableactive], [expanded1], [expanded2] and [expanded3] meters. Will be much simpler to handle these buttons when they have to be shown or hidden, if they belong to a group.
Now replace the LeftMouseUpAction options of the [expandablepassive] and [expandableactive] meter with the following ones:

Code: Select all

[expandablepassive]
...
LeftMouseUpAction=[!HideMeter "expandablepassive"][!ShowMeterGroup "Buttons1"][!Redraw]

[expandableactive]
...
LeftMouseUpAction=[!ShowMeter "expandablepassive"][!HideMeterGroup "Buttons1"][!Redraw]
(Don't modify or remove the not posted options, replace just these two).
I proposed all these modification, because this way is much simpler to add further buttons. Add as many as you want. Here are two, which have to be added after [expanded3]:

Code: Select all

[expanded4]
Meter=Image
x=0
y=0R
ImageName=6.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=
Group=Buttons1

[expanded5]
Meter=Image
x=0R
y=r
ImageName=7.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=
Group=Buttons1
Take into account the followings:
  • For these two meters I used two images named 6.png and 7.png and these have to be created into the skins folder.
  • Have to add the appropriate LeftMouseUpAction options to can open/launch the desired app/file/folder (in the example below the first of these two buttons opens the C:\Program Files (x86)\Adobe Photoshop CS6 folder, while the other launches notepad.exe).
  • Note that these meters are positioned relatively. I also positioned so, the existing meters as well (see the whole code below).
creepercardz wrote:Also what do I change this code to f.PNG to direct it to a folder or program, do I replace the numbers with the file location? e.g. C:\Program Files (x86)\Adobe Photoshop CS6
Exactly. This LeftMouseUpAction will open the C:\Program Files (x86)\Adobe Photoshop CS6 folder.

The modified code:

Code: Select all

[Rainmeter]
Update=-1
BackgroundMode=1

[Metadata]
Name=Expandable Icons
Author=Ceigee
Version=1.0
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[expandablepassive]
Meter=Image
x=0
y=0
ImageName=1.png
AntiAlias=1
DynamicVariables=1
LeftMouseUpAction=[!HideMeter "expandablepassive"][!ShowMeterGroup "Buttons1"][!Redraw]

[expandableactive]
meter=Image
x=r
y=r
ImageName=5.png
AntiAlias=1
DynamicVariables=1
Hidden=1
LeftMouseUpAction=[!ShowMeter "expandablepassive"][!HideMeterGroup "Buttons1"][!Redraw]
Group=Buttons1

[expanded1]
Meter=Image
x=0R
y=0
ImageName=2.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=[::{20D04FE0-3AEA-1069-A2D8-08002B30309D}]
Group=Buttons1

[expanded2]
Meter=Image
x=0
y=0R
ImageName=3.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=[::{450D8FBA-AD25-11D0-98A8-0800361B1103}]
Group=Buttons1

[expanded3]
Meter=Image
x=0R
y=r
ImageName=4.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=[::{645FF040-5081-101B-9F08-00AA002F954E}]
Group=Buttons1

[expanded4]
Meter=Image
x=0
y=0R
ImageName=4.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=["C:\Program Files (x86)\Adobe Photoshop CS6"]
Group=Buttons1

[expanded5]
Meter=Image
x=0R
y=r
ImageName=3.png
AntiAlias=1
Hidden=1
LeftMouseUpAction=["notepad.exe"]
Group=Buttons1
creepercardz
Posts: 5
Joined: August 27th, 2018, 12:56 pm

Re: Expandable Folder

Post by creepercardz »

thanks, it works great
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Expandable Folder

Post by balala »

creepercardz wrote:thanks, it works great
I'm glad. You can add further buttons if needed, or can modify the existing ones.
Please let us (me) know if you have further questions.
creepercardz
Posts: 5
Joined: August 27th, 2018, 12:56 pm

Re: Expandable Folder

Post by creepercardz »

balala wrote:I'm glad. You can add further buttons if needed, or can modify the existing ones.
Please let us (me) know if you have further questions.
hi again, its still working well but I was wondering if there was any way to make the folder collapse automatically again after you click on one of the buttons, thanks :)
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Expandable Folder

Post by balala »

creepercardz wrote:hi again, its still working well but I was wondering if there was any way to make the folder collapse automatically again after you click on one of the buttons, thanks :)
Just to understand: the buttons are opening apps / folders. So, what should have to collapse?
creepercardz
Posts: 5
Joined: August 27th, 2018, 12:56 pm

Re: Expandable Folder

Post by creepercardz »

balala wrote:Just to understand: the buttons are opening apps / folders. So, what should have to collapse?
have it so after i click one of these
Capture1.PNG
it collapses back into
capture2.PNG
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Expandable Folder

Post by balala »

creepercardz wrote:have it so after i click one of these Capture1.PNG it collapses back into
capture2.PNG
Just add the appropriate bangs to all LeftMouseUpAction options of the [expanded1] - [expanded5] Image meters. You have to add a [!ShowMeter "expandablepassive"][!HideMeterGroup "Buttons1"] bangs pair and a [!Redraw]. For example this way the LeftMouseUpAction option of the [expanded1] meter will become: LeftMouseUpAction=[color=#FF0000][!ShowMeter "expandablepassive"][!HideMeterGroup "Buttons1"][/color][::{20D04FE0-3AEA-1069-A2D8-08002B30309D}][color=#FF0000][!Redraw][/color], but obviously you'll have to add the same bangs to all other LeftMouseUpAction options.
Post Reply