It is currently May 17th, 2022, 6:27 pm

[Script] Path Parser

Discuss the use of Lua in Script measures.
User avatar
Posts: 370
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: [Script] Path Parser

Post by StArL0rd84 »

Yeah sry about digging up this old post.
but tnx again balala, it worked.
Well, after i also added: if sOutput == 'Drive' then
return sDrive
At the bottom of the script.
I think i actually learned something about lua today. tnx
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
Rainmeter Sage
Posts: 14205
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Script] Path Parser

Post by balala »

But to be honest, if you need just the drive letter, there is no need to use a lua script. A simple String measure can do the job.
Eg, the following [MeasureDrive] measure returns the needed letter:

Code: Select all


It's much more simpler and easier to use.