Print GetOpenFileName
("This is a test", _Dir$("desktop"), "txt files (*.txt)|*.txt|All files (*.*)|*.*", 2) 'Dim As String savefile
'savefile = GetSaveFileName("Save test", _CWD$, "txt files (*.txt)|*.txt|All files (*.*)|*.*", 1)
'If savefile <> "" Then
' Open savefile For Output As #1
' Print #1, Chr$(34) + "Success! Success! We've done it! We've done it!" + Chr$(34)
' Print #1, Chr$(9) + Chr$(9) + Chr$(9) + "-Every diplomatic leader in The Batman Movie";
' Close
'End If
'Print GetFolderName("Pick a folder")
'ReDim As String filelist(1 To 1)
'GetOpenFileNames "Pick multiple files", _Dir$("desktop"), "txt files (*.txt)|*.txt|All files (*.*)|*.*", 1, filelist()
'Dim x
'For x = LBound(filelist) To UBound(filelist)
' Print filelist(x)
'Next
If Mid$(InitialDir
, Len(InitialDir
) - 1) <> "\" Then InitialDir
= InitialDir
+ "\" cmd
= "PowerShell Add-Type -AssemblyName System.Windows.Forms;$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{ Title = '" + Chr$(34) + Title
+ Chr$(34) + "'; InitialDirectory = '" + Chr$(34) + InitialDir
+ Chr$(34) + "'; Filter = '" + Chr$(34) + Filter
+ Chr$(34) + "'; FilterIndex = '" + Chr$(34) + LTrim$(Str$(FilterIndex
)) + Chr$(34) + "'; };$null = $FileBrowser.ShowDialog();$FileBrowser.FileName;exit $LASTEXITCODE" exit_code = pipecom(cmd, stdout, stderr)
If stdout
<> "" Then GetOpenFileName
= Mid$(stdout
, 1, Len(stdout
) - 1)
If Mid$(InitialDir
, Len(InitialDir
) - 1) <> "\" Then InitialDir
= InitialDir
+ "\" cmd
= "PowerShell Add-Type -AssemblyName System.Windows.Forms;$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{ Title = '" + Chr$(34) + Title
+ Chr$(34) + "'; InitialDirectory = '" + Chr$(34) + InitialDir
+ Chr$(34) + "'; Filter = '" + Chr$(34) + Filter
+ Chr$(34) + "'; FilterIndex = '" + Chr$(34) + LTrim$(Str$(FilterIndex
)) + Chr$(34) + "'; Multiselect = 'true'; };$null = $FileBrowser.ShowDialog();$FileBrowser.FileNames;exit $LASTEXITCODE" exit_code = pipecom(cmd, stdout, stderr)
stdout
= Mid$(stdout
, 1, Len(stdout
) - 1) filenames(1) = stdout
If Mid$(InitialDir
, Len(InitialDir
) - 1) <> "\" Then InitialDir
= InitialDir
+ "\" cmd
= "PowerShell Add-Type -AssemblyName System.Windows.Forms;$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog -Property @{ Title = '" + Chr$(34) + Title
+ Chr$(34) + "'; InitialDirectory = '" + Chr$(34) + InitialDir
+ Chr$(34) + "'; Filter = '" + Chr$(34) + Filter
+ Chr$(34) + "'; FilterIndex = '" + Chr$(34) + LTrim$(Str$(FilterIndex
)) + Chr$(34) + "'; };$null = $FileBrowser.ShowDialog();$FileBrowser.FileName;exit $LASTEXITCODE" exit_code = pipecom(cmd, stdout, stderr)
If stdout
<> "" Then GetSaveFileName
= Mid$(stdout
, 1, Len(stdout
) - 1)
cmd
= "PowerShell Add-Type -AssemblyName System.Windows.Forms;$FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog -Property @{ Description = '" + Chr$(34) + Title
+ Chr$(34) + "'; ShowNewFolderButton = 'true'; };$null = $FolderBrowser.ShowDialog();$FolderBrowser.SelectedPath;exit $LASTEXITCODE" exit_code = pipecom(cmd, stdout, stderr)
If stdout
<> "" Then GetFolderName
= Mid$(stdout
, 1, Len(stdout
) - 1)
copy = Expression
copy
= Mid$(copy
, 1, p
- 1) + Mid$(copy
, p
+ 1) curpos = 1
dpos
= InStr(curpos
, copy
, delimiter
) StorageArray
(UBound(StorageArray
)) = Mid$(copy
, curpos
, dpos
- curpos
) curpos
= dpos
+ Len(delimiter
) dpos
= InStr(curpos
, copy
, delimiter
) StorageArray
(UBound(StorageArray
)) = Mid$(copy
, curpos
)
'$INCLUDE:'pipecomqb64.bas'