The line in question is this one: var commonDlg = new ActiveXObject("MSComDlg.CommonDialog");
It is trying to create a "browse for files" dialog using a standard Windows control commonly installed on XP (which is where I tested the script). The error you are seeing means that the control is either not on your machine or it is not registered.
I have been unsuccessful trying to find official information from Microsoft that discusses why this control is not available on Windows 7 but that appears to be the case (it might not be on Vista either).
I used this Windows control because it allows you to do multi-select when browsing for files. SQExtras (a control included with XMetaL Author) does not support multi-select when choosing files. There was some discussion recently of extending it to allow for multi-select, but when I wrote this you could only select a folder or a single file. The script could probably be rewritten to use SQExtras but possibly with reduced functionality. If you want to try doing that you can search for "SQExtras" in the XMetaL Developer Programmers Guide.
You might try copying the control from an XP machine to your Windows 7 machine and registering it using RegSvr32.exe. That might be the simplest solution if it will actually work on Windows 7. The control is this one C:\Windows\System32\comdlg32.ocx. It is a 32-bit control, and should probably be installed on a 64-bit machine using "WOW" (the Microsoft 'Windows on Windows' emulator -- aka: 32-bit compatibility mode). There is a discussion about getting this control into a Windows 7 installation here: http://social.technet.microsoft.com/Forums/en-US/w7itproinstall/thread/8bb8f428-3c43-4b01-a909-480e265dacf2
Whether you can legally do this is a question to ask Microsoft.
Or you could try to find, install, and register a control that provides similar functionality to that one (but this would likely require script alterations as well since the properties will probably be different).
I will revisit my discussion with development to see if they can make insertion of multiple <topicref> elements into a map at one time, pointing to different files, into a first-class feature.