It is currently November 4th, 2024, 6:03 am

MouseOver & MouseLeave Clock Help

Get help with creating, editing & fixing problems with skins
Reflex
Posts: 15
Joined: June 19th, 2010, 3:13 am

MouseOver & MouseLeave Clock Help

Post by Reflex »

Hello everyone.

I'm starting to make my own skin, now that I've been toying around with Rainmeter for a few days now. Right now, I'm stuck on making a simple clock. My plan was to have a digital clock in the lower left hand of my screen that, when the mouse is moved over, would display the date and hide the time. When the mouse is moved off of it, the date would hide and the time would show. I'm having trouble with the MouseOverAction, and especially MouseLeaveAction.

I've already added

BackgroundMode=2
SolidColor=0,0,0,1
BackgroundMargins=10,10,10,10

to [Rainmeter], as told to do so here, but to no avail. Here's the guts of what I have as of right now (let's hope its not horrendously wrong >.> ):

[MeterTime]
Meter=STRING
MeasureName=Time
MouseOverAction=!Execute [!RainmeterHideMeter Time][!RainmeterShowMeter Date][!RainmeterRedraw]

[MeterDate]
Meter=STRING
MeasureName=Date
Hidden=1
MouseLeaveAction=!Execute[!RainmeterHideMeter Date][!RainmeterShowMeter Time][!RainmeterRedraw]


If anybody could help, it would be greatly appreciated! Thanks in advance! :)
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: MouseOver & MouseLeave Clock Help

Post by dragonmage »

Putting your MouseOver/Leave lines in the [Rainmeter] section will work better in this case.

You see the mouseleaveactions on a meter require the cursor to travel over another meter or the skin background in order to register that it has left the meter. If your meter is as big as or nearly as big as the total skin background then there is no way for Rainmeter to register you leaving the meter.

Putting the actions in the [Rainmeter] section applies them to the entire skin, which in this case should be perfectly acceptable since this is a simple two meter skin. The mouse actions will register entering or leaving the skin, not a particular meter.
Reflex
Posts: 15
Joined: June 19th, 2010, 3:13 am

Re: MouseOver & MouseLeave Clock Help

Post by Reflex »

Well that seemed to do the trick, thanks. :D