It definitely is possible. For instance create the Script.lua file into the @Resources folder of your config (obviously you can use any valid name, just make sure to set the proper name in the [MeasureLuaScript] measure of yoru skin):Please tell me an example of luascript that erases the contents of a specific file. if this is possible.
Code:
function EmptyFile(file)io.open(file,"w"):close()end
Add the following function to the previously created Script.lua file, beside the already existing EmptyFile function:And also an example of writing to a file.
Code:
function WriteFile(file, stringTowrite)filewrite = io.open(file, "w")filewrite:write(stringTowrite)filewrite:close()end
If you did this, when you left click the meter you've added the above two options to, the appropriate file is emptied, while when you right click it, the Text to be written into the file text is written to the file.
Obviously if you simply right click the meter (without left clicking it first), the Text to be written into the file string is written to the file, without emptying it first.
Please let me know if you can't get any of the above functions to work.
Statistics: Posted by balala — Today, 5:40 pm