Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/31/2014 in all areas

  1. Example $sURL = "http://test/21-04-2014" InetGetSize($sURL) If @error Then ConsoleWrite("Invalid URL" & @CRLF) Else ConsoleWrite("Valid URL" & @CRLF) EndIf Regards Phoenix XL
    2 points
  2. Hello everyone! As always, I'm proud to present you vPaint. It's an image editor. It uses GDI+ as its drawing library. I want to thank to all members of this forum. Without you, this app wouldn't be ever written. Thank you for everything. Download: vPaint 4 image editor
    1 point
  3. UEZ

    Binary write to file

    Try this: Global $sB64 = StringReplace((FileRead(@ScriptDir & "\binary.txt")), @LF, "") Global $hFile = FileOpen(@ScriptDir & "\binary.ogg", 18) FileWrite($hFile, _WinAPI_Base64Decode($sB64)) FileClose($hFile) Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Br, UEZ
    1 point
  4. swoop

    WinHTTP functions

    Question about connecting with winHTTP on non-standard ports for HTTP or on a localhost. It seems I can connect to websites on my computer using winHTTP and GET/POST. But when I try to setup a web server on my local machine on a port such as 8884, it does not return any results. Local $hconnection = _WinHttpConnect($hsession, "localhost:8884") _WinHttpQueryDataAvailable($hrequest) just returns unavailable, and there is not data coming back from _WinHttpQueryHeaders and _WinHttpReadData. But when I submit the same GET/POST request on something like POSTMAN Chrome extension, there is no problem access localhost or localhost on a non-standard HTTP port. Is there something special I need to do in the _WinHttpConnect description of the local host? Thanks in advance.
    1 point
  5. From Au3Info, and running on Win 7, the desktop handle is ControlGetHandle("[Class:WorkerW]", "", "SysListView321") So on Win 7, this appears to work. #include <WinAPI.au3> #include <WindowsConstants.au3> _WinAPI_DrawRect(20, 20, @DesktopWidth / 2, @DesktopHeight / 2, 0x0000FF) Sleep(2000) _WinAPI_RedrawWindow(ControlGetHandle("[Class:WorkerW]", "", "SysListView321"), 0, 0, $RDW_INVALIDATE + $RDW_ALLCHILDREN) Sleep(3000) Func _WinAPI_DrawRect($start_x, $start_y, $iWidth, $iHeight, $iColor) Local $hDC = _WinAPI_GetWindowDC(0) ; DC of entire screen (desktop) Local $tRect = DllStructCreate($tagRECT) DllStructSetData($tRect, 1, $start_x) DllStructSetData($tRect, 2, $start_y) DllStructSetData($tRect, 3, $iWidth) DllStructSetData($tRect, 4, $iHeight) Local $hBrush = _WinAPI_CreateSolidBrush($iColor) _WinAPI_FrameRect($hDC, DllStructGetPtr($tRect), $hBrush) ; clear resources _WinAPI_DeleteObject($hBrush) _WinAPI_ReleaseDC(0, $hDC) EndFunc ;==>_WinAPI_DrawRect
    1 point
×
×
  • Create New...