Alloutofmercy wrote: ↑November 19th, 2021, 3:13 pm
All I want is when I hover over the chrome icon, it shows a preview image.
The first !SetOption bangs in both options, MouseOverAction and MouseLeaveAction, are broken. A such !SetOption bang requires at least three parameters:
- The name of the section where something has to be modified.
- The option which has to be modified.
- The new value which has to be set for the previously specified option.
In your code the
[!SetOption #CURRENTSECTION# ] bangs have only one single parameter: the name of the section (#CURRENTSECTION#). No other parameters. If you want to set the #AppImage# image for the current Image meter ([Appchrome]), you have to modify the options for instance this way:
Code: Select all
[Appchrome]
...
MouseOverAction=[!SetOption #CURRENTSECTION# ImageName "#AppImage#"][!Update]
MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageName ""][!Update]
I also would tend not to update the whole skin (with the [!Update] bang), which doesn't worth, because when hovering the mouse over or leaving the meter, only the meter itself is modified, but only the current meter. This way:
Code: Select all
[Appchrome]
...
MouseOverAction=[!SetOption #CURRENTSECTION# ImageName "#AppImage#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageName ""][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
And one more: if my assumption is correct, when leaving the meter, it will disappear, because you set no image anymore to it (setting the ImageName to empty). So probably would be better to do this:
Code: Select all
[Appchrome]
...
MouseOverAction=[!SetOption #CURRENTSECTION# ImageName "#AppImage#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageName "#@#Icons\icons8-chrome-48"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
Just note here that in order this to work, you have to have an image named icons8-chrome-48, of .png format (the default image format of Rainmeter), into the specified folder (
@Resources\Icons\).