Changeset df6c30c in tol


Ignore:
Timestamp:
May 7, 2012, 6:47:19 AM (14 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
b03a8cb
Parents:
cb42322
Message:

refs #1116, portando cambio [4626], geturl basado en tcom

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@4634 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/system/_geturl.tol

    rcb42322 rdf6c30c  
    7676
    7777//////////////////////////////////////////////////////////////////////////////
     78Text GetUrlContents.tcom.iexplore(Text url)
     79//////////////////////////////////////////////////////////////////////////////
     80{
     81  Set eval = Tcl_Eval("
     82    package require tcom
     83    set iexplore [::tcom::ref createobject InternetExplorer.Application]
     84    $iexplore Navigate2 {"<<url<<"}
     85    while {[$iexplore Busy]} {
     86      after 100
     87    }
     88    set html [[[$iexplore Document] body] innerHTML]
     89    $iexplore Quit
     90    set html
     91  ");
     92  If(eval[2], eval[1], {
     93    Error(eval[1]); ""
     94  })
     95};
     96
     97//////////////////////////////////////////////////////////////////////////////
    7898Text GetUrlContents(Text url)
    7999//////////////////////////////////////////////////////////////////////////////
    … …  
    84104  method=="tcl:curl", GetUrlContents.tcl.curl(url),
    85105  method=="sys:wget", GetUrlContents.sys.wget(url),
     106  method=="tcom:iexplore", GetUrlContents.tcom.iexplore(url),
    86107  1==1, {
    87108    WriteLn("[GetUrlContents] Invalid option value at "
Note: See TracChangeset for help on using the changeset viewer.