Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1836

Help: Rainmeter Skins • Re: Mouse long click action?

$
0
0
So i want to avoid that simple left click, and want to time it with a simple counter, The counter would only start and keep counting while the left mouse button is held down. In case of release would reset the counter.
  • Solution 1: You might try using a double click instead of simple click to shut down the computer. I'm positive this is not exactly what you want, but might worth a try.
  • Solution 2: Try this:

    Code:

    [Rainmeter]Update=1000DynamicWindowSize=1AccurateText=1[Variables][MeasureCount]Measure=CalcFormula=( MeasureCount + 1 )Disabled=1[MeterCount]Meter=STRINGMeasureName=MeasureCountX=0Y=0Padding=15,5,15,5FontColor=220,220,220FontEffectColor=0,0,0StringEffect=ShadowSolidColor=0,0,0,150FontSize=8FontFace=Segoe UIStringStyle=BOLDStringAlign=LEFTAntiAlias=1Text=%1NumOfDecimals=2DynamicVariables=1LeftMouseDownAction=[!EnableMeasure "MeasureCount"]LeftMouseUpAction=[!DisableMeasure "MeasureCount"]MouseLeaveAction=[!DisableMeasure "MeasureCount"]
    See that when you click, the [MeasureCount] measure is enabled, starting to count. This is going on while you hold down the button. When releasing it, the [MeasureCount] measure is disabled. You most probably will have to add some IfCondition to this measure, but hope this is not a problem. In any case what you have to keep in mind is that besides the LeftMouseUpAction option (which disables the measure), I added a MouseLeaveAction to do the same (so to disable the measure).
Hope one of these solution works for you.

Statistics: Posted by balala — Today, 7:09 pm



Viewing all articles
Browse latest Browse all 1836

Trending Articles