It is currently June 25th, 2019, 12:31 am

How can one get a table's length?

Discuss the use of Lua in Script measures.
User avatar
kyriakos876
Posts: 914
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: How can one get a table's length?

kyriakos876 » September 29th, 2017, 3:01 pm

Though I have no idea what this kind of encoding means to Rainmeter, I haven't noticed anything bad until now... Rainmeter works as expected with no issue whatsoever.

Edit: Oh.. there's that. Yea... Okay I might drop this then and work with .lua normally...
Last edited by kyriakos876 on September 29th, 2017, 3:02 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How can one get a table's length?

jsmorley » September 29th, 2017, 3:02 pm

kyriakos876 wrote:Though I have no idea what this kind of encoding means to Rainmeter, I haven't noticed anything bad until now... Rainmeter works as expected with no issue whatsoever.
No, it doesn't... ;-)
User avatar
kyriakos876
Posts: 914
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: How can one get a table's length?

kyriakos876 » September 29th, 2017, 3:14 pm

jsmorley wrote:No, it doesn't... ;-)
Okay, you have every right to hate me right now, BUT what if I have a .txt file with the edited data and use this to read/write with the .lua script and use @Include=This.txt on the main .ini file that will be encoded as it should? Wouldn't that fix the encoding issues?
User avatar
jsmorley
Developer
Posts: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How can one get a table's length?

jsmorley » September 29th, 2017, 3:18 pm

kyriakos876 wrote:Okay, you have every right to hate me right now, BUT what if I have a .txt file with the edited data and use this to read/right with the .lua script and use @Include=This.txt on the main .ini file that will be encoded as it should? Wouldn't that fix the encoding issues?
I haven't tested, but I think that might work, as long as the .txt file has no encoding, and contains no Unicode or characters from the "Extended ASCII" part of the ASCII table. If you stay with characters 1-127 of the ASCII table, that might work.
User avatar
kyriakos876
Posts: 914
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: How can one get a table's length?

kyriakos876 » September 29th, 2017, 3:26 pm

jsmorley wrote:I haven't tested, but I think that might work, as long as the .txt file has no encoding, and contains no Unicode or characters from the "Extended ASCII" part of the ASCII table. If you stay with characters 1-127 of the ASCII table, that might work.
I hear you loud and clear. The plan never was to have my Greek name on the bottom of the .txt file, written with Greek characters as a signature anyway. :)
User avatar
dvo
Posts: 540
Joined: February 7th, 2016, 6:08 am

Re: How can one get a table's length?

dvo » September 29th, 2017, 6:22 pm

uhm i think it's something like "Αχιλλευς" for jsmorley :P :lol: :oops: