It is currently March 29th, 2024, 3:00 pm

x,y plugin resetting.

Get help with creating, editing & fixing problems with skins
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

x,y plugin resetting.

Post by JediWarrior »

Hi All,
Hope everyone is well. I found this piece of code that seems to be an example of how the xy plugin works. It would be reallly handy for me to use but I can't see how to reset the x,y values to 0 when you want to start measuring. At the moment it only displays 0,0 when in the top left corner. Heres thencode for it, its not too long......

Code: Select all

[Rainmeter]
Update=50
DynamicWindowSize=1
AccurateText=1

[Metadata]
Name=MouseXY
Information=

[MeasureMouseX]
Measure=Plugin
Plugin=MouseXY
Dimension=X
MaxValue=#SCREENAREAWIDTH#

[MeasureMouseY]
Measure=Plugin
Plugin=MouseXY
Dimension=Y
MaxValue=#SCREENAREAHEIGHT#

[MeterMousePosition]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=X: [MeasureMouseX:] | Y: [MeasureMouseY:]
X=((#SCREENAREAWIDTH# / 2) - ([MeterMousePosition:W] / 2))
Y=((#SCREENAREAHEIGHT# / 2) - ([MeterMousePosition:H] / 2))
DynamicVariables=1

Has anyone any ideas how i could reset the x'y values back to 0 no matter where the cursor is on then screen.. Thanks in anticipation.... :17nodding :17nodding :17drums :17drums :17good :17good
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

Re: x,y plugin resetting.

Post by JediWarrior »

Sorry, was it something I said??? :17oops :17oops
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
Bekarfel
Posts: 217
Joined: May 16th, 2012, 5:38 am

Re: x,y plugin resetting.

Post by Bekarfel »

Probably offering thanks before you were helped, too many emoticions (or using emoticons without reason apparent), and a distinct lack of understanding of operation for the function you are trying to use, also probably posting in the wrong area.
Most people are here to help out the best way they can. If they have no answer to your question (or the answer is best given elsewhere, and you haven't bothered to find it) then they say nothing.

As for your original question, look at https://docs.rainmeter.net/manual/formulas/
https://docs.rainmeter.net/manual/variables/
and https://docs.rainmeter.net/manual/mouse-actions/
My psychic abilities infer that all three of these items will need to be magicked together to make what you want.
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: x,y plugin resetting.

Post by jsmorley »

I don't think there was / is any problem with your original post, the issue comes down to the last point that Bekarfel made. Folks respond here if they feel they can add value to a discussion and / or the discussion interests them, and don't if not. Very few people use the MouseXY plugin, and I'm not surprised that a question about it didn't get a lot of response.

Anyway, I don't really follow the question to be honest.

The MouseXY plugin simply returns the current X and Y of the mouse cursor on the screen. It has no "start" or "end", and can't be set to 0,0 unless your cursor is at 0,0 on the screen. It doesn't "measure" anything, if you mean measure in the sense of a ruler.

To "measure", you are likely going to want a mouse click to set some variable(s) to 0,0. Then when you have moved your cursor somewhere else, another mouse click could be used to get the current X, Y and subtract the variable(s) from that to get the distance traversed in pixels. With some thought and some math, MouseXY could be used to have the changing position be displayed "real-time", but it going to be clicks and Mouse Variables that are going to be the meat-and potatoes.

Do remember that MouseXY detects the mouse anywhere on your screen, but mouse clicks and hovers and such in Rainmeter will only be detected on solid parts of the screen.
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

Re: x,y plugin resetting.

Post by JediWarrior »

I really do apologise, I try to be too jovial and friendly. As soon as I posted my "something I said" comment I regretted it, it was just a product of my warped sense of humour. I know that if somebody on here can help they will and I have received more than my fair share of help with my last 2 projects from Balala and Eclectic-Tech. It was a stupid comment and I am sorry.
As far as the XYplugin goes, thanks for that information, I didn't realise the plugin just measured the xy position of the cursor. I thought it may be capable of measuring pixels from a moveable point, but I think with what you've given me I should be able to sort some thing out. So I'm not too early to thank JSMorley for his advice and great diplomacy. :17oops :17oops
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: x,y plugin resetting.

Post by fonpaolo »

JediWarrior wrote:...
As far as the XYplugin goes, thanks for that information, I didn't realise the plugin just measured the xy position of the cursor. I thought it may be capable of measuring pixels from a moveable point, but I think with what you've given me I should be able to sort some thing out. So I'm not too early to thank JSMorley for his advice and great diplomacy. :17oops :17oops
With some math and the XYPlugin, I think you can do it.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: x,y plugin resetting.

Post by balala »

JediWarrior wrote:As soon as I posted my "something I said" comment I regretted it, it was just a product of my warped sense of humour. I know that if somebody on here can help they will and I have received more than my fair share of help with my last 2 projects from Balala and Eclectic-Tech. It was a stupid comment and I am sorry.
Don't worry, from my part, that was not a problem...
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

Re: x,y plugin resetting.

Post by JediWarrior »

Thanks very much fonpoalo and Balala, Your encouragement means a lot,... :17good
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p