Hello,
I use gnuplot scripts to easily plot different data files (with same structure). To not have to enter the file(s) manually all the time, I added this function to open windows powershell's OpenFileDialog and return a string variable with the list of enquoted paths of the selected files.
OpenFileDialog(path) = ((path eq "" ? path="C:\\" :0), system("powershell \"Add-Type -AssemblyName System.Windows.Forms; $FileBrowser = New-Object System.Windows.Forms.OpenFileDialog ". \
"-Property @{InitialDirectory = '".path."'; Multiselect = $true }; $Null = $FileBrowser.ShowDialog(); $string=''; ". \
"foreach($file in $FileBrowser.FileNames){ $string+='\'''+$file +'\'' ' };$string\""))
The path string variable allows to set a Initial Directory, when the Dialog window is opened.
You think that may be of interested to other user and could be implemented in gnuplot in an OS independent manner?
Best,
Alex