I am writing a skin for Rainmeter, that can change resolutions of a monitor. The Powershell measure in my Rainmeter skin, uses a command line utility to retrieve a list of possible resolutions. But I'm having trouble sorting the list (Largest to smallest)
I Made 2 objects from the list.
One for the list I want to sort ($Resolutions)
$Resolutions = [pscustomobject]@{Name="Resolutions";Expand=@('1024x768','1152x864','1176x664','1280x1024','1280x720','1280x768','1280x800','1280x960','1360x768','1366x768','1440x900','1600x1024','1600x1200','1600x900','1680x1050','1920x1080','1920x1200','1920x1440','2560x1440','3840x1080','5120x1440','640x480','720x480','720x576','800x600')}
And then one for $Pixels.
$Pixels = [pscustomobject]@{Name="Pixels";Expand=@(1024*768), (1152*864), (1176*664), (1280*1024), (1280*720), (1280*768), (1280*800), (1280*960), (1360*768), (1366*768), (1440*900), (1600*1024), (1600*1200), (1600*900), (1680*1050), (1920*1080), (1920*1200), (1920*1440), (2560*1440), (3840*1080), (5120*1440), (640*480), (720*480), (720*576), (800*600)}
$Pixels is calculated when I select the object and expand it.
I just need guidance from here to sort both lists by the numbers in $Pixels. (Largest to smallest)