Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/12/2014 in all areas

  1. WinHttp.au3: #include-once Global Const $HTTP_STATUS_OK = 200 Func HttpPost($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $sURL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc Func HttpGet($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("GET", $sURL & "?" & $sData, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.Send() If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc Example 1: #include "WinHttp.au3" Global $MD5 = HttpPost("http://www.afk-manager.ir/test/post.php", "password=WeWantThisAsMd5") MsgBox(64, "MD5", $MD5) Example 2: #include "WinHttp.au3" Global $sGet = HttpGet("http://www.google.com/") FileWrite("Google.txt", $sGet) Speed compare: [WinHttp.WinHttpRequest.5.1 GET] 1 = 422.961162765649 2 = 455.738280639636 3 = 441.821516504421 4 = 390.538648365335 Total = 1711.059608275041 Average = 427.7649020687603 [WinHttp.WinHttpRequest.5.1 POST] 1 = 826.436200956633 2 = 872.366642546045 3 = 871.266802895081 4 = 875.792832686324 Total = 3445.862479084083 Average = 861.4656197710208 [HTTP UDF GET] 1 = 984.282912132673 2 = 813.896511915435 3 = 781.158836566862 4 = 791.901235916364 Total = 3371.239496531334 Average = 842.8098741328335 [HTTP UDF POST] 1 = 788.734835486743 2 = 975.688234142967 3 = 785.810779035388 4 = 847.537193542955 Total = 3397.771042208053 Average = 849.4427605520133 [InetRead GET] 1 = 672.120733570292 2 = 595.221462195098 3 = 561.122261209642 4 = 738.180516302658 Total = 2566.64497327769 Average = 641.6612433194225 Tests result: Server 2003 32bit OK Server 2003 64bit Not Tested Server 2008 32bit Not Tested Server 2008 64bit OK XP 32bit OK XP 64bit Not Tested Vista 32bit Not Tested Vista 64bit Not Tested 7 32bit OK 7 64bit OK 8 32bit OK 8 64bit OK Are you interested? Check this out: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384106(v=vs.85).aspx
    1 point
  2. Then why not simply? Local $aArray = [1, 2, 34, 67]
    1 point
  3. Geodetic

    HtmlHelp UDF

    Greetings to all, Geodetic (newcomer) here, I have been putting together an application with a help file, and hit walls when it came to integrating help! A search of the forums turned up some hints, but also a lot of problems. So my last little while has been involved in putting together my HtmlHelp UDF - a fairly complete UDF for implementing help in your AutoIt applications. It provides functionality for Help file tab control (Contents, Index, Search) displaying topics by ID or by URL (in the CHM file) Popup creation and control etc. I have included some example files as well, but the real package is a little to large to include here, so you can download it from my personal site. The download link is here. Sorry, this link has been void since Shaw (my Internet provider) retired (like in Blade Runner!) personal webspace. Hope some find this useful! HtmlHelp UDF.zip Update (2021-01-25) I have updated the UDF (almost no changes to the actual UDF au3 file) as a kit, which includes a real AutoIt demo, detailed (compiled HTML) help file, original (but modified) sample files, more information and a few tools. This kit should be used instead of the above UDF link. The new demo and help file should simplify understanding how to implement help! I have not talked about actual creation of compiled HTML help - that is a topic best left to the user, particularly concerning the ancient HTML Help Workshop (compiler). It's old, but it's free, and it works! I'm happy to see that this post is now listed on the Wiki UDF page! - Allen AutoIt Html Help UDF Kit v1.3.zip
    1 point
  4. James

    AutoItObject UDF

    I just jizzed in my pants
    1 point
×
×
  • Create New...