It is currently March 28th, 2024, 10:26 pm

Way to access\execute Windows 10 tooltip functions?

Get help with creating, editing & fixing problems with skins
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Way to access\execute Windows 10 tooltip functions?

Post by jminternelia »

This is pretty simple, just not sure where to look. I'm trying to link a button to execute the tooltip command that hides desktop icons. Currently, I am just using HideDesktopIcons.exe, but by accessing the command windows uses, it simplifies things.

The other part of this, and where it gets a bit more complicated, is I have two layouts. One is a "performance" layout. I have a button set up to switch between the two. The previously mentioned "Hide Desktop Icons" button is on both of these. What I would like to implement is a way for the meter to check the status of whether or not icons are currently hidden, and reflect that in the button state as the button glows when the icons are hidden, or it is intended to. However if one clicks the button and hides the icons, then switches to the second layout, the default state of the button is "inactive" or not glowing, yet the icons are hidden.

Any takers?
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Way to access\execute Windows 10 tooltip functions?

Post by Active Colors »

You can change these register values with rainmeter
https://winaero.com/blog/hide-desktop-icons-windows-10/
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Way to access\execute Windows 10 tooltip functions?

Post by balala »

jminternelia wrote:The other part of this, and where it gets a bit more complicated, is I have two layouts. One is a "performance" layout. I have a button set up to switch between the two. The previously mentioned "Hide Desktop Icons" button is on both of these. What I would like to implement is a way for the meter to check the status of whether or not icons are currently hidden, and reflect that in the button state as the button glows when the icons are hidden, or it is intended to. However if one clicks the button and hides the icons, then switches to the second layout, the default state of the button is "inactive" or not glowing, yet the icons are hidden.
I would create for this a variable (let's name it Layout), would change its value through the button and would execute the needed operations according to the value of it.
Eg, add the following variable to the [Variables] section of your skin:

Code: Select all

[Variables]
Layout=0
Now you need a Calc measure, which should have to have set up the appropriate operations into some IfCondition / IfTrueAction / IfFalseAction options:

Code: Select all

[MeasureLayout]
Measure=Calc
Formula=#Layout#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!LoadLayout "Layout1"][!SetOption MeterButton ImageName "#@#ImageWhenTheIconsAreHidden"][!UpdateMeter "MeterButton"][!Redraw]
IfFalseAction=[!LoadLayout "Layout2"][!SetOption MeterButton ImageName "#@#ImageWhenTheIconsAreShown"][!UpdateMeter "MeterButton"][!Redraw]
Probably you have to modify the above bangs and / or add further bangs, to execute everything you need when the button is clicked. Also have to add the actions needed to hide / show the icons.
I also mention that I considered the [MeterButton] meter being an Image meter. If it isn't, you have to adapt the bang.
The above !LoadLayout bangs, are loading the appropriate layout, according to the value of the Layout variable. Both layouts must have to contain the current skin. Even so, there is a problem: when a new layout is loaded, the current skin is reloaded, so you can't dynamically set the value of the variable. That's why the [MeterButton] meter should have to write the new value of the variable into the [Variables] section, immediately it is clicked:

Code: Select all

[MeterButton]
X=0
Y=0
LeftMouseUpAction=[!WriteKeyValue Variables Layout "(1-#Layout#)"][!UpdateMeasure "MeasureLayout"]
See that I omitted to add the ImageName option to this meter, because its image is set by the IfTrueAction / IfFalseAction options of the [MeasureLayout] measure.
jminternelia
Posts: 65
Joined: March 21st, 2017, 3:46 am

Re: Way to access\execute Windows 10 tooltip functions?

Post by jminternelia »

Thanks!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Way to access\execute Windows 10 tooltip functions?

Post by balala »

Did you get it working?