It is currently October 9th, 2024, 7:32 pm

Small docs suggestions

Discussions about the documentation, main Rainmeter site and forums.
User avatar
Jeff
Posts: 353
Joined: September 3rd, 2018, 11:18 am

Re: Small docs suggestions

Post by Jeff »

SilverAzide wrote: December 31st, 2022, 5:26 am I would think the "centers" should be in the center; i.e., LeftTop | CenterTop | RrightTop; then LeftCenter | CenterCenter | RightCenter, etc.
Sorry I got absolutely sick on New Years and only now have energy. I was inspired by the order on the docs, which has been ordered like that since... *gets book off the shelf* *blows off dust* *sneezes* Manual Rewrite from 28 Oct 2012.

That can do though!
Image

And for me speaking for me, the long image can be made into a Tips & Trick page instead, I'll probably rewrite it later.
User avatar
Jeff
Posts: 353
Joined: September 3rd, 2018, 11:18 am

Re: Small docs suggestions

Post by Jeff »

User avatar
Yincognito
Rainmeter Sage
Posts: 8397
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Small docs suggestions

Post by Yincognito »

Moved this from a post in another section of the forum:
1) here, the example path should be C:\Users\YourName\Documents\Rainmeter\Skins\ instead of the current C:\Users\YourName\My Documents\Rainmeter\Skins\, in order to be consistent with the other example paths on the page and direct the user to the actual folder and not its shortcut
2) here:
a) the e.g. for %c should be "Sat Dec 26 2015 22:55:03" or similar, instead of the current "Sat Dec 26 22:55:03 2015", according to the (correct) order in the subsequent %#c format code
b) the e.g. for %T should be 22:55:03 instead of the current 22:55
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
nek
Posts: 119
Joined: November 3rd, 2019, 12:00 am

Re: Small docs suggestions

Post by nek »

Yincognito wrote: April 14th, 2023, 2:49 pm 1) here, the example path should be C:\Users\YourName\Documents\Rainmeter\Skins\ instead of the current C:\Users\YourName\My Documents\Rainmeter\Skins\, in order to be consistent with the other example paths on the page and direct the user to the actual folder and not its shortcut
2) here:
a) the e.g. for %c should be "Sat Dec 26 2015 22:55:03" or similar, instead of the current "Sat Dec 26 22:55:03 2015", according to the (correct) order in the subsequent %#c format code
b) the e.g. for %T should be 22:55:03 instead of the current 22:55
I have created GitHub Pull Requests.
1) From My Documents to Documents #43
2) b) Time Format %T example #42 #48

ABOUT 2) a) Time Format %c e.g."Sat Dec 26 22:55:03 2015"
This example is the same result as my tested skin. So I didn't modify the document about this.
TimeMeasure.Format.01.png
TimeMeasure.Format.02.png
Code:

Code: Select all

;; Time measure Format codes | https://docs.rainmeter.net/manual/measures/time/#FormatCodes
;; Date and Time formats (ISO 8601) | https://en.wikipedia.org/wiki/ISO_8601
;; Date format by country | https://en.wikipedia.org/wiki/Date_format_by_country
;; [MS-LCID]: Windows Language Code Identifier (LCID) Reference | https://learn.microsoft.com/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c

[Variables]
;; Skin scaling
$=1.00
FONT_SIZE=15

[Rainmeter]
Update=-1
;DefaultUpdateDivider=-1
AccurateText=1
MouseActionCursor=0

[sTime_c]
Measure=Time
Format=%c

[sTime_ns_c]
Measure=Time
Format=%#c

[sTime_c_Local]
Measure=Time
Format=%c
FormatLocale=Local

[sTime_c_en]
Measure=Time
Format=%c
FormatLocale=en

[sTime_c_en-US]
Measure=Time
Format=%c
FormatLocale=en-US

[sTime_c_en-001]
Measure=Time
Format=%c
FormatLocale=en-001

[sTime_c_en-GB]
Measure=Time
Format=%c
FormatLocale=en-GB


[tPreview]
X=(10*#$#)
Y=(4*#$#)R
AntiAlias=1
FontColor=171717
FontFace=Consolas
FontSize=(#FONT_SIZE#*#$#)
FontWeight=500
Padding=(8*#FONT_SIZE#/15*#$#),(4*#FONT_SIZE#/15*#$#),(8*#FONT_SIZE#/15*#$#),(4*#FONT_SIZE#/15*#$#)
SolidColor=E2E8F0

[Caption1]
Meter=String
MeterStyle=tPreview
Y=(10*#$#)R
FontColor=FFFFFF99
SolidColor=1E293B
InlinePattern=(?m)^.*\z
InlineSetting=Color|FFFFFFFF
Text=Measure=Time[\9]#CRLF#Format=

[Output1]
Meter=String
MeterStyle=tPreview
;; Format=%c
MeasureName =sTime_c
;; Format=%#c
MeasureName2=sTime_ns_c
InlinePattern=(?m)^[^\t]+
InlineSetting=Color|8B0000
Text=%c[\9]%1#CRLF#%#c[\9]%2

[Caption2]
Meter=String
MeterStyle=tPreview
Y=(10*#$#)R
FontColor=FFFFFF99
SolidColor=1E293B
InlinePattern=(?m)^.*\z
InlineSetting=Color|FFFFFFFF
Text=Measure=Time#CRLF#Format=%c#CRLF#FormatLocale=[\9]

;; Format=%c
[Output2]
Meter=String
MeterStyle=tPreview
MeasureName =sTime_c
MeasureName2=sTime_c_Local
MeasureName3=sTime_c_en
MeasureName4=sTime_c_en-US
MeasureName5=sTime_c_en-001
MeasureName6=sTime_c_en-GB
InlinePattern=(?m)^[^\t]+
InlineSetting=Color|8B0000
Text=[\9]%1#CRLF#Local[\9]%2#CRLF#en[\9]%3#CRLF#en-US[\9]%4#CRLF#en-001[\9]%5#CRLF#en-GB[\9]%6
Rainmeter 4.5.17.3700 (64-bit)
Language: English (1033)
Build time: 2022-12-24 20:33:24
Windows 10 Pro 22H2 (build 19045.2846) 64-bit - Japanese (1041)
Language(Locale) Tag: ja-JP


📗 Time measure Format codes - Rainmeter Docs | MeasureTime.cpp
📘 Time formatting codes, Locale - Microsoft Docs
📚 Date and Time formats (ISO 8601), Date format by country - Wikipedia
You do not have the required permissions to view the files attached to this post.
Last edited by nek on April 15th, 2023, 3:04 am, edited 3 times in total.
User avatar
Yincognito
Rainmeter Sage
Posts: 8397
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Small docs suggestions

Post by Yincognito »

nek wrote: April 14th, 2023, 4:27 pmI have created GitHub Pull Requests.
Thanks - much appreciated. :thumbup:
nek wrote: April 14th, 2023, 4:27 pm ABOUT 2) a) Time Format %c e.g."Sat Dec 26 22:55:03 2015"
This example is the same result as my tested skin. So I didn't modify the document about this.
I guess it depends on the locale one uses - didn't know there was a locale where the time is written between the day number and the year number AND the long form of that is in a completely different order with time being the last, but anyway. The idea was to make the examples for %c and %#c similar as if they used the same system locale (since they both referred to it).

P.S. There was no need for a code on this, I already have it for a while now - I discovered these inconsistencies while trying to replicate these formats in Javascript for use with the WebView2 plugin:

Code: Select all

[Variables]

[Rainmeter]
Update=-1
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[Time]
Measure=Time
TimeStamp=2015-12-26 22:55:03
TimeStampFormat=%Y-%m-%d %H:%M:%S
Format=" %%a: %a%n %%A: %A%n %%b: %b%n %%B: %B%n %%c: %c%n %%#c: %#c%n %%C: %C%n %%d: %d%n %%D: %D%n %%e: %e%n %%F: %F%n %%g: %g%n %%G: %G%n %%h: %h%n %%H: %H%n %%I: %I%n %%j: %j%n %%m: %m%n %%M: %M%n %%n: %n%n %%p: %p%n %%r: %r%n %%R: %R%n %%S: %S%n %%t: %t%n %%T: %T%n %%u: %u%n %%U: %U%n %%V: %V%n %%w: %w%n %%W: %W%n %%x: %x%n %%#x: %#x%n %%X: %X%n %%y: %y%n %%Y: %Y%n %%z: %z%n %%Z: %Z%n %%%%: %%%n"
FormatLocale=it-IT

---Meters---

[Text]
Meter=String
FontFace=Consolas
FontColor=255,255,255,255
Padding=5,5,5,5
FontSize=10
AntiAlias=1
MeasureName=Time
Text="%1"
Time.jpg
EDIT: Ok, the reason for that strange order is probably because you don't use a FormatLocale option in your [sTime_c] and [sTime_ns_c] in the first place (can they be regional this way, I wonder). Which made me read the note on that page again:
While any Format string desired can be used, the codes like %#c that return long or short representations of the date and/or time for the system locale or the locale defined by TimeStampLocale or FormatLocal are particularly useful for easily changing between locale values from the "input" to the "output". Not only will it use the language defined by the locale, but also with the appropriate order, structure and punctuation.
Besides the obvious implication of this (i.e. no Locale option, no proper order), a missing e is needed for the last reference to FormatLocale above.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Jeff
Posts: 353
Joined: September 3rd, 2018, 11:18 am

Re: Small docs suggestions

Post by Jeff »

So uhhh... I forked the docs because I wanted to make PRs for most of my suggestions which never got implemented... and then nek7u did all of the things I wanted to do like an absolute legend.

Just wanted to bring the spotlight on them, thank you very much for showing that a community works like one!
Last edited by Jeff on May 31st, 2023, 5:20 pm, edited 1 time in total.
User avatar
Jeff
Posts: 353
Joined: September 3rd, 2018, 11:18 am

Re: Small docs suggestions

Post by Jeff »

With that out of the way, both C++ and C# pages tell you to call functions like [PluginMeasure:func(someArg1, someArg2)], which is incorrect and will never work, the little & should be added so it's [&PluginMeasure:func(someArg1, someArg2)], which is correct. The section should also mention that you need DynamicVariables=1 always enabled.
User avatar
Brian
Developer
Posts: 2738
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Small docs suggestions

Post by Brian »

Jeff wrote: May 31st, 2023, 5:19 pm With that out of the way, both C++ and C# pages tell you to call functions like [PluginMeasure:func(someArg1, someArg2)], which is incorrect and will never work, the little & should be added so it's [&PluginMeasure:func(someArg1, someArg2)], which is correct. The section should also mention that you need DynamicVariables=1 always enabled.
The & prefix is not required, unless nesting with other section variables.

For example, using jsmorley's ConfigActive skin, if you remove the & before ALL calls to the inline lua functions, the skin works just fine.


We will discuss if a note about DynamicVariables is needed in that section. The purpose of the developer plugin pages are to inform the plugin developer how to structure their plugin, and how and when their custom is called - not necessarily how to write a skin. There might be a situation where the skin calls a function that is meant to only be run once, thus not needing DynamicVariables.

-Brian
User avatar
Jeff
Posts: 353
Joined: September 3rd, 2018, 11:18 am

Re: Small docs suggestions

Post by Jeff »

Brian wrote: May 31st, 2023, 7:46 pm The & prefix is not required, unless nesting with other section variables.

For example, using jsmorley's ConfigActive skin, if you remove the & before ALL calls to the inline lua functions, the skin works just fine.

-Brian
You're right, tested it and it works. I have 0 idea why the code I wrote previously didn't work in the slightest without the & symbol, now it works with and without the character. I blame a neuron star for the bit flip.
User avatar
Jeff
Posts: 353
Joined: September 3rd, 2018, 11:18 am

Re: Small docs suggestions

Post by Jeff »

https://docs.rainmeter.net/developers/#SendMessage

Unless SendMessage has been deprecated because it has 0 popularity (beside RestartRainmeter.exe), the section of the page could benefit from having the queries listed from the rainmeter/Library/RainmeterQuery.h file, a direct link to the GitHub page should be more than enough