yujianan1984 发表于 2010-1-26 23:27:11

如何获得"InternetExplorer.Application"的接口?

有如下段代码,想知道如何获得IE的com接口和属性,谢谢了!

package require tcom
set application [::tcom::ref createobject "InternetExplorer.Application"]
$application Visible 1
proc query {application url} {
    if {]} {
      $application Refresh
    } else {
      $application Navigate $url
    }
    while {[$application Busy]==1} {
      after 200
    }

set int [::tcom::info interface $application]
    set H_Document [$applicationDocument]
    puts "dddd==$H_Document"
    set I_Document [::tcom::info interface $H_Document]
    #all methods the handle supports [$I_Document methods]
    set H_body [$H_Document body]
    # ??????????
    #return [$H_body innerHTML]
}
set url "http://www.sina.com.cn"

regexp {torrentmeta_id=(\d+)} $url match id
set content
页: [1]
查看完整版本: 如何获得"InternetExplorer.Application"的接口?