It is currently September 1st, 2024, 2:51 am
Notepad++: Snippets for Rainmeter
-
- Developer
- Posts: 22710
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Notepad++: Snippets for Rainmeter
Note that if you have already gone though this process to get RainLexer working properly, there is no need to go through all of this again. Simply use Plugin Admin in Notepad++, and install the "Snippets" plugin. You won't get any error, there is at least one "default" library included, I think an ASCII table or something. Then download the .zip file in the first post of this thread, unzip it, and using the functionality in Snippets in Notepad++, import one or both sets of Rainmeter snippets. Bob's your uncle...
-
- Rainmeter Sage
- Posts: 5495
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Notepad++: Snippets for Rainmeter
Thanks... I edited the post so users can skip your steps if they already have it upgraded. ![Great :great:](./images/smilies/dn.gif)
![Great :great:](./images/smilies/dn.gif)
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Notepad++: Snippets for Rainmeter
Just checked it out - amazing, especially great for IfConditions and IfMatch, as I always find it inconvenient to have to write those 4 options (I almost always use IfConditionMode=1 and IfMatchMode=1).
I even added a - Add Measure Disable and - Add Meter Hidden to the Rainmeter Templates section, and works great!
What I would get rid of (and I will, for sure) is the amount of useless comments about the functions in a Calc measure. In my view, a link to the Rainmeter.net page regarding formulas would be more suitable (just like for the other measures), otherwise you spend more time deleting stuff you don't need than actually writing the needed line(s).
Just one question: you said somewhere that the changes made by the user will be "remembered" and won't be overwritten on updating. Care to elaborate a little bit?
Brilliant work!
![Rose Gift :rosegift:](./images/smilies/ax.gif)
![Rose Gift :rosegift:](./images/smilies/ax.gif)
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
What I would get rid of (and I will, for sure) is the amount of useless comments about the functions in a Calc measure. In my view, a link to the Rainmeter.net page regarding formulas would be more suitable (just like for the other measures), otherwise you spend more time deleting stuff you don't need than actually writing the needed line(s).
Just one question: you said somewhere that the changes made by the user will be "remembered" and won't be overwritten on updating. Care to elaborate a little bit?
Brilliant work!
![Great :great:](./images/smilies/dn.gif)
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
![Rose Gift :rosegift:](./images/smilies/ax.gif)
-
- Rainmeter Sage
- Posts: 16485
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Notepad++: Snippets for Rainmeter
Take care of this, It can give you a lot of headache, crashing many times the whole Rainmeter.Yincognito wrote: ↑September 24th, 2020, 1:27 pm (I almost always use IfConditionMode=1 and IfMatchMode=1)
-
- Developer
- Posts: 22710
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Notepad++: Snippets for Rainmeter
I don't think there is any particular danger with using IfConditionMode=1 or IfMatchMode=1, other than the fact that in the grand scheme of things, that can be pretty "expensive", since in many cases you are constantly firing whatever actions you define on them, on every single skin update, rather than just when the condition changes from true to false or false to true. It depends a bit on what the actions are doing of course, but it's never going to be efficient to constantly set "A" to "A" for example.
What I think balala is alluding to is that if you are not somewhat careful, and you for instance to have any kind of !Refresh included in the action(s), that can easily cause an endless loop that can in fact bring Rainmeter to its knees.
Those options have their uses, and can really be needed in some cases, but I'd be hesitant to just default to them...
What I think balala is alluding to is that if you are not somewhat careful, and you for instance to have any kind of !Refresh included in the action(s), that can easily cause an endless loop that can in fact bring Rainmeter to its knees.
Those options have their uses, and can really be needed in some cases, but I'd be hesitant to just default to them...
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Notepad++: Snippets for Rainmeter
Yep, agreed, but then I also almost always set UpdateDivider=-1 on the measures where the conditions or match testing happens, in effect always updating them on demand. I guess in this case the danger is if not entirely canceled, at least alleviated, right?jsmorley wrote: ↑September 24th, 2020, 1:36 pm I don't think there is any particular danger with using IfConditionMode=1 or IfMatchMode=1, other than the fact that in the grand scheme of things, that can be pretty "expensive", since in many cases you are constantly firing whatever actions you define on them, on every single skin update, rather than just when the condition changes from true to false or false to true. It depends a bit on what the actions are doing of course, but it's never going to be efficient to constantly set "A" to "A" for example.
What I think balala is alluding to is that if you are not somewhat careful, and you for instance to have any kind of !Refresh included in the action(s), that can easily cause an endless loop that can in fact bring Rainmeter to its knees.
Those options have their uses, and can really be needed in some cases, but I'd be hesitant to just default to them...
-
- Rainmeter Sage
- Posts: 16485
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Notepad++: Snippets for Rainmeter
Yeah, if the UpdateDivider is set to -1, then indeed, the danger is much smaller.Yincognito wrote: ↑September 24th, 2020, 1:47 pm Yep, agreed, but then I also almost always set UpdateDivider=-1 on the measures where the conditions or match testing happens, in effect always updating them on demand. I guess in this case the danger is if not entirely canceled, at least alleviated, right?
-
- Rainmeter Sage
- Posts: 16485
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Notepad++: Snippets for Rainmeter
Exactly. But not just a !Refresh can cause problems, a simple !Update (as well as an !UpdateMeasure *) also can, but there might be some other cases as well, which I now didn't take into account.
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Notepad++: Snippets for Rainmeter
True. I'm careful with that as well. That being said, I have the habbit of simulating a short FOR..NEXT loop in Rainmeter, in certain scenarios, and I actually used updating the said measure in an IfCondition (yeah, I know, I don't follow some recommendations, my bad, but then if you always follow recommendations you'll never get the chance to experiment and find new ways of doing things). Bottom line, as long as you're very careful with the logic of the code, endless loops - and I have some experience with those - won't happen. But yeah, by all means, the recommendation is a perfectly valid one.
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
-
- Rainmeter Sage
- Posts: 5495
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Notepad++: Snippets for Rainmeter
Hmm... I just read through this thread and did not find that "remembered" statement, but if it was said, it is NOT correct.Yincognito wrote: ↑September 24th, 2020, 1:27 pm ...
Just one question: you said somewhere that the changes made by the user will be "remembered" and won't be overwritten on updating. Care to elaborate a little bit?
Brilliant work!![]()
![]()
![]()
Updates will overwrite any changes you made.
I will be looking through the current snippets to update and add new features; I will look at adding the ones you mentioned and agree that the Calc measure snippet is far too verbose. I will remove everything except the documentation link. Thanks!
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::