From: G r u N T X P <gr...@na...> - 2003-11-18 07:44:11
|
Приветствую, Peter B. Shalimoff. PBS> Почему может не работать сабжевый метод? А зачем он тебе? PBS> var IE = new ActiveXObject("InternetExplorer.Application"); PBS> WScript.ConnectObject(IE, "IE_"); PBS> получаю исключение "WScript.CreateObject: Could not connect object." Кто бы думал! %) PBS> А если делать так: PBS> var IE = WScript.CreateObject("InternetExplorer.Application", "IE_"); PBS> то все работает. С ReGet'ом (например) - такая же ерунда происходит. PBS> Надо WSH как-то хитро настраивать? RTFM до просветления: Connects the object's event sources to functions with a given prefix. object.ConnectObject(strObject, strPrefix) Arguments object WScript object. strObject vvvvvv Required. >String< value indicating the name of the object you want to connect. strPrefix ^^^^^^ Required. String value indicating the function prefix. Remarks Connected objects are useful when you want to sync an object's events. The ConnectObject method connects the object's outgoing interface to the script file after creating the object. Event functions are a combination of this prefix and the event name. PBS> -- ^ one space here -- G═r═u═N═T═══X═P |