Quantcast
Viewing all articles
Browse latest Browse all 696

Help: Rainmeter Skins • Re: Sending powershell commands with curly brackets issue

Maybe something like:

Skin:

Code:

[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1[MeasureRun]Measure=PluginPlugin=RunCommandProgram=PowerShellParameter=-NoProfile -ExecutionPolicy Bypass -Command "& '.\myScriptFile.ps1'State=HideOutputType=ANSIRegExpSubstitute=1Substitute="\n":"#CRLF#","  ":""[MeasureCounter]Measure=CalcFormula=1UpdateDivider=5OnUpdateAction=[!CommandMeasure MeasureRun "Run"][MeterString]Meter=StringW=300H=200FontColor=255,255,255,255FontSize=12SolidColor=0,0,0,1Text=[MeasureRun]AntiAlias=1DynamicVariables=1ClipString=2
MyScriptFile.ps1:

Code:

$string = ping 8.8.8.8  -n 1$dateStamp = Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss"$newString = "$dateStamp `r`n`r`n $string"Write-Host $newString

1.jpg


This script eliminates the "never-ending" nature and the ForEach{} array loop.
This is actually solving the curly bracket issue! Image may be NSFW.
Clik here to view.
:thumbup:

Statistics: Posted by rbriddickk84 — November 30th, 2024, 7:08 pm



Viewing all articles
Browse latest Browse all 696

Trending Articles