I have the following line in my code:
var ScreenRecorder = new ActiveXObject('CCScreenRecorder.ScreenRecorder');
The problem is that I have 2 entries of this
(one for each version, don't ask me why - this is a fact I need to deal with),
So I want to create the ActiveXObject from the GUID.
I tried to do:
document.createElement('<OBJ' + 'ECT ID="ScreenRecorderWrapper" CLA' + 'SSID="CL' + 'SID:37CCF998-3BB7-' + '4F8A-9D9F-EF391543E94A"></OB' + 'JECT>');
var ScreenRecorder = ScreenRecorderWrapper;
but the problem is that ScreenRecorderWrapper will be defined only after SetTimeout or some other manipulation.
Can I get the ActiveXObject from it's GUID and not from it's name?
Something like:
var ScreenRecorder = new ActiveXObject('37CCF668-3BB7-4F8A-9D9F-EF391543E94A');
ActiveXObjectrequires a ProgID, however, you can use a version-dependent ProgID rather than a version-independent ProgID.Version-dependent ProgIDs typically have a version number appended to the version-independent ProgID.
In this case, the version-independent ProgID is
'CCScreenRecorder.ScreenRecorder', and the version-dependent ProgID would be something like'CCScreenRecorder.ScreenRecorder.1'or'CCScreenRecorder.ScreenRecorder.2'.Note that using a version-dependent ProgID can fail if the wrong version is installed. You might want to try the version-dependent ProgID first, and fall back to the version-independent ProgID.