It is currently July 7th, 2020, 4:04 am

Minimize all windows and goto Desktop skin

Tips and Tricks from the Rainmeter Community
User avatar
CJDayaratna
Posts: 3
Joined: June 1st, 2020, 7:50 am

Minimize all windows and goto Desktop skin

Post by CJDayaratna »

I have tried days to find a simple method to create an icon to Rainmeter that minimize all opened windows and go straight to desktop skin. My plan was to make an icon on the topmost layer position so that, whenever i want to go to Desktop I could just click on it which will replicate the function of "Winkey + D".
After trying numerous methods, I found a simple option that you can use to get this done. Just simply copy paste the following code to the Rainmeter icon you have created and you will have an icon to Minimize all windows and go to Desktop skin.

Code: Select all

[Desktop]
LeftMouseUpAction=[shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}]

[Rainmeter]
Update=1000

[Metadata]
Name=Desktop
Author=CharithaJD
Information=
License=
Version=
Last edited by balala on June 1st, 2020, 8:14 am, edited 1 time in total.
Reason: Please use <code> tags whenever are you posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 10968
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Minimize all windows and goto Desktop skin

Post by balala »

CJDayaratna wrote:
June 1st, 2020, 8:06 am
I have tried days to find a simple method to create an icon to Rainmeter that minimize all opened windows and go straight to desktop skin. My plan was to make an icon on the topmost layer position so that, whenever i want to go to Desktop I could just click on it which will replicate the function of "Winkey + D".
After trying numerous methods, I found a simple option that you can use to get this done. Just simply copy paste the following code to the Rainmeter icon you have created and you will have an icon to Minimize all windows and go to Desktop skin.
This way this code doesn't work, because a skin can be loaded only if there is at least one visual element (a meter). In your code such a meter doesn't exist. I suppose [Desktop] should be such a meter (an Image meter, for instance), but it's not so far, not having a Meter=Image (or whatever) option. So if you try to load the skin having the above code, Rainmeter refuses to do this, saying that "The skin XXX does not contain any meters and will be deactivated. the file may be damaged or it may not be a valid skin." You should have to add at least the following options to the [Desktop] section:

Code: Select all

[Desktop]
 Meter=Image
 SolidColor=255,240,0
 W=100
 H=50
 LeftMouseUpAction=[shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}]
Obviously the involved options are optional and can be modified as you want, but the idea is to set the [Desktop] section as a meter, with some options.
User avatar
CJDayaratna
Posts: 3
Joined: June 1st, 2020, 7:50 am

Re: Minimize all windows and goto Desktop skin

Post by CJDayaratna »

balala wrote:
June 1st, 2020, 8:26 am
This way this code doesn't work, because a skin can be loaded only if there is at least one visual element (a meter). In your code such a meter doesn't exist. I suppose [Desktop] should be such a meter (an Image meter, for instance), but it's not so far, not having a Meter=Image (or whatever) option. So if you try to load the skin having the above code, Rainmeter refuses to do this, saying that "The skin XXX does not contain any meters and will be deactivated. the file may be damaged or it may not be a valid skin." You should have to add at least the following options to the [Desktop] section:

Code: Select all

[Desktop]
 Meter=Image
 SolidColor=255,240,0
 W=100
 H=50
 LeftMouseUpAction=[shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}]
Obviously the involved options are optional and can be modified as you want, but the idea is to set the [Desktop] section as a meter, with some options.
Thanks for the advice!
User avatar
balala
Rainmeter Sage
Posts: 10968
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Minimize all windows and goto Desktop skin

Post by balala »

CJDayaratna wrote:
June 1st, 2020, 8:35 am
Thanks for the advice!
You're welcome. :thumbup: