It is currently April 27th, 2024, 11:13 am

Reading a registry value

Discuss the use of Lua in Script measures.
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Reading a registry value

Post by balala »

Hello everyone and I wish you a Happy Easter.

I want to read a registry value with a lua script to can use this value. How can it be made? I googled the web but found nothing useful.

Thanks
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Reading a registry value

Post by jsmorley »

balala wrote:Hello everyone and I wish you a Happy Easter.

I want to read a registry value with a lua script to can use this value. How can it be made? I googled the web but found nothing useful.

Thanks
You really can't. Lua is a "platform agnostic" language and knows nothing at all about the Windows Registry.

You can however have the Rainmeter skin use the Registry measure to read the value, and then obtain the current value of that measure in the Update() function of the Lua script.
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Reading a registry value

Post by balala »

jsmorley wrote: You really can't. Lua is a "platform agnostic" language and knows nothing at all about the Windows Registry.

You can however have the Rainmeter skin use the Registry measure to read the value, and then obtain the current value of that measure in the Update() function of the Lua script.
Thank you, I found this solution, but thought there is an easier one.