Graphics Macros with VBScript & Windows 10
For a live show’s graphics operator and developers, macros have proven to be an essential tool for logo substitution, show/hide functions and many other uses. However, a small usability issue concerning a seemingly small change in the VBScript system functions is causing some major problems.
This VBScript class is able to create a Windows file selector dialog, and can be customized to filter file types and start in a certain directory, and returns the file’s path as a string. That string can then be read by a simple OpenTextFile call, stored, and traversed for data. That data can then be parsed out to various CG functions, affecting the on-air graphic pages. With Windows XP-based systems dominating for over than a decade, the UserAccounts.CommonDialog functionality became something that script developers came to depend on.
New Windows, New Problems
With Microsoft strongly encouraging migration to Windows 10 (as well as stopping updates for older Windows versions), graphics systems now come with Windows 7 or higher and some, like Chyron’s new LyricX, are fully 64-bit. There’s no doubt that the newer Windows versions offer performance & stability advantages, and it would be foolish to suggest reverting new systems to Windows XP solely to retain a VBScript function. But, according to a 2009 article from Microsoft TechNet, the file dialog function is only present in 32-bit Windows XP, has not been documented, and has not reappeared. There are several workarounds available online for web apps, but none of those help in the Lyric/XPression environment as the VBScript interface only offers minimal functionality.
What’s the alternative?
At the moment, it does not appear that Microsoft will add the UserAccounts functionality again. This post on Stack Overflow offers a solution that has tested OK in XPression Designer, but reliability can’t be guaranteed since every solution is a workaround. Additionally, Microsoft is pushing batch processing for Windows to the new PowerShell, which offers no advantages to broadcast graphics users. It’s unfortunate that this convenient function is no longer present, and reverting to requiring the user to type a complete path to the desired file is a major step away from being user-friendly and efficient.