在Tcl中启动浏览器或者外部程序

@ 2009-07-19 14:54:00
标签:

    # 2008/12/10 03:59 @ Sean Zhang

    • 参考:[[http://wiki.tcl.tk/557|Invoking browsers]]

    下面的例子主要是针对Windows而言。上文中包含了多平台的方案。

    set url http://sina.com.cn/
    eval exec [auto_execok start] [list $url] &
    

    或者

    proc url x {
      set x [regsub -all -nocase {htm} $x {ht%6D}]
      exec rundll32 url.dll,FileProtocolHandler $x &
    }
    
    url http://sina.com.cn/
    
    标签:

      分享到:
      comments powered by Disqus

      28/32ms