Well, I'm back lol. This time I'm experimenting on creating meters using PowerShell.
When I run this code in PowerShell it works, it writes the lines correctly, but if I do it in Rainmeter it doesn't.
Code:log.txtThe problem seems to be with "+" and "`r`n". If I take them out it works but it writes everything in the same line including `r`n. Should I use some specific syntax for this case?.
This is the measure:
When I run this code in PowerShell it works, it writes the lines correctly, but if I do it in Rainmeter it doesn't.
Code:
Code:
(Get-Content "test.ini" -Raw) + "`r`n[Meter5] `r`nMeter=Shape `r`nMeterStyle=Meterstyle" | Set-Content "test.ini"
Code:
On line: 1 Character: 30+ (Get-Content send.ini -Raw) + `r`n[Meter5] `r`nMeter=Shape `r`nMeterS ...+ ~You must provide a value expression after the '+' operator.On line: 1 Character: 31+ (Get-Content send.ini -Raw) + `r`n[Meter5] `r`nMeter=Shape `r`nMeterS ...+ ~~~~~~~~~~~~Unexpected token '`r`n[Meter5]' in the expression or statement. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : ExpectedValueExpression
This is the measure:
Code:
[Add]Measure=PluginPlugin=RunCommandProgram=PowerShell Parameter=(Get-Content "test.ini" -Raw) + "`r`n[Meter5] `r`nMeter=Shape `r`nMeterStyle=Meterstyle" | Set-Content "test.ini"State=HideOutputType=UTF8OutputFile=log.txt
Statistics: Posted by RicardoTM — Today, 2:59 am