Code: Select all
[mArray]
Measure=String
String=[mDeduplicate]
DynamicVariables=1
UpdateDivider=-1
Substitute="startoffile#CRLF#":'(',"#CRLF#":'), (',", (endoffile), (":'',"x":'*'
OnChangeAction=[!CommandMeasure mArrayMath "run"]
[mArrayMath]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell.exe
Parameter='$A = [&mArray] #CRLF#for ($i = 0; $i -lt $A.Length; $i++){$A[$i]}'
State=Hide
OutputType=UTF8
OutputFile=#@#txt\5_Array.txt
DynamicVariables=1
$A = [&mArray] #CRLF#for ($i = 0; $i -lt $A.Length; $i++){$A[$i]}
But I can get it to work using the raw data like this:
$A = (640*480), (720*480), (800*600), (1024*768), (1152*864), (1176*664), (1280*720), (1280*768), (1280*800), (1280*960), (1280*1024), (1360*768), (1366*768), (1600*900), (1600*1024), (1600*1200), (1680*1050), (1920*1080), (1920*1200), (1920*1440), (2560*1440), (3840*1080), (5120*1440), (1440*900), (720*576)
for ($i = 0; $i -lt $A.Length; $i++){$A[$i]}
Not really sure about all the details of the code since I'm a novice, and I copied the code from somewhere I can't find again.
What I DO know is, that we are loading the array in the variable $A and doing work on it.
But it's like the variable is empty in Rainmeter, and that's what PowerShell processes and outputs.
If there's a way to reorder the list of resolutions by number of pixels, some other way, like a calc measure or a lua script, I'm all ears.