5.4.5.1 Beta
This commit is contained in:
20
scripts/powershell/open-file-dialog.ps1
Normal file
20
scripts/powershell/open-file-dialog.ps1
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
# Shows the Open File dialog to open a file without loading its folder into the playlist.
|
||||
|
||||
# In input.conf add: <key> script-message load-without-folder
|
||||
|
||||
$code = {
|
||||
if ($args[0] -eq 'load-without-folder')
|
||||
{
|
||||
$dialog = New-Object Windows.Forms.OpenFileDialog
|
||||
|
||||
if ($dialog.ShowDialog() -eq 'OK')
|
||||
{
|
||||
$core.LoadFiles($dialog.FileNames, $false, $false);
|
||||
}
|
||||
|
||||
$dialog.Dispose()
|
||||
}
|
||||
}
|
||||
|
||||
$mp.register_event("client-message", $code)
|
||||
Reference in New Issue
Block a user