Last active
November 27, 2017 14:59
-
-
Save paveljurca/da1360b2353273fcf9e984f2d4affdd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub ms32_vbs_filedialog { | |
# let's just see if it works | |
my $VBScript =<<'EOF'; | |
Set shell = CreateObject("Shell.Application") | |
Set mediasite = shell.BrowseForFolder(0, "Pick up your Mediasite presentation folder", 0, "%USERPROFILE%") | |
WScript.Echo """" & mediasite.self.Path & """" | |
EOF | |
# cannot do while 'unix2dos' in use! | |
# $VBScript =~ s|\n|\r\n|; | |
open my $cscript, ">:utf8", undef or die; | |
print $cscript $VBScript; | |
close $cscript; | |
chomp(my $path = qx(cscript.exe $cscript //E:VBScript //Nologo)); | |
die unless -d $path; | |
return $path; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'set up a file dialog | |
Set shell = CreateObject("Shell.Application") | |
Set mediasite = shell.BrowseForFolder(0, "Pick up your Mediasite presentation folder", 0, "%USERPROFILE%") | |
'return full path for the selected folder | |
WScript.Echo """" & mediasite.self.Path & """" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment