It is currently September 8th, 2024, 2:34 am

[Feature Suggestion] Measure: MousePosition

Report bugs with the Rainmeter application and suggest features.
Omardude
Posts: 22
Joined: December 2nd, 2009, 7:05 pm

[Feature Suggestion] Measure: MousePosition

Post by Omardude »

I figured I'm on a streak here with the suggestions so I'm gonna throw one other idea out here. This measure would basically measure the current mouse location. Could be a more controllable approach to the MouseOverAction and MouseLeaveAction bangs, although more CPU intensive. In addition, it could be used for a "meter follow mouse" effect.

Example:

Code: Select all

[MousePositionX]
Measure=MousePosition
Parameter=X

[MousePositionY]
Measure=MousePosition
Parameter=Y
What do you think? :)
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: [Feature Suggestion] Measure: MousePosition

Post by dragonmage »

That could be pretty useful.
User avatar
jsmorley
Developer
Posts: 22715
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Feature Suggestion] Measure: MousePosition

Post by jsmorley »

I'm concerned that you would need Update=10 or something to have any hope of a mouse position measure be of any value. That would be a CPU killer. Maybe spx can weigh in.
Omardude
Posts: 22
Joined: December 2nd, 2009, 7:05 pm

Re: [Feature Suggestion] Measure: MousePosition

Post by Omardude »

jsmorley wrote:I'm concerned that you would need Update=10 or something to have any hope of a mouse position measure be of any value. That would be a CPU killer. Maybe spx can weigh in.
Hmm, thats true. How about turning it into a bang that updates the measure instead? As "!RainmeterGetMousePosition"? This could be used to place a menu where the mouse is clicked.

Quick example:

Code: Select all

[BarSettingsMenuPositionX]
Measure=MousePosition
Parameter=X

[BarSettingsMenuPositionY]
Measure=MousePosition
Parameter=Y

[BarMeter]
Meter=Image
SolidColor=255,255,255
RightMouseDownAction=!Execute ["Something"]
LeftMouseDownAction=!execute [!RainmeterGetMousePosition BarSettingsMenuPositionX][!RainmeterGetMousePosition BarSettingsMenuPositionY][!RainmeterShowMeter BarSettingsMenu]

[BarSettingsMenu]
Meter=String
MeterStyle=SomeStringStyle
X=[BarSettingsMenuPositionX]
Y=[BarSettingsMenuPositionY]
Hidden=1
DynamicVariables=1
Text=Settings
RightMouseDownAction=!Execute ["SomeSettings"]
LeftMouseDownAction=!RainmeterHideMeter BarSettingsMenu