找回密码
 加入
搜索
查看: 19910|回复: 36

[原创] AU3基础帮助: OLE/COM 参考 (完全翻译版)

 火... [复制链接]
发表于 2012-4-30 01:55:31 | 显示全部楼层 |阅读模式
本帖最后由 user3000 于 2012-6-11 04:07 编辑

原本的文档只汉化了部分,个人认为最重要的部分反而没有得到汉化。学AU3以来,也因为这个缘故跳过从没有认真去读和学有关COM的知识, 一直是稀里糊涂的。
这几天, 为了解决一个问题,不得不硬着头皮看完了该文档。结果还真解决了自己的问题!
有兴趣请参阅此帖: http://www.autoitx.com/forum.php ... 1870&highlight=

由此发现此文档的汉化的重要性,非得汉化不可!
特此花了一晚上,在原有基础上增加了相应部分的翻译。 没有去掉原来没有翻译过来的英文,保留对照吧?
在这里放上翻译好的原始HTML文件, 是从帮助里直接弄出来的。但不知道怎么替换或合并到帮助文档里了。
可惜把相关的2张图片弄出来,设成相对应的路径也显示不了。 算了, 先参照帮助的图片看吧。

感觉该文档有几个人作过汉化工作,因为已汉化部分的的语言风格,前前后后有些差异。

因为源代码很长, 本来不想放上来的, 但为了给大家省点钱,  还是直接放上来吧? 记得将源代码存为网页文件, 比如: XX.HTML  或  XX.HTM

复制下面代码, 并将它存为HTML文件,  再打开此文件即可:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
        <head>
                <title>COM Reference</title>
                <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
                <link href="../css/default.css" rel="stylesheet" type="text/css">
        </head>
        <body>
                <h1>AutoIt COM 扩展</h1>
                <p>一个简短的介绍</p>
                <H2>什么是 COM?</H2>
                <p>COM 是 "Component Object Model"(组件对象模型) 的缩写. 是微软为应用程序相互连接使用
                的一种公共接口. 这些接口定义为 COM 
                对象(Object).</p>
                <p>在开始 COM 编程时, 您必须知道严格的程序是怎么执行的.
                最先开始,您所了解的程序是一个"接口"(interface). 使用 COM, 您可以 "叫" 它为一个对象(Object).
                 您必须了解这些对象(Objects)
                的名称("name").属性('properties')或者方法( 'methods').</p>
                <p> </p>
                <H2>什么是对象(Object)的属性或者方法?</H2>
                <p>这是对象(Object)的两个最基本的特征. 
                        属性('property')里面保存的是对象所需的数据.                 
                        方法('method')是执行对象内部的一些函数执行一些事件.</p>
                <H2>我需要在 AutoIt 脚本里面使用COM吗?</H2>
                <p>这是绝对的. AutoIt 有很多内置的函数,也有巨大的
                        UDF 函数库.  您可以使用它们做出绝大多数的程序.
                        可是如果您需要指定一个接口('interfacing')连接到其它程序, 
                        使用 COM 可以帮助您节省很多行的脚本代码.   
                        编写脚本需要知道有哪些已经存在的 COM 对象是严重依赖操作系统和已经安装的软件的.
                        下方的所有例子都已经在纯净安装的 Windows XP 
                        专业版上面通过测试(安装有 Microsoft Office 2000).</p>
                <p> </p>
                <p> </p>
                <h1>一个在 AutoIt 中使用COM的例子</h1>
                <p> </p>
                <p>
                        假设您想知道怎么最小化所以打开的窗口. 您可能会使用正规的 AutoIt 
                        函数,就像 WinList 和 WinSetState. 可是如果两行的 COM 代码就能得到同样的效果呢?:
                        (不要告诉我用WIN+D)...</p>
                <P> </P>
                <P class="codebox">$oShell = ObjCreate("shell.application")<BR>
                        <BR>
                        $oShell.MinimizeAll</P>
                <P>
                <P><FONT size="1">小提示: 这个简短的代码只是让您知道怎么使用COM来最小化所有窗口,
                                虽然您可以使用 WinMinimizeAll() 函数来做.</FONT></P>
                <P> </P>
                <P></P>
                <p>在第一行,我们创建了一个名叫
                        <span style="FONT-SIZE:11pt;FONT-FAMILY:'Courier New'">"shell.application"</span> 的对象.
                        这是一个 Windows 内部对象, 定义于
                        <span style="FONT-SIZE:11pt;
FONT-FAMILY: 'Courier New'">shell32.dll</span>. 分配的变量 $oShell 指向这个新对象;
                 $oShell 现在就是一个对象变量.</p>
                <p> </p>
                <p>
                        在第二行, 我们使用了一个名叫
                        <span style="FONT-SIZE:11pt;FONT-FAMILY:'Courier New'">"MinimizeAll"</span>
                        的 oShell 对象方法.  它将最小化所有窗口.</p>
                <p> </p>
                <p>所有 Windows 系统都有一个巨大的内部对象库为不同用途简化操作.
                          同样一些应用程序,就像Excel 或者Word
                        同样也有自己的对象库.  
                </p>
                <p>可是,有时要获得一个您系统上面所有存在的对象的属性和方法
                        是非常困难的.  
                        搜索 Microsoft.com
                        或者 Google.com 可以帮助您找到一些关于您想使用的 Object 'X' 的线索.</p>
                <p> </p>
                <p>例如, 您可以在这里找到关于
                        <span style="FONT-SIZE:11pt;FONT-FAMILY:'Courier New'">"shell.application"</span>
                         对象的一些信息:
                        <BR>
                        <a href="http://msdn.microsoft.com/en-us/library/bb774094.aspx"
                                target="_blank"style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single">http://msdn.microsoft.com/en-us/library/bb774094.aspx</a>
                        </p>
                <span style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">
                        <P>
                                <br clear="all" style="PAGE-BREAK-BEFORE:always">
                                <FONT face="Verdana" size="2">要查看一下当前安装在您的计算机系统上面的所有对象, 
                                "<FONT face="Courier New">OLE/COM Object Viewer</FONT>
                                "(OLE/COM 对象查看器) 是一个相当有用的工具. 而且这个工具会有所选的项目的一些说明.</FONT></P>
                        <P>
                </span> </P>
                <p>让我们来看一个其它例子.  我们想获得某一个 HTML 
                        网页的源代码. 您可以使用 InetGet() 函数保存网页文件后再用 FileRead() 来读取内容.
                        但是这里只有三行代码就可以搞定:</p>
                <p> </p>
                <P class="codebox">$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")<BR>
                        $oHTTP.Open("GET","<A href="http://www.AutoItScript.com">http://www.AutoItScript.com</A>")<BR>
                        $oHTTP.Send()<BR>
                        $HTMLSource = $oHTTP.Responsetext
                </P>
                <p> </p>
                <p>字符串变量 $HTMLSource 现在包含了AutoItScript.com 
                主页完整的 HTML 源代码. (更确切的说,是顶层 HTML 框架).</p>
                <p> </p>
                <p>  (关于
                        <span style="FONT-SIZE:11pt;
FONT-FAMILY:'Courier New'">"winhttp.winhttprequest"</span>
                            对象的相关信息你可以在这里得到:
                        <BR>
                        <a href="http://msdn.microsoft.com/en-us/library/aa384106.aspx" target="_blank"
                                style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single">http://msdn.microsoft.com/en-us/library/aa384106.aspx</a>
                        )</p>
                <p> </p>
                <p><STRONG>请注意这里:</STRONG>
                一些对象依赖于计算机的操作系统或者已经安装的程序. 例如:
                        <span style="FONT-FAMILY:
'Courier New'">winhttp.winhttprequest.5.1</span>
                        对象只存在于安装有 Internet Explorer 5.0 及更高的操作系统. 
                        当您要共享您使用 COM 对象的脚本时, 
                        请先确认对象是否存在于所有计算机.</p>
                <p> </p>
                <P>对象变量和其它类型的 AutoIt 变量略有不同.
                        一个对象不是一个真实值, 而是指向('pointer')脚本以外的一些东西.
                        因此你不能对它进行数学运算, 也不能等于一个对象变量.
                        当你分配一个对象变量一个不同的值, 指向('pointer')也会自动释放. 
                        你可以看下面的例子,
                        强制定义一个对象变量为任何数字或者文本值.</P>
                <P>thesnoW:指向('pointer')姑且可以译作"指针",但要注意,真正意义上的指针是指向一个内存地址,如C/C++</P>
                <P> </P>
                <P class="codebox">$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")  ; 对象被
                        创建<BR>
                        $oHTTP=0                                         
                        ; 对象被删除</P>
                <P> </P>
                <P>当一个脚本执行完成,您 <STRONG>不需要</STRONG> 删除对象变量.
                        如果脚本退出, AutoIt 会尝试释放脚本创建的所有活动对象. 
                        对象会产生一些事件,您可以定义一个局部对象变量在函数CALL里面,
                        并在函数结束时返回结果.</P>
                <p> </p>
                <h1>使用 COM 进行自动化操作</h1>
                <p> </p>
                <p>一个相当流行的COM操作是"自动化"操作程序. 
                        代替正规的Autoit操作函数,如:Send() 或者 WinActivate(),
                        您可以使用对象来制作一个调用对象内部函数的程序.
                </p>
                <p> </p>
                <p>这里有一个例子,来'自动化'操作 Microsoft Excel:</p>
                <P> </P>
                <P class="codebox">$oExcel =
                        ObjCreate("Excel.Application")                  
                        ; 创建一个Excel 对象<BR>
                        $oExcel.Visible =
                        1                                        ;
                        显示 Excel 自己<BR>
                        $oExcel.WorkBooks.Add                                     
                        ; 添加一个新的工作表<BR>
                        $oExcel.ActiveWorkBook.ActiveSheet.Cells(1,1).Value="test" ; 填写一个表格<BR>         
                        sleep(4000)                                               
                        ; 等待 4 秒<BR>
                        $oExcel.ActiveWorkBook.Saved =
                        1                          
                        ; 模拟用户保存工作表<BR>         
                        $oExcel.Quit                                              
                        ; 退出 Excel 
                </P>
                <P></SPAN> </P>
                <p>控制其它程序的方法是复杂的,
                不只是使用 AutoIt 脚本.  如果一些自动化(使用对象的)程序不能工作,
                应该参考那个应用程序的文档,而不是AutoIt的帮助文件.</p>
                <p><b><span style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">
<br clear="all" style="PAGE-BREAK-BEFORE:always">
 </span></b></p>
                <h1>特殊语句</h1>
                <p> </p>
                <p>在 AutoIt 中, 两个特殊的语句来定义和使用 COM 对象:
                </p>
                <p> WITH/ENDWITH 和 FOR/IN/NEXT loop.</p>
                <p> </p>
                <p> </p>
                <h1>WITH..ENDWITH</h1>
                <p> </p>
                <p>WITH/ENDWITH 语句不能添加功能, 但是它可以让你的脚本
                        更易阅读. 下面这个例子使用 Excel 同样可以这样
                        写:</p>
                <P> </P>
                <P class="codebox">$oExcel =
                        ObjCreate("Excel.Application")                ;
                        创建一个 Excel 对象
                        <BR>
                        <BR>
                        WITH $oExcel
                        <BR>
                            .Visible =
                        1                                      
                         ; 显示 Excel 自己<BR>
                           
                        .WorkBooks.Add                          
                                   ; 添加
                        新工作表<BR>
                            .ActiveWorkBook.ActiveSheet.Cells(1,1).Value="test" ; 
                        填写一个表格<BR>
                            sleep(4000)                                        
                        ; 等待 4 秒<BR>
                            .ActiveWorkBook.Saved =
                        1                          
                        ; 模拟保存工作表<BR>
                           
                        .Quit                                            
                          ; 退出 Excel<BR>
                        ENDWITH
                </P>
                <P></SPAN>
                        <span style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New'"></span>
                <P>
                <p>
                        这个例子能帮助你节省不少代码, 
                        几乎所有的需要很长一段代码的属性/方法
                        都可以用WITH来缩写.</p>
                <p> </p>
                <p> </p>
                <h1>FOR..IN</h1>
                <p> </p>
                <p>FOR...IN 循环必须在使用 Collections 时使用.  Collections 是一个
                        指定的对象类型, 要是存在多个子对象. 您可以
                        把它们看成一个数组 (事实上,FOR..IN 
                        也同样工作于数组类型(Array-type)变量).</p>
                <p> </p>
                <H2>FOR..IN 循环使用数组</H2>
                <P>下面这个例子演示了 FOR..IN 循环.  这个例子使用正常的AutoIt数组.
                        因此,它与 COM 无关. 只是给你说说大概原理:</P>
                <p> </p>
                <P class="codebox">$String =
                        ""               ;
                        空字符串变量
                        <BR>
                        <BR>
                        $aArray[0]="a"             ;
                        我们填写一个数组
                        <BR>
                        $aArray[1]=0              
                        ; 使用几个不同的值
                        <BR>
                        $aArray[2]=1.3434          ;
                        来填写它们.
                        <BR>
                        $aArray[3]=  "testestestest" ; 
                        <BR>
                        <BR>
                        FOR $Element IN $aArray    ; 这里为开始处..
                        <BR>
                           $String = $String & $Element & @CRLF
                        <BR>
                        NEXT
                        <BR>
                        <BR>
                        ; 显示结果给用户<BR>
                        Msgbox(0,"For..IN 数组测试","结果: " & @CRLF & $String)
                </P>
                <P></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN> </P>
                <p> </p>
                <H2>   FOR..IN 循环使用一个对象</H2>
                <p>大多数情况下,您不能用”标准“的对象方法来检索出一个集合中的元素。在COM术语里,您必须用”枚举“。 这是引进 FOR...IN 循环语句的目的。</p><p>下面的Excel操作示例中, 循环遍历了当前的工作表中A1:016的所有单元格,如果某个单元格的数值小于5则代码将它改为0</p><br>In most cases you can't use 'normal' Object methods to retrieve the elements of
                        a collection.  In 'COM'-terms they say you have to 'enumerate' them. 
                        This is where the FOR..IN loop comes in.</p>
                <p>The Excel example below loops on cells A1:O16 on the current active sheet. If
                        one of the cells has a value less than 5, the code replaces the value with 0
                        (zero):</p>
                <p> </p>
                <P class="codebox">$oExcel = ObjCreate("Excel.Application") ; 创建一个 Excel 
                        对象<BR>
                        <BR>
                        $oExcel.Visible =
                        1              
                        ; 显示 Excel 自己<BR>                         
                        $oExcel.WorkBooks.Add            
                        ; 添加一个新的工作表<BR>
                        <BR>
                        dim
                        $arr[16][16]                 
                        ; 这几行
                        <BR>
                        for $i = 0 to
                        15                 
                        ; 会给一些
                        <BR>
                          for $j =  0 to
                        15              
                        ; 表格
                        <BR>
                           $arr[$i][$j]
                        = $i           
                          ; 填写
                        <BR>
                         
                        next                          
                         ; 内容.
                        <BR>
                        next<BR>
                        <BR>
                        $oExcel.activesheet.range("A1:O16").value = $arr ; 使用上面的数字来
                        填写表格内容<BR>
                        <BR>
                        sleep(2000)                      
                        ; 等待两秒<BR>
                        <BR>
                        For $cell in $oExcel.ActiveSheet.Range("A1:O16")<BR>
                           If $cell.Value < 5 Then
                        <BR>
                               $cell.Value = 0
                        <BR>
                           Endif
                        <BR>
                        Next
                        <BR>
                        <BR>
                        $oExcel.ActiveWorkBook.Saved = 1 ; 模拟用户保存工作表<BR>
                        sleep(2000)                     
                        ; 等待两秒<BR>
                        $oExcel.Quit                   
                         ; 退出Excel
                </P>
                <P></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN> </P>
                <p><b><span style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">
<br clear="all" style="PAGE-BREAK-BEFORE:always">
 </span></b></p>
                <h1>高级的 COM 使用</h1>
                <p> </p>
                <p>下面这些是使用 AutoItCOM 
                        必须了解的知识( COM 事件和 COM错误句柄).
                </p>
                <p>如果你是一个 COM 程序员新手, 请先阅读一些关于 COM
                        的好文章.</p>
                <p> </p>
                <p>有个关于 COM 的"圣经"叫做 "Inside OLE 2" ,Kraig Brockschmidt 
                        编写的(Microsoft Press).</p>
                <p> </p>
                <p>您可以在网上找到更多的关于 COM 的资源 (不是 AutoIt 有关系的):</p>
                <p>
                        <a href="http://msdn.microsoft.com/en-us/library/ms694363.aspx" target="_blank"
                                style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single">http://msdn.microsoft.com/en-us/library/ms694363.aspx</a>
                        (介绍)</p>
                <p>
                        <a href="http://www.garybeene.com/vb/tut-obj.htm" target="_blank" style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single">
                                http://www.garybeene.com/vb/tut-obj.htm</a> (关于 Visual Basic 中的对象)</p>
                <p>
                        <a href="http://java.sun.com/docs/books/tutorial/java/concepts/" target="_blank" style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single">
                                http://java.sun.com/docs/books/tutorial/java/concepts/</a>    
                        (在Java中使用对象)</p>
                <p>
                        <a href="http://msdn.microsoft.com/archive/en-us/dnarguion/html/drgui082399.asp" target="_blank" style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single">
                                http://msdn.microsoft.com/archive/en-us/dnarguion/html/drgui082399.asp</a> (在 C++中
                        使用对象事件)</p>
                <p>
                        <a href="http://www.garybeene.com/vb/tut-err.htm" target="_blank" style="COLOR: blue; TEXT-DECORATION: underline; text-underline: single">
                                http://www.garybeene.com/vb/tut-err.htm</a> (Visual Basic
                                中的错误句柄)</p>
                <p> </p>
                <p> </p>
                <h1>COM 事件</h1>
                <p> </p>
                <p>标准的COM自动控制主要采用单向通讯方式。 您向对象”请求“获得任意的属性或由其方法返回的结果。 但是,当一个COM对象带有特定功能时,也能够跟您的脚本”对话“。</p><p>Normal COM Automation mainly uses one-way communication.  You 'ask' the
                        Object for any properties or results from a Method.  However a COM Object
                        can also 'talk back' to your script when it suits it.</p><p>在您需要等待一些同COM有关的操作的发生的情况下,这是非常便利的</p>
                <p>This could be very handy in cases you need to wait for some COM-related action
                        to happen. 
                </p><p>您可以在自己脚本里,让对象调用一个特定的自定义函数来查询是否有自己感兴趣的动作发生,而不是用编写一个循环代码这种方式。 同时, 您可以让脚本做其它事情(几乎是同一时间)</p>
                <p>Instead of writing a kind of loop, asking the Object if something interesting
                        has happened, you can let the Object itself call a specific UDF in your
                        script.  Meanwhile you can do other things in your script (almost)
                        simultaneously.</p>
                <p> </p><p>并不是所有对象支持事件通知。您必须仔细地查阅一个对象的文档来确定它是否支持事件通知</p>
                <p>Not all Object to support events. You have to read the Object documentation
                        carefully whether it supports events or not.
                </p><p>如果它支持,接下来要确定它所支持的事件类型。 AutoItCOM 只能获取”急件“类事件</p>
                <p>If it does, the second thing to know is the type of Events it supports.
                        AutoItCOM can only receive 'dispatch' type events.</p>
                        <p>最后,您必须知道该对象可能产生的事件通知的名字,包括它们的参数(如果有的话)</p>
                <p>Finally you have to know the names of the Events the Object could generate,
                        including their arguments (if any).</p>
                <p> </p>
                <p>完全获取到这些信息后, 您才能开始编写一个运用COM事件通知的AU3脚本。</p>
                <p>Only when you have all this information, you can start building an AutoIt script
                        using COM Events.</p>
                        <p>以下一小段代码是从一个脚本里截取出来的,该脚本演示了如何接收IE浏览器产生的事件</p>
                <p>Below is a snippet from a script that demonstrates how to receive Events
                        from the Internet Explorer:</p>
                        <P> </P>
                        <P class="codebox">$oIE=ObjCreate("InternetExplorer.Application.1")   ; 生成一个 IE 对象
                                ;Create an Internet Explorer Object
                                <BR>
                                <BR>
                                $EventObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvents")   ; 开始接收
                                ; Start eceiving Events.<BR>
                                <BR>
                                $oIE.url= "http://www.autoitscript.com"  ; Load an example web 加载一个示范网页
                        page<BR>
                                ; 从此刻开始,该IE对象会在加载网页过程中产生事件
                                ;From now on, the $oIE Object generates events during web page load.
                                <BR>
                                ;  在下面的事件函数处理了这些事件
                                ;They are handled in the event functions shown below.
                                <BR>
                                <BR>
                                ; 在这里您可以让脚本做其它事情,直到用户终止运行
                                ;Here you can let the script wait until the user wants to finish.
                                <BR>
                                ...(您的代码放这里 your code here)... <BR>
                                <BR>
                                $EventObject.stop           
                                ; 告诉IE我们停止接收事件通知
                                ; Tell IE we want to stop receiving Events<BR>
                                $EventObject=0              
                                ; 释放事件对象
                                ; Kill the Event Object<BR>
                                $oIE.quit                   
                                ; Quit IE<BR>
                                $oIE=0                      
                                ; 释放IE占用的内存(不是必须的)
                                ; Remove IE from memory (not really necessary)<BR>
                                Exit                        
                                ; 主脚本在这里结束
                                ; End of main script
                                <BR>
                                <BR>
                                <BR>
                                ; 一些IE浏览器的事件函数
                                ; A few Internet Explorer Event Functions.
                                <BR>
                                ;
                                <BR>
                                ; 要获取IE事件函数的完整列表,请打开下面网址参阅MSDN的网页浏览器文档。
                                ; For the full list of IE Event Functions, see the MSDN WebBrowser
                                documentation at:
                                <BR>
                                ; <A href="http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx</A>
                                <BR>
                                <BR>
                                Func IEEvent_StatusTextChange($Text)<BR>
                                ; 在完整的脚本里(参见下面的链接),我们在一个窗口的编辑框里展示了事件内容。
                                ; In the complete script (see link below) we show the contents in a GUI
                                Edit box.<BR>
                                    GUICtrlSetData ( $GUIEdit, "IE Status text changed to: "
                                & $Text & @CRLF, "append" )
                                <BR>
                                EndFunc
                                <BR>
                                <BR>
                                Func IEEvent_BeforeNavigate($URL, $Flags, $TargetFrameName, $PostData,
                                $Headers, $Cancel)<BR>
                                ; 在完整的脚本里(参见下面的链接),我们在一个窗口的编辑框里展示了事件内容。
                                ; In the complete script (see link below) we show the contents in a GUI
                                Edit box.<BR>
                                ; 注意:声名的变量不同于 MSDN 的
                                ; Note: the declaration is different from the one on MSDN.
                                <BR>
                                  GUICtrlSetData ( $GUIEdit, "BeforeNavigate: " & $URL & " Flags:
                                " & $Flags & @CRLF, "append")
                                <BR>
                                EndFunc
                                <BR>
                        </P>
                        <P>
                </span><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN></P></SPAN>
                <p>Click <A href="IE6Example.htm" target="_blank"><U><STRONG>here</STRONG></U></A> 点击这里查看完整脚本</p>
                <p>Click <A href="IE6Example.htm" target="_blank"><U><STRONG>here</STRONG></U></A> to view the
                        complete script.</p>
                <P> </P><p>这个脚本的最重要那行代码是:$EventObject=ObjEvent($oIE,"IEEvent_",...)</p>
                <P>The main line in this script is:
                        <span style="FONT-FAMILY:
'Courier New'">$EventObject=ObjEvent($oIE,"IEEvent_",...).<BR></span>这个函数获取IE的对象,并把它的事件通知变更到一个以MYEvent命名的AU3函数中。第3个参数是可选的。如果一个对象有多个事件通知接口,而您不想让AU3自动选择的话,它就派上用处了。 This function takes
                        the object $<span style="FONT-FAMILY:
'Courier New'">oIE</span>
                        and reroutes it's events to AutoIt functions whose names start with
                        <span style="FONT-FAMILY:'Courier New'">MYEvent_</span>.  The third
                        parameter is optional. It is used when an Object has multiple Event interfaces
                        and you don't want AutoIt to choose one automatically.<BR>
                        <BR>这个对象会负责持续的事件变更传输工作,没必要多花精力在这上面,除非是您要终止接收。
                        The Object responsible for the continuous rerouting is
                        <span style="FONT-FAMILY:'Courier New'">$EventObject. </span>This variable does
                        not require any further attention, unless you want to stop the events.</P>
                <P>
                        要停止接收事件通知,您可不能仅仅清空事件对象变量,比如采用这样的代码:
                        To stop rerouting Events, you can not just delete the variable like
                        <span style="FONT-FAMILY:'Courier New'">$EventObject="". <FONT face="Verdana">原因在于,我们调用的对象还保存有对该变量的引用,在对象结束运行前,它不会得到释放的。您可以通过终止该对象的工作来解决这个问题,也可以用”.STOP“方法来告诉对象:
                        您要停止接收任何的事件通知,然后您就可以给该变量赋以任意值来‘杀掉’它(其实没必要),比如这样做:The
                                        reason is that the 'calling' Object is still holding a reference to this
                                        variable, and it won't loose it until the Object itself quits. You could
                                        solve this problem by killing the 'calling' Object, but you can also tell
                                        the Object that you don't want to receive any events by using: <FONT face="Courier New">
                                                $EventObject.Stop</FONT>.  Then you can (but not really necessary)
                                        kill the Event by assigning it any value, like:
                                        <SPAN style="FONT-FAMILY: 'Courier New'">$EventObject=""</SPAN></FONT></span></P>
                <p> </p>如果您知道事件通知的命名
                <p>If you know the names of the Events
                        <span style="FONT-FAMILY:
'Courier New'">$oIE</span>您可以将自己感兴趣的事件引入 AU3 脚本里、以相同名字来命名的自定义函数中。(注:即通过对象的提供的事件通知的方法、通常说的接口,有特定的”函数“名。)
                        fires, you can implement the Events you are interested in by creating AutoIt
                        UDF's with the name <FONT face="Courier New">IE</FONT>
                        <span style="FONT-FAMILY:
'Courier New'">Event_<i>Eventname</i>(<i>optional arguments</i>). <FONT face="Verdana">
请您保证该函数的参数的正确性,包括参数的数量、参数的顺序。不然,您的脚本工作时可能会莫名其妙的终止。
Be sure        you use the correct number of arguments and in their correct order as
                                        specified for THAT Event function.  Otherwise you might end up with unexpected values.</FONT> </span></p>
                <P><SPAN style="FONT-FAMILY: 'Courier New'"></SPAN> </P>
                <P><SPAN style="FONT-FAMILY: 'Courier New'"><FONT face="Verdana">
                如果您不知道事件通知的完整命名(出于某些原因),您可以仅仅用该命名的前缀来建立自定义函数。在这个示例中就是这样做的:
                If you don't know (for some reason) the names of the events, you can add a UDF with only the
                                        prefix. In this example: <FONT face="Courier New">Func IEEvent_($Eventname).</FONT>
                                        <BR>
                                </FONT>
                        </SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><FONT face="Verdana">当事件通知已被接收但没有建立同名的自定义函数时,这个函数就会代替它而被调用。事件信息就会存入变量 $Eventname。
                        When an event is received and no <FONT face="Courier New">IEEvent_</FONT> <EM><FONT face="Courier New">Eventname</FONT>
                                        </EM>UDF<EM> </EM>exists, this function will be called instead and the name of
                                        the event will be placed in the variable $Eventname.</FONT></SPAN></P>
                <P><SPAN style="FONT-FAMILY: 'Courier New'"><FONT face="Verdana"></FONT></SPAN> </P>
                <p>您没必要实现所有的事件通知函数。脚本会自动忽略没有采取”引入“措施的事件通知。
                You don't have to implement ALL event functions. Those not implemented will just
                        be ignored.</p>
                <P> </P>
                <P> 在 AU3 3.1.1.xx beta 版所发布的Zip压缩文件中,您可以在名为tests文件夹下面,找到更多的关于使用COM事件通知函数的示例。也也从此链接下载到:
                More script examples using COM Event functions can be found in the tests
                        directory in the AutoIt 3.1.1.xx beta ZIP distribution file, downloadable
                        from: <A href="http://www.autoitscript.com/autoit3/files/beta/autoit/COM/" target="_blank">http://www.autoitscript.com/autoit3/files/beta/autoit/COM/</A></P>
                <p> </p>
                <P><STRONG>AU3 中有关COM事件通知的局限性 Limitations on COM Events in AutoIt</STRONG></P>
                <P> </P><p>一些对象(像网页浏览器)以引用的方式传递它们的事件通知的函数参数。这里的用意是,让用户改变这些参数并将它们传递回给对象。但是,AU3 有自己的变量类型设计,并不完全兼容于对象的变量类型。
                这意味着从对象获取到的变量值均要作相应改动才能赋值给 AU3 的变量,这样做会释放掉对象变量值在内存的原始储存空间。也许在将来的短时间内,我们能够为您解决此限制!</p>
                <P>Some Objects (like the 'WebBrowser') pass arguments to their Event Functions 'by
                        reference'. This is intended to allow the user change these arguments and
                        passing it back to the Object.  However, AutoIt uses it's own variable
                        scheme, which is not compatible to COM variables.  This means that all
                        values from Objects need to be converted into AutoIt variables, thus loosing
                        the reference to the original memory space.  Maybe in the near future
                        we can solve this limitation for you !</P>
                <P> </P>
                <H1> COM 错误句柄</H1>
                <p> </p><p>在脚本里使用COM时,如果没有正确的错误处理方式,那问题将会变得很棘手。尤其是您还不熟悉该对象的属性,方法的时候。</p>
                <P>Using COM without proper error handling can be very tricky. Especially when you
                        are not familiar with the Objects in your script.</P>
                <p> </p><p>如果检测到发生COM错误,AU3 脚本会立即停止运行。这是默认的也最安全的设置。在这种情况下,您必须在自己的脚本里采取措施<b>阻止</B>此类错误的发生。</P>
                <p>An AutoIt script will immediately stop execution when it detects a COM
                        error.  This is the default and also the safest setting.  In this
                        case you have to take measures in your script to <b>prevent</b> the error from
                        happening.</p>
                <p> </p><p>除非没有任何方法来<b>阻止</B>一个COM错误,您才需要置入一个“错误处理器”,当发生错误<b>后</b>用它来处理此错误。这可<strong>不是</strong>让一个充满漏洞的脚本能够正确运行的解决之道。它不会捕捉到跟COM无关的脚本错误(比如:变量声明和语法错误)。</P>
                <p>Only if there is no way to <b>prevent </b>a COM error, you could install an
                        "Error Handler" in which you take action <b>after</b> the error has happened.
                        It is <STRONG>not</STRONG> a solution to make a buggy script work properly.
                        Neither does it catch non-COM related script errors (e.g. declaration and
                        syntax errors).</p>
                <p> </p>
                <p>如同普通的COM事件,错误处理事件同样在AU3中得到实现,即用函数 ObjEvent() 和 用户自己命名的一个COM事件函数。 不同之处在于,前者用特定字符串:“AutoIt.Error”, 后者会用该对象的方法来命名</P>
                <p>Error handling is implemented in the same way as a normal COM Event, using
                        ObjEvent() and a user defined COM Event Function. The only difference is the
                        usage of the fixed string "AutoIt.Error" as the name of the object.</p>
                <p> </p>
                <p>一个示例</P>
                <p>An example:</p>
                <p> </p>
                <P class="codebox">Global $g_eventerror = 0  
                ; 此变量用来检查是否有COM错误发生。在处理错误后应当重置它的值。
                ; to be checked to know if com error occurs. Must be reset after handling.<BR>
                        <BR>
                        $oMyError = ObjEvent("AutoIt.Error","MyErrFunc")
                        ; 创建自己的错误处理函数(器)
                        ; Install a custom error handler<BR>
                        <BR>
                        ; 在这里,您可以从容地处理所发生的错误(对象并不包含这方法)
                        ; Performing a deliberate failure here (object does not exist)<BR>
                        $oIE = ObjCreate("InternetExplorer.Application")<br>
                        $oIE.visible = 1<br> $oIE.bogus<!--c2-->
                        <BR>
                        if $g_eventerror then Msgbox(0,"","the previous line got an error.")<BR>
                        <BR>
                        Exit
                        <BR>
                        <BR>
                        <BR>
                        ; 这是我们定作的错误处理函数
                        ; This is my custom error handler
                        <BR>
                        Func MyErrFunc()
                        <BR>
                           $HexNumber=hex($oMyError.number,8)
                        <BR>
                           Msgbox(0,"","我们拦截到一个COM错误 !" & @CRLF & _<BR>
                                       
                        "数字为: " & $HexNumber & @CRLF & _<BR>
                                       
                        "具体描述为: " & $oMyError.windescription )
                        <BR>
                        <BR>
                           $g_eventerror = 1 
                        ; 函数在返回前会检查是否有错误发生
                        ; something to check for when this function returns
                        <BR>
                        Endfunc</P>
                <P></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"></SPAN> </P>
                </SPAN>
                <p>对象会反馈错误事件通知的是错误事件处理器的特别之处。这也是AU3中一个错误对象所包含的那些有用的属性和方法,在某种程序上实现了基于VB中的“错误”对象。</P>
                <p>
                        One thing is special about the Error Event Handler, and that is the Object it
                        returns.  This is an AutoIt Error Object that contains some useful
                        properties and methods.  It's implementation is partly based on
                        the "Err" Object in VB(script):</p>
                <p> </p>
                <p>AU3 错误对象的属性:</P>
                <p>
                        <TABLE id="Table1" cellSpacing="0" cellPadding="3" width="100%" border="1" bordercolor="#C0C0C0">
                                <TR>
                                        <TD width="15%">.number  </TD>
                                        <TD width="85%">存储窗口调用一个COM后的错误代码,为整数</TD>
                                </TR>
                                <TR>
                                        <TD>.windescription</TD>
                                        <TD>FormatWinError()从 .number 继承到的文字</TD>
                                </TR>
                                <TR>
                                        <TD>.source </TD>
                                        <TD>出错对象的名字 (是 ExcepInfo.source 中的内容)</TD>
                                </TR><TR>
                                        <TD>.description</TD>
                                        <TD>对象描述错误的源代码 (是 ExcepInfo.source 中的内容)</TD>
                                </TR><TR>
                                        <TD>.helpfile</TD>
                                        <TD>对象关于错误的帮助文件源代码 (是 ExcepInfo.helpfile 中的内容)</TD>
                                </TR><TR>
                                        <TD>.helpcontext
                                        </TD>
                                        <TD>对象帮助文件的索引编号(来自 ExcepInfo.helpcontext 的内容)</TD>
                                </TR><TR>
                                        <TD>.lastdllerror</TD>
                                        <TD>函数 GetLastError() 返回的数值</TD>
                                </TR><TR>
                                        <TD>.scriptline</TD>
                                        <TD>发生错误的代码行的行数</TD>
                                </TR>
                        </TABLE>
                </p>
                <p>Properties of the AutoIt Error Object:</p>
                <p>
                        <TABLE id="Table1" cellSpacing="0" cellPadding="3" width="100%" border="1" bordercolor="#C0C0C0">
                                <TR>
                                        <TD width="15%">.number  </TD>
                                        <TD width="85%">The Windows HRESULT value from a COM call</TD>
                                </TR><TR>
                                        <TD>.windescription</TD>
                                        <TD>The FormatWinError() text derived from .number</TD>
                                </TR><TR>
                                        <TD>.source </TD>
                                        <TD>Name of the Object generating the error (contents from
                                                ExcepInfo.source)</TD>
                                </TR><TR>
                                        <TD>.description</TD>
                                        <TD>Source Object's description of the error (contents from
                                                ExcepInfo.description)</TD>
                                </TR><TR>
                                        <TD>.helpfile</TD>
                                        <TD>Source Object's helpfile for the error (contents from
                                                ExcepInfo.helpfile)</TD>
                                </TR><TR>
                                        <TD>.helpcontext
                                        </TD>
                                        <TD>Source Object's helpfile context id number (contents from
                                                ExcepInfo.helpcontext)</TD>
                                </TR><TR>
                                        <TD>.lastdllerror</TD>
                                        <TD>The number returned from GetLastError()</TD>
                                </TR>
                                <TR>
                                        <TD>.scriptline</TD>
                                        <TD>The script line on which the error was generated</TD>
                                </TR>
                        </TABLE>
                </p>
                <p> </p>
                <P> </P>
                <P><FONT size="2"><STRONG>给自定义函数编写者一个提醒</STRONG></FONT></P>
                                <P> </P>
                <P><FONT size="2">在一个AU3脚本里,您只能有一个处于工作中的错误事件通知处理器。
                                如果您编写的UDF里包含有COM函数,您可以这样检查用户是否已经创建错误事件通知处理器:</FONT><FONT size="2"></P>
                <P class="codebox">$sFuncName = ObjEvent("AutoIt.Error")<BR>
                        if $sFuncName <> "" then Msgbox (0,"测试","用户已定义的错误事件处理器的函数是: " & $sFuncName)<BR>
                </P>
                <P>
                <P>如果没有处于工作中的错误处理器,您可以在自己的UDF被调用时,临时性地创建一个。</P>
                <P>但是,您永远不能在没有释放掉它被赋值给的变量前就把处理器停掉。如果脚本作者置入一个COM错误处理器,那么,他有责任用一个正确的函数来捕捉在UDF中产生的COM错误。</FONT></SPAN></P>
                <P> </P>
                <P><FONT size="2"><STRONG>A note for UDF writers</STRONG></FONT></P>
                <P> </P>
                <P><FONT size="2">You can only have ONE Error Event Handler active per AutoIt script.
                                If you are writing UDF's containing COM functions, you can check if the user
                                has an Error Handler installed as follows:</FONT><FONT size="2"></P>
                <P class="codebox">$sFuncName = ObjEvent("AutoIt.Error")<BR>
                        if $sFuncName <> "" then Msgbox (0,"Test","User has installed Error
                        Handler function: " & $sFuncName)<BR>
                </P>
                <P>
                <P>If no Error Handler was active, you can temporarily install your own during the
                        UDF call.</P>
                <P>However, you can never stop an existing Error Handler without releasing the
                        variable it had been assigned to. If the script author had installed a COM
                        Error Handler, it's his responsibility to use a proper function
                        that will also be able to catch COM errors generated by
                        UDF's.</FONT></SPAN></P>
                <P> </P>
                <b>
                        <H1>OLE/COM Object Viewer(OLE/COM对象查看器)</H1>
                </b>
                <P> </P>
                <P>"OLE/COM 对象查看器" 是一个非常有用的工具,
                        它可以查看当前系统中的所有 COM 对象. 你可以在 Windows 
                        2000 resource kit 中找到它或者从这里下载: <A href="http://www.microsoft.com/downloads/details.aspx?familyid=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en" target="_blank">
                                http://www.microsoft.com/downloads/details.aspx?familyid=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en</A></P>
                <P>安装这个程序相当郁闷. 它不会为你创建任何图标到开始菜单里。
                        因此, 你要到安装目录下打开一个名为 <FONT face="Courier New">oleview.exe</FONT>
                        的文件。通常它安装在此目录下(默认安装): <FONT face="Courier New">C:\Program Files\Resource Kit</FONT>
                        </P>
                <P>
                </P>
                <P> 运行<FONT face="Courier New">oleview.exe</FONT>时,很多系统
                        会报错:缺少名为<FONT face="Courier New">iviewers.dll 的文件</FONT>.
                        这是程序运行必需的文件,但很奇怪它没有跟最新的安装程序放一起。 你可以在这里获取此文件:<A href="http://download.microsoft.com/download/2/f/1/2f15a59b-6cd7-467b-8ff2-f162c3932235/ovi386.exe" target="_blank">
                                http://download.microsoft.com/download/2/f/1/2f15a59b-6cd7-467b-8ff2-f162c3932235/ovi386.exe</A>. 
                        它默认安装到此文件夹: C:\MSTOOLS\BIN 
                        你只需要把 iviewer.dll 文件. 复制到 oleview.exe 文件所在的目录中;如果需要注册这个DLL文件,可以在开始菜单“运行”里直接执行命令: <FONT face="Courier New">
                                regsvr32 /s iviewers.dll</FONT>(注:可能需要输入DLL文件的完整路径</P>
                <P> </P>
                <P>让我们拿Oleviewer来做个示范。启动它并按以下操作顺序打开树状图:<br><FONT face="Courier New">
                                Object Classes->Grouped by Component Category->Control->Microsoft Web
                                Browser</FONT>.</P>
                <P>Let's do an example with the Oleviewer.  Run it and follow this tree: <FONT face="Courier New">
                                Object Classes->Grouped by Component Category->Control->Microsoft Web
                                Browser</FONT>.</P>
                <P> </P>
                <p><img src="../images/oleview1.png" width="591" height="416" alt=""></p>
                <P> </P>
                <P>在左边这栏,您可以看到此对象定义的所有COM接口。 我们晚点再讨论这个,先仔细看右边的栏目。它包含很多如何在AU3脚本里调用此对象的信息,. 大部分重要信息跟"<FONT face="Courier New">VersionIndependentProgID</FONT>"有关.
                        在它“=”右边是对象的名字,调用 ObjCreate 或 ObjGet 或 ObjEvent 函数时就是以此名字作为对象参数。此外,它还有对象所在的路径以及对象属于哪个文件的信息。该文件可能是一个EXE文件,或者是一个DLL文件,又或者是一个OCX文件。
          <FONT face="Courier New">InProcServer32</FONT>意思是,如果你从脚本里调用此对象,那它工作时和脚本是同一个线程(进程里)。如果您看到是: <FONT face="Courier New">LocalServer32, </FONT><FONT face="Verdana">则该对象会以独立的线程工作。
                  对象还必须带有某种类型的运行库(库名在此字段后面:"<FONT face="Courier New">TypeLib=</FONT>"),否则AU3脚本就不能调用此类对象。</FONT></P>
                <P>In the left column you see all COM Interfaces that have been defined for this
                        object. We talk about those later. Take a closer look at the right column.
                        It contains a lot of information to use this object in an AutoIt
                        script. Most important is the "<FONT face="Courier New">VersionIndependentProgID</FONT>".
                        This is the name to be used in an ObjCreate, ObjGet or ObjEvent function.
                        Furthermore it contains the directory and filename that contains the object.
                        This can be an EXE, a DLL or an OCX file. <FONT face="Courier New">InProcServer32</FONT>
                        means that the object runs in the same thread as your script (in-process). When
                        you see <FONT face="Courier New">LocalServer32, </FONT><FONT face="Verdana">the
                                object runs as a separate process. The object must also contain a type library
                                (the lines following "<FONT face="Courier New">TypeLib=</FONT>"), otherwise it
                                can't be used in an AutoIt script.</FONT></P>
                <P> </P>
                <P>左边栏目里的众多接口是我们与对象作交互操作的各种方式。有用于存储的,(如:IStorage, IPersist), 有用于嵌入窗口界面的(如:IOleObject, IOleControl)。 AU3用<FONT face="Courier New">IDispatch</FONT>
                        这个接口来自动控制对象. 此接口 '昭示了' 对象支持的所有可用于脚本编写的方法和属性。如果没有这个接口,您在AU3中脚本里就调用不了此类对象。</P>
                <P>让我们仔细查看这个接口,用右键点击它的名字<FONT face="Courier New">IDispatch</FONT>, 然后从右键菜单中选择 "<FONT face="Courier New">View...</FONT>",点击"<FONT face="Courier New">View TypeInfo...</FONT>"这个按钮。
                        (注意: 如果这个按钮是灰色的,您可能没有注册 <FONT face="Courier New">iviewers.dll</FONT> 文件, 或者是该对象没有任何类型的运行库)</P>
                <P>The interfaces in the left column are used for several ways of interacting with
                        the object. Some are used for storage (IStorage, IPersist), others for
                        embedding in a GUI (IOleObject, IOleControl). AutoIt uses the <FONT face="Courier New">IDispatch</FONT>
                        interface for automation. This interface 'exposes' all scriptable methods and
                        properties that the object supports. If it does not exist, you can't use
                        the object in an AutoIt script.</P>
                <P>Let's take a look at this interface.  Right-click on the name <FONT face="Courier New">
                                IDispatch</FONT> and choose "<FONT face="Courier New">View...</FONT>" from
                        the context menu. Then click the "<FONT face="Courier New">View TypeInfo...</FONT>"
                        button.  (Note: if this button is grayed out, you did not have registered
                        the <FONT face="Courier New">iviewers.dll</FONT> file, or the object does not
                        have a type library)</P>
                <P> </P>
                <p><img src="../images/oleview2.png" width="592" height="830" alt=""></p>
                <P> </P>
                <P>"ITypeInfo Viewer" 程序窗口只能展示对象提供的信息。 如果开发者没有将帮助文件列入其中,您只能看到对象的属性和方法,此外没有其它信息. 在此示范里可以看到,微软的网页浏览器的库类型很庞大。
                        点击左边栏目的一个项目,相关描述就会在右边栏目里展示出来。有时候,您必须翻阅<FONT face="Courier New">Inherited Interfaces</FONT>"(继承到的接口)来检索出更多的此对象的方法。</P>
                <P>The "ITypeInfo Viewer" window does only show the information that is provided
                        with the object. If the developer decides not to include a help file, you will
                        only see the names of the method/properties and nothing else. The "Microsoft
                        Web Browser" type library is however quite extensive. Just click an
                        item in the left column, and a description will be shown at the right.
                        Sometimes you have to browse through "<FONT face="Courier New">Inherited Interfaces</FONT>"
                        to retrieve more methods for the object.</P>
                        <P>描述对象的属性和方法的语法是 C/C++ 语言。这是一个属性的描述:"<FONT face="Courier New">HRESULT Resizable([in]
                                VARIANT_BOOL pbOffline)</FONT>"在AU3里必须重新编写成类似代码:<FONT face="Courier New">$Resizable=$Object.Resizable</FONT>($Object 变量装有 ObjCreate 或 ObjGet 函数所调用的对象的引用)</P>
                <P>The syntax of the described methods/properties are in C/C++ style. A
                        property described as "<FONT face="Courier New">HRESULT Resizable([in]
                                VARIANT_BOOL pbOffline)</FONT>", has to be rewritten in AutoIt
                        like:  <FONT face="Courier New">$Resizable=$Object.Resizable</FONT> 
                        ($Object holds the object created with ObjCreate or ObjGet).</P>
                <P> </P>
                <P> </P>
                <b>
                        <H1>容易被搞混淆的术语</H1>
                </b>
                <p> </p>
                <p>这些术语的涵义跟COM不同,但通常人们搞混淆了! <br>These terms are commonly mixed up with COM, but have a different meaning: 
                </p>
                <p> </p>
                <p>OOP = 面向对象编程(程序设计) 是一种编程技术,软件的各组件是以可重复使用的代码块堆砌起来,就是我们熟悉的”对象”。 <br>Object Oriented Programming. A programming technique in which software
                        components are put together from reusable building blocks known as Objects.</p>
                <p> </p>
                <p>DDE = 动态数据交换技术。 您可以认为这是COM的前身。 运用IPC(进程间通讯技术)它让不同的应用程序之间得以传输信息和命令。 <br>Dynamic Data Exchange.
                </p>
                <p>You can say this is the predecessor of COM. It used IPC to transfer information
                        and commands between different applications.</p>
                <p> </p>
                <p>OLE = 对象链接和嵌入技术。 第一个OLE版本只是DDE的扩充版本,用来把一个程序的数据”插入“到另一个程序中。 现阶段的OLE技术被置于COM工作的顶层, 它也是ActiveX技术的一部分。<br>Object Linking and Embedding. 
                     In his first version, OLE was an extended version of DDE to 'embed' data from
                        one program into another.  The current generation of OLE is built on top
                        of COM and is part of ActiveX.</p>
                <p> </p>
                <p>Automation = 自动控制。 一个程序操纵另一个程序的对象的方式。OLE , ActiveX 和 COM 中都有此运用。 <br>This is a way of manipulating another application's objects. It is
                        used in OLE, ActiveX and COM.</p>
                <p> </p>
                <p>ActiveX = 微软倡导的网络化多媒体对象技术。 是带有自动化操作的下一代OLE, 最初它主要被研发用来提供接口给工作于网络的应用程序(特别是网页浏览器)<br>The next generation OLE with Automation, at first mainly developed to
                        interface between applications over a network (especially web browsers).
                        ActiveX is built on top of COM.</p>
                <p> </p>
                <p>DCOM= 分布式组件对象模型。 对COM作了微小的改动,让它有能力在不同的计算机之间进行通讯。<br>Distributed COM.  A slight modification to COM, making it able to
                        communicate between different physical computers.</p>
                <p> </p>
                <p>.NET (dot Net)= 并不是一份软件(或代码), 只微软倡导的一个”想法“:微软的所有软件所有的”东西“都可以通过它联系起来。<br>This is not really a piece of software, but an 'idea' from
                        Microsoft to interconnect just about "everything" through (their) software. "dot
                        Net" is used mainly for Web-based services.</p>
                <p> </p>
                <p>COMmunist = 共产主义者, 共产党员。不是COM的拥护者, 只是信仰共产主义(认为普通大众应当拥有所有财产的理论)的人。<br>This is not a supporter of COM, but someone who believes in
                        communism (a theory that the common people should own all the property).</p>
                <p> </p>
        </body>
</html>
不会改名的请直接下载这个完整的HTML文件

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 1金钱 +30 贡献 +5 收起 理由
whitehead + 30 + 5

查看全部评分

 楼主| 发表于 2012-4-30 02:00:42 | 显示全部楼层
本帖最后由 user3000 于 2012-6-11 04:06 编辑

自己沙发自己坐!

欢迎高水平者给予指点一二! 我本身一个英语水平有限,二个编程知识差, 肯定有不少误翻译的地方。
发表于 2012-4-30 02:27:20 | 显示全部楼层
LZ精神可嘉啊,是我等学习的典范。支持一下!
发表于 2012-4-30 02:48:15 | 显示全部楼层
亲 2快钱唉,要了我的命了。。。

评分

参与人数 1金钱 +2 收起 理由
user3000 + 2 还给你了,小气鬼!

查看全部评分

发表于 2012-4-30 02:49:23 | 显示全部楼层
亲 下载还要20,我决定不下了
 楼主| 发表于 2012-4-30 03:37:48 | 显示全部楼层
回复 5# komaau3

已经作了修改, 有源代码下了, 但必须存为特定的网页文件格式才行!

评分

参与人数 1金钱 +10 收起 理由
komaau3 + 10 呵呵 我一向出手阔绰

查看全部评分

发表于 2012-4-30 06:23:40 | 显示全部楼层
回复 6# user3000

这么辛苦啊,4点多还在上网
发表于 2012-5-2 15:18:47 | 显示全部楼层
好人啊,谢谢
发表于 2012-5-2 20:30:29 | 显示全部楼层
如此重要的工作,不加分不行啊
发表于 2012-5-12 16:48:33 | 显示全部楼层
如此重要的工作,不加分不行啊
发表于 2012-5-13 13:27:32 | 显示全部楼层
楼主好威武好强大!!!这个必须支持!!
发表于 2012-5-13 16:04:46 | 显示全部楼层
正需要这个呢,谢谢。。
发表于 2012-5-13 18:49:57 | 显示全部楼层
支持你楼主
发表于 2012-6-1 15:38:07 | 显示全部楼层
必须支持,我也正好看了,下载学习了
发表于 2012-6-12 22:45:36 | 显示全部楼层
首先感谢分享,然后说下,HTML 文件中的图片路径貌似不对,显示不了图片!...
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-5 05:23 , Processed in 0.113565 second(s), 27 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表