It is currently September 18th, 2019, 12:09 am

(Modified) How to empty text file? > Specify File Path

Help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 8620
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: (Modified) How to empty text file? > Specify File Path

balala » August 31st, 2019, 12:15 pm

I know this is a little bit late, but if still interested, here is another way to achieve the same thing. This time you won't need a lua script file to empty the text file, but will need a RunCommand plugin measure. So, add the following measure to your code:

Code: Select all

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=break > "#MyFile#"
State=Hide
OutputType=ANSI
Running the above measure, empties the file. To run it, replace the LeftMouseUpAction option of the [Button] meter with the following one: LeftMouseUpAction=[!CommandMeasure "MeasureRun" "Run"].