It is currently March 29th, 2024, 11:13 am

Cursor Click, Cursor Trail, Up Time

Get help with installing and using Rainmeter.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Cursor Click, Cursor Trail, Up Time

Post by Yincognito »

balala wrote: September 1st, 2020, 8:08 pmYes, but unfortunately still something to be done (middle click) in order to can click on desktop elements or other things. Additionally if you set on the click through, the skin doesn't measure what it has to measure (the trail and the clicks). So, this are some inconveniences which can't be circumvented in Rainmeter. That's why I have recommended to look for a proper software to do all this.
Indeed, you're right. Well, at least I've done everything possible to be done in Rainmeter in this regard. :confused:
balala wrote: September 1st, 2020, 8:08 pmAdditional thing I recommend you to take into account:
  • Quotes are never needed in options. I suppose (hope) you, as an experimented user, know this. You've added such quotes on the Text options of the String meters.
  • Instead of working with the numeric values of the Time measures, it is a much better idea to use their TimeStamp value. That's why I'd replace the SecondsValue of the [MeasureUptime] measure with the following one: SecondsValue=([MeasureCurrentTime:TimeStamp] - [MeasureUserLogonTime:]). In this case there is no difference between the two options, but if you set a format on the Time measure, a huge difference immediately arrises. For instance see the difference below:

    Code: Select all

    [MeasureSecond]
    Measure=Time
    Format=%#S
    
    [MeterSecond]
    Meter=STRING
    X=0
    Y=0
    Padding=15,5,15,5
    FontColor=220,220,220
    FontEffectColor=0,0,0
    StringEffect=Shadow
    SolidColor=0,0,0,150
    FontSize=8
    FontFace=Segoe UI
    StringStyle=BOLD
    StringAlign=LEFT
    AntiAlias=1
    Text=Numeric: [MeasureSecond:]#CRLF#TimeStamp: [MeasureSecond:TimeStamp]
    DynamicVariables=1
    A few details: https://forum.rainmeter.net/viewtopic.php?f=5&t=30928&p=157593&p157593#p157593
Yes, you're right again. However, in the matter of quotes, I'll continue to use them the way I do now. I don't care at all for "this should be done and this shouldn't" just because it's "the right way", as long as the advantages are greater than the disadvantages, from a practical point of view. Adding the quotes do NOT hurt, while not adding them DOES. So, I add them all the time, without worrying whether this is a situation where I should add them or a situation that doesn't require them. Plus, I come from a programming background, and there if you don't add the quotes to tell the compiler that "this is a string", you get either an error or some other issue. I like to be consistent about things, so this I'm afraid won't change. :)

As for the numeric values of the Time measures vs. their TimeStamp value, I'm not sure you're right, although you certainly appear to be at first sight. This is because the code in the skin didn't use any Format, and as explained here, if Format is not defined [...] the number value will be a Windows timestamp. If Format is defined, the number value will be the value defined by the format, or zero if the format does not define a numeric value. In any case, you should take this to jsmorley, because that piece of code is just copied from the manual, LOL.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Cursor Click, Cursor Trail, Up Time

Post by jsmorley »

Yincognito wrote: September 2nd, 2020, 3:10 am Yes, you're right again. However, in the matter of quotes, I'll continue to use them the way I do now. I don't care at all for "this should be done and this shouldn't" just because it's "the right way", as long as the advantages are greater than the disadvantages, from a practical point of view. Adding the quotes do NOT hurt, while not adding them DOES. So, I add them all the time, without worrying whether this is a situation where I should add them or a situation that doesn't require them. Plus, I come from a programming background, and there if you don't add the quotes to tell the compiler that "this is a string", you get either an error or some other issue. I like to be consistent about things, so this I'm afraid won't change. :)
All I ask is that you not make a point of contradicting our guidance and advice on this matter. Starting and ending quotes are pointless and should not be used on any option values. They really only serve any purpose in a few distinct places. 1) In the parameters of bangs, 2) In the context of how Substitute is written, 3) When quoting external commands using the RunCommand plugin.

I don't care a bit if someone uses quotes where they are not needed, I'm never going to make a big deal out of it or particularly correct them for it, although I will certainly remove them if I am helping someone with some code for some other reason. However, if one of us points out that starting and ending quotes are not needed on any option values, that is the correct advice, as any quotes that start and end any option value are always entirely ignored. I won't be pleased if we quibble about it again and again.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Cursor Click, Cursor Trail, Up Time

Post by Yincognito »

jsmorley wrote: September 2nd, 2020, 4:15 am All I ask is that you not make a point of contradicting our guidance and advice on this matter. Starting and ending quotes are pointless and should not be used on any option values. They really only serve any purpose in a few distinct places. 1) In the parameters of bangs, 2) In the context of how Substitute is written, 3) When quoting external commands using the RunCommand plugin.

I don't care a bit if someone uses quotes where they are not needed, I'm never going to make a big deal out of it or particularly correct them for it, although I will certainly remove them if I am helping someone with some code for some other reason. However, if one of us points out that starting and ending quotes are not needed on any option values, that is the correct advice, as any quotes that start and end any option value are always entirely ignored. I won't be pleased if we quibble about it again and again.
Longer version:
I didn't in any way contradict you or any member of Rainmeter team on their guidance and advice on this matter - I actually said balala is "right again" above (notice the difference between "guidance and advice" and enforcing rules on everyone). Also, bear in mind that I only talked about myself when talking about quotes - I didn't make a big deal out of it, I didn't start the quibble, I didn't suggest that anyone should do what I do. I'd like to have the freedom to do "pointless" (or "hideously complicated" and such) things if I want to and respond to anyone trying to suggest that I (as in me) should do otherwise - with proof and in a civilized manner, obviously. I expect others to do the same and point out where and if I was mistaken, using similar evidence (as opposed to "code review best practices", which is what this really is).

That being said, from a general point of view, I will always contradict someone if my approach is producing the expected result, and especially if that someone is talking about me - free will, freedom and truth are things I hold dear, coming from an environment having some bad history on the matter, as I'm sure you know already. I don't think you saw me ever suggest to anyone that they should use quotes when they were not needed - I let that sort of guidance in your capable hands. One thing that should be said however is that it isn't wise to turn that guidance into something mandatory, or threaten / silence (cause "you won't be pleased") anyone - well, not anyone, just those having a different opinion and are not in the official Rainmeter team, i.e. "one of you" - when they dare to say otherwise (speaking about themselves).

By the way, if you want no quibble about the quotes in my code, please advise team members to avoid keep bringing this issue every freaking time I post some 5 lines piece of code, LOL - or if they do, point it out to the user asking for help ("hey, user, you can safely remove Yincognito's quotes from there and there, cause they're absolutely pointless"). I mean, I was already being nice and didn't say "oh, please, don't mention this for the umpteenth time, I know about it, you're right and all that" (like other folks did in a more rude manner in the past, curiously though they didn't receive any backlash on it), so I chose to explain - yet again - the reasoning for my case. Sorry if it hurt your official stance on it, but it was just my way of saying "yes, I know about it and it's correct, but I will not change my approach". I can do that, can't I? :???:

Or, I can just stop posting on the forum if disagreeing from the official narrative is forbidden. After all, it's not like I do these things for me. Trying to help only to receive criticism every once in a while from team members when we disagree on the code is not exactly "motivational" - especially when this is not about the end result itself, but about best practices.
Shorter version:
Please read again my post, I didn't contradict the team members' guidance on the matter, I only spoke about what I do. Is this forbidden?! :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cursor Click, Cursor Trail, Up Time

Post by balala »

Yincognito wrote: September 2nd, 2020, 3:10 am Adding the quotes do NOT hurt,
Agree.
Yincognito wrote: September 2nd, 2020, 3:10 am while not adding them DOES. So, I add them all the time, without worrying whether this is a situation where I should add them or a situation that doesn't require them.
Does it hurt? I doubt. However finally it's your choice indeed if you want or don't want to use them.
Anyway as jsmorley said, the quotes are completely ignored on options and there are no cases when they are required, not even on Substitute option. That's why both of the following Substitute options are working: Substitute="1":"One" respectively Substitute=1":"One.
Yincognito wrote: September 2nd, 2020, 3:10 am As for the numeric values of the Time measures vs. their TimeStamp value, I'm not sure you're right, although you certainly appear to be at first sight. This is because the code in the skin didn't use any Format, and as explained here, if Format is not defined [...] the number value will be a Windows timestamp. If Format is defined, the number value will be the value defined by the format, or zero if the format does not define a numeric value. In any case, you should take this to jsmorley, because that piece of code is just copied from the manual, LOL.
As I said, if no Format option is defined on the Time measure, the numeric value and the TimeStamp value are the same. But in my opinion, it seems a good practice to get used to use the TimeStamp value of a Time measure, instead of its numeric value (even if format is not defined). Can avoid a lot of later headache.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Cursor Click, Cursor Trail, Up Time

Post by Yincognito »

balala wrote: September 2nd, 2020, 9:05 am Agree.

Does it hurt? I doubt. However finally it's your choice indeed if you want or don't want to use them.
Anyway as jsmorley said, the quotes are completely ignored on options and there are no cases when they are required, not even on Substitute option. That's why both of the following Substitute options are working: Substitute="1":"One" respectively Substitute=1":"One.

As I said, if no Format option is defined on the Time measure, the numeric value and the TimeStamp value are the same. But in my opinion, it seems a good practice to get used to use the TimeStamp value of a Time measure, instead of its numeric value (even if format is not defined). Can avoid a lot of later headache.
Fully agree. Avoiding a lot of later headache remembering "is this a place where I should use quotes or not?" and the fact that adding them doesn't hurt since they are ignored in certain places is precisely the reason why I use them everywhere (similar to your advice on timestamps - better safe than sorry). For me, it's simpler this way, that's all. Maybe sometimes when I code I'm sleepy, tired or bored and don't pay attention to various places in Rainmeter that have different requirements for the same thing, so doing like I do just gets that concern out of the way with no drawbacks involved.

That being said, I by no means disagree with the guidances and advice on the matter, if this was understood. It's like smoking: I do smoke, but I would advise anyone not to, because it's bad for health. Same thing here: I do use quotes everywhere, but I would advise any user to follow your recommendation on the matter.

I hope that I've been clear this time and the issue won't come back again next time I post something on the forum... :lol: We wouldn't want jsmorley to be again "not pleased" about our friendly "quibbles". ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cursor Click, Cursor Trail, Up Time

Post by balala »

Yincognito wrote: September 2nd, 2020, 9:36 am Fully agree. Avoiding a lot of later headache remembering "is this a place where I should use quotes or not?" and the fact that adding them doesn't hurt since they are ignored in certain places is precisely the reason why I use them everywhere (similar to your advice on timestamps - better safe than sorry). For me, it's simpler this way, that's all. Maybe sometimes when I code I'm sleepy, tired or bored and don't pay attention to various places in Rainmeter that have different requirements for the same thing, so doing like I do just gets that concern out of the way with no drawbacks involved.
Alright. Don't misunderstand me either. When I see options quoted, I instantly feel I have to tell it's not needed. This is what I did in your case as well. Hope you didn't mind. If you want to use them, finally it's ok, won't cause troubles.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Cursor Click, Cursor Trail, Up Time

Post by Yincognito »

balala wrote: September 2nd, 2020, 11:21 am Alright. Don't misunderstand me either. When I see options quoted, I instantly feel I have to tell it's not needed. This is what I did in your case as well. Hope you didn't mind. If you want to use them, finally it's ok, won't cause troubles.
Yep, I get you - all good then. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Cursor Click, Cursor Trail, Up Time

Post by jsmorley »

Yes, it's certainly all good. I'm not suggesting anybody did anything wrong at all. Not in the slightest. I was just trying to forestall a situation where every time we point out that quotes around option values are not required, and that we suggest they not be used, we get into a discussion about personal preferences. I'm just not a big fan of protracted "spaces vs tabs" arguments over and over.

https://thenewstack.io/spaces-vs-tabs-a-20-year-debate-and-now-this-what-the-hell-is-wrong-with-go/

I guess my point is that balala is likely to point out that quotes are not needed every time he sees them. Assuming he is telling a different new person that each time, that is good, accurate information and meant to be helpful. I'm not suggesting that anyone did, or that anyone would, but I just don't want to see each instance of that followed by "well, here is why I do use them". I don't think that would add to any clarity a bit.

I was simply trying to nip that in the bud. No harm meant.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Cursor Click, Cursor Trail, Up Time

Post by Yincognito »

jsmorley wrote: September 2nd, 2020, 11:46 am Yes, it's certainly all good. I'm not suggesting anybody did anything wrong at all. Not in the slightest. I was just trying to forestall a situation where every time we point out that quotes around option values are not required, and that we suggest they not be used, we get into a discussion about personal preferences. I'm just not a big fan of protracted "spaces vs tabs" arguments over and over.

https://thenewstack.io/spaces-vs-tabs-a-20-year-debate-and-now-this-what-the-hell-is-wrong-with-go/

I guess my point is that balala is likely to point out that quotes are not needed every time he sees them. Assuming he is telling a different new person that each time, that is good, accurate information and meant to be helpful. I'm not suggesting that anyone did, or that anyone would, but I just don't want to see each instance of that followed by "well, here is why I do use them". I don't think that would add to any clarity a bit.

I was simply trying to nip that in the bud. No harm meant.
Ah, ok - it makes sense. Unfortunately I trigger balala's "urge" to correct the syntax almost every time I post something with quotes... :lol:
But ok, I'll just refrain to take this to an endless debate in the future (I have this "urge" just like balala has his, I'm afraid) - thanks for clarifying what you meant. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cursor Click, Cursor Trail, Up Time

Post by balala »

jsmorley wrote: September 2nd, 2020, 11:46 am I guess my point is that balala is likely to point out that quotes are not needed every time he sees them.
Exactly.
Yincognito wrote: September 2nd, 2020, 11:54 am Unfortunately almost every time I post something with quotes... :lol:
But ok, I'll just refrain to take this to an endless debate in the future (I have this "urge" just like balala has his, I'm afraid) - thanks for clarifying what you meant. :thumbup:
Sorry, I hope didn't bother anyone. Was not my intention. Just saw the quotes and as usual, I felt I have to comment it. I'm gonna try not to post such comments again (especially not for you, since I know now you know thing related to quotes), but unfortunately I can't be entirely sure it's not gonna happen never. Sorry...