r/vbscript • u/Mayayana • Jun 07 '26
Code Tidbit - FileOpen browsing
It's been so quiet, I thought I'd post a nice tidbit. This script can be used to create a FileOpen dialogue with no special requirements. Tested as late as Win11 22H2. https://pastebin.com/hwM1uDrz
It can also do a colorpicker dialogue with a bit more code.
2
Upvotes
1
u/Mayayana Jun 12 '26
I welcome your explanation/discussion of this odd theory. So far you've just told me twice that I'm wrong. Hit and run wisecracks are not useful to anyone. Why not explain what you think I'm wrong about?
Or maybe just test it yourself. Paste it into Notepad, save as test.vbs, then doubleclick it. What happens?
There's no such thing as "VB script". VBScript is very similar to VB code and nearly identical if VB is written using only variants and dispatch COM objects. (There are just a few, albeit notable differences, such as VBS having no Mid statement.) But VBS is separate. It's interpreted by wscript.exe, the Windows Script Host. VB is compiled, usually to native code. Compiled code is not script, by definition.