Hi,
Is it possible to extend the duration of the on-click image of buttons? Would I have to use the mouse action functions instead?
It is currently March 28th, 2024, 11:30 am
Button Longevity
-
- Posts: 2
- Joined: July 9th, 2019, 10:21 am
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Button Longevity
Me personally didn't understand what you would like. Could you please detail a little bit?Dar-Krusos wrote: ↑May 12th, 2020, 1:08 pm Is it possible to extend the duration of the on-click image of buttons? Would I have to use the mouse action functions instead?
-
- Posts: 2
- Joined: July 9th, 2019, 10:21 am
Re: Button Longevity
When using a Button meter, the image that appears upon clicking the button only lasts until the mouse is no longer pressed. This duration is very short, and I would like to know whether it is possible to extend the duration using a Button meter, or whether I would have to use mouse-leave/mouse-click functions instead.
Re: Button Longevity
A little experimentation would show if your described options would produce the effect you are looking for.
Me personally, like the mouse over/leave actions as they indicate when a mouse is over a button for as long as it is there.
Other things like action timercould be used for an effect that persists after the mouse leaves, for example.
Me personally, like the mouse over/leave actions as they indicate when a mouse is over a button for as long as it is there.
Other things like action timercould be used for an effect that persists after the mouse leaves, for example.
Re: Button Longevity
Hi Dar-Krusos
It seems to me that you are talking about the behavior of a specific button meter. Could you post code of the button meter and its button image?
It seems to me that you are talking about the behavior of a specific button meter. Could you post code of the button meter and its button image?
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Button Longevity
No, it's not with a Button meter. But the same behavior can be simulated if instead of Button meter you are using Image meter. You have to change the shown image with appropriately set !SetOption bangs, into the MouseOverAction, LeftMouseDownAction, LeftMouseUpAction and MouseLeaveAction options.Dar-Krusos wrote: ↑May 13th, 2020, 2:56 am When using a Button meter, the image that appears upon clicking the button only lasts until the mouse is no longer pressed. This duration is very short, and I would like to know whether it is possible to extend the duration using a Button meter, or whether I would have to use mouse-leave/mouse-click functions instead.
For instance let's say you have the following Button meter:
Code: Select all
[MeterMyButton]
Meter=Button
ButtonImage=#@#MyButton.png
ButtonCommand=["Notepad.exe"]
Divide the appropriate image into three same sized images and name them for instance MyButton1.png, MyButton2.png, respectively MyButton3.png.The first frame corresponds to the normal state, the second to the clicked state, and the third to the hover state.
Now replace the above Button meter with the following one:
Code: Select all
[MeterMyButton]
Meter=Image
ImageName=#@#MyButton1.png
MouseOverAction=[!SetOption #CURRENTSECTION# ImageName "#@#MyButton3.png"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageName "#@#MyButton1.png"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseDownAction=[!DisableMouseAction #CURRENTSECTION# "MouseLeaveAction"][!SetOption #CURRENTSECTION# ImageName "#@#MyButton2.png"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=["Notepad.exe"][!Delay "#Delay#"][!EnableMouseAction #CURRENTSECTION# "MouseLeaveAction"][!SetOption #CURRENTSECTION# ImageName "#@#MyButton1.png"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
Code: Select all
[Variables]
Delay=1000
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Button Longevity
Although possible, doesn't worth to complicate things with ActionTimer plugin measure(s), because it is a little bit more complicated to work with it than with, for example, the !Delay bang, which can properly deal with such tasks.