Jump to content

TouchOdeath

Active Members
  • Posts

    114
  • Joined

  • Last visited

  • Days Won

    1

Community Answers

  1. TouchOdeath's post in _FTP_FileOpen Windows 8.1 doesn't work was marked as the answer   
    SOLUTION:
    #include <IE.au3> #include <Array.au3> ;NOTES: ;$server, $usern, and $pass are subject to URL encoding (http://www.w3schools.com/tags/ref_urlencode.asp) ;the stripping of excess HTML probably depends on your version of IE, I have only tested with IE11 ftpflread("ftp.someftp.com","yourusername","yourpass","yourfile.txt") func ftpflread($server, $usern, $pass, $flnm) Local $oIE = _IECreate("ftp://" & $usern & ":" & $pass & "@" & $server & "/" & $flnm,0,0,1) ;hidden window Local $sHTML = _IEDocReadHTML($oIE) WinClose("ftp://" & $server & "/" & $flnm & " - Internet Explorer","") $sHTML = StringReplace($sHTML,"<html><head></head><body><pre>","") $sHTML = StringSplit(StringReplace($sHTML,"</pre></body></html>",""),__HexToString("0x0a")) _ArrayDelete($sHTML,0) ;_ArrayDisplay($sHTML,'') Return $sHTML EndFunc Func __HexToString($sString) If StringLeft($sString, 2) <> "0x" Then $sString = "0x" & $sString Return BinaryToString($sString) EndFunc Not as clean as I wanted, but it sure is cleaner than the .NET app, and it works with both windows 7 and 8.1  IE11.  I haven't tested any other version of IE.  Hopefully this thread helps somebody....
    The original problem with _ftp_Open, InetGet, and _InetGetSource has not been solved but atleast the problem has been brought forth.
  2. TouchOdeath's post in WinGetHandle parameter problem was marked as the answer   
    Opt("WinTitleMatchMode", 2)
    you can search for a string within the title of the window.
×
×
  • Create New...