It is currently June 26th, 2019, 12:45 am

[Script] Path Parser

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

Re: [Script] Path Parser

StArL0rd84 » May 30th, 2017, 8:00 pm

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
(#WorkTime# = 1 ? #Work# : ([mEnergyLoss:%] > 100 ? #SleepMode# : #Rainmeter#))
User avatar
Rainmeter Sage
Posts: 8312
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Script] Path Parser

balala » May 30th, 2017, 8:12 pm

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.