I see that I swapped the order so it doesn't work the NoQuotes for Powershell, so I'll fix it in the next update.
But can you clarify the second part? How would you need to script output to look like when using SelMultiple?
Do you need csv-s or similar?
I asked ChatGPT since I didn't se PS much
# Define the paths as an array
$paths = "C:\path1", "C:\path2", "C:\path3"
# Convert the array to a single string separated by a delimiter (e.g., semicolon)
$pathsString = $paths -join ";"
# Call ScriptB.ps1 and pass the paths as a string parameter
& "Path\To\ScriptB.ps1" -Paths $pathsString
And then split it again in another script
param (
[Parameter(Mandatory=$true)]
[string]$Paths
)
# Convert the paths string to an array using the delimiter (e.g., semicolon)
$SelArray = $Paths -split ";"
Would it be more useful if program would already output the selection as a variable that PS can iterate on instead of using Search&Replace from the program?
; doesn't seem like a good solution as it is a filename legal character, so maybe NewLine, as $SelAsMultiLineString
or to already create an array by doing
$SelArray = $multiLineString.Split([Environment]::NewLine)
and then you have array as param that you can iterate over?
What would be most convenient from script making perspective?
Some sample use case would also be useful
and
and