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 April 18th, 2024, 4:48 am
Button Longevity
-
- Posts: 2
- Joined: July 9th, 2019, 10:21 am
-
- Rainmeter Sage
- Posts: 16143
- 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.
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
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.
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Posts: 908
- Joined: December 30th, 2015, 9:47 am
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?
-
- Rainmeter Sage
- Posts: 16143
- 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
-
- Rainmeter Sage
- Posts: 16143
- 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.