Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/05/2013 in all areas

  1. Yashied

    WinAPIEx UDF

    LAST VERSION - 3.8 03-Jul-12 This library contains the WinAPI functions are not included for unknown reasons to the native AutoIt WinAPI library. I use this UDF in nearly all of my programs, and decided to share it with the AutoIt community. I agree that over time some of these functions will be part of the native AutoIt library, but still... The library includes some undocumented, but useful functions (eg _WinAPI_GetFontResourceInfo()). The library also contains all the necessary constants to work with the appropriate functions. Most functions from this UDF intended for experienced users, but beginners will find the same lot of useful information for yourself. I will be to periodically add new functions to the library. The archive contains WinAPIEx library, and as usual an excellent examples from me. Some examples I took from this forum and to simplify them for better understanding. For those who use SciTE (full version) I have prepared the au3.userudfs.properties and au3.user.calltips.api files to highlight functions from this UDF in your scripts. Just copy this files to ...SciTEProperties and ...SciTEAPI, respectively. I hope this UDF will be useful for many as for me. I look forward to any feedback and suggestions. Maybe somebody wants to add new WinAPI functions? Credits Available functions Files to download WinAPIEx UDF v3.8 for AutoIt 3.3.6.1 Previous downloads: 27953 WinAPIEx UDF v3.8 for AutoIt 3.3.8.x Previous downloads: 14850
    1 point
  2. KaFu

    Web Screenshot

    Just remembered this one and tried to make it work without AutoItObject, requires Beta to run properly . #include <IE.au3> #include <WinAPI.au3> #include <ScreenCapture.au3> #include <WindowsConstants.au3> ; Runs fine with Beta 3.3.9.5+ If Int(StringReplace(@AutoItVersion, ".", "")) <= 3381 Then MsgBox(0, "Exit", "Requires AutoIt version > 3.3.8.1, try with Beta") Exit EndIf Global $dtagIUnknown = "QueryInterface hresult(ptr;ptr*);" & _ "AddRef dword();" & _ "Release dword();" Global Const $gh_AU3Obj_ole32dll = DllOpen("ole32.dll") WebCaptureTest("http://funk.eu", "Test1.png") Func WebCaptureTest($Url, $ImageName) Local $hBmp = WebCapture($Url, 1280) _ScreenCapture_SaveImage($ImageName, $hBmp, True) EndFunc ;==>WebCaptureTest Func WebCapture($Url, $WebWidth = 1024) Local Const $DVASPECT_CONTENT = 1 Local $tIID_IViewObject2 = _CLSIDFromString("{00000127-0000-0000-C000-000000000046}") Local $dtagIViewObject2 = $dtagIUnknown & "Draw hresult(dword;long;ptr;ptr;dword;dword;ptr;ptr;int;dword);" Local $oIE = ObjCreate("Shell.Explorer.2") GUICreate("", $WebWidth, 768, -1, -1) GUICtrlCreateObj($oIE, 0, 0, $WebWidth, 768) _IELoadWaitTimeout(20000) ; 20 sec _IENavigate($oIE, $Url) _IELoadWait($oIE) Local $oDocument = $oIE.document Local $oBody = $oIE.document.body Local $oHtml = $oIE.document.documentElement $oBody.scroll = "no" $oBody.style.borderStyle = "none" $oHtml.style.overflow = 'hidden' $oBody.style.overflow = 'hidden' Local $oIViewObject2 = ObjCreateInterface($oDocument, "{00000127-0000-0000-C000-000000000046}", "Draw hresult(dword;long;ptr;ptr;dword;dword;ptr;ptr;int;dword);") If @error Then Return SetError(1, 0, 0) Local $BodyWidth = $oBody.scrollWidth Local $BodyHeight = $oBody.scrollHeight Local $RootWidth = $oHtml.scrollWidth Local $RootHeight = $oHtml.scrollHeight Local $Width = $BodyWidth Local $Height = $RootHeight If $BodyHeight > $Height Then $Height = $BodyHeight $oIE.width = $Width $oIE.height = $Height Local $hDC = _WinAPI_GetDC(0) Local $hMemDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBmp = _WinAPI_CreateCompatibleBitmap($hDC, $Width, $Height) _WinAPI_SelectObject($hMemDC, $hBmp) Local $sRECT = DllStructCreate($tagRECT) DllStructSetData($sRECT, "Top", 0) DllStructSetData($sRECT, "Left", 0) DllStructSetData($sRECT, "Right", $Width) DllStructSetData($sRECT, "Bottom", $Height) $oIViewObject2.Draw($DVASPECT_CONTENT, -1, 0, 0, Number($hDC), Number($hMemDC), Number(DllStructGetPtr($sRECT)), 0, 0, 0) _WinAPI_DeleteDC($hMemDC) _WinAPI_ReleaseDC(0, $hDC) Return $hBmp EndFunc ;==>WebCapture Func _CLSIDFromString($sString) Local $tCLSID = DllStructCreate("dword;word;word;byte[8]") Local $aResult = DllCall($gh_AU3Obj_ole32dll, 'long', 'CLSIDFromString', 'wstr', $sString, 'ptr', DllStructGetPtr($tCLSID)) If @error Then Return SetError(1, @error, 0) If $aResult[0] <> 0 Then Return SetError(2, $aResult[0], 0) Return $tCLSID EndFunc ;==>_CLSIDFromString
    1 point
  3. It's by design, I believe you when you said you read the article, but did you understand it? The whole part about multiple files etc... is achieved by creating a shell extension, something you as the developer have to create. It uses COM, which AutoIt can easily access, so AutoIt isn't at fault nor is it the UDF.
    1 point
  4. Both pong & rings are fun. The move increment is (opinion from non-gamer) a bit large. @bogQ; superantispyware is an excellent malware cleaner. The name IS a bit silly-sounding. Actually, a lot silly-sounding. Still a false positive though.
    1 point
  5. it is false positive >_< God, can't believe that you have something called SUPERAnti-Spyware installed on your comp. If you ask me i whud consider SUPERAnti-Spyware a Security issues just cos of its dumb name. And cos of that "Hello Friend", i think your comp have other problems, so get rid of that Cool named SUPERAnti-Spyware instal free version of Avast and rescan your comp in boot mode. There inst anything wrong with the games, i dont even get false positive, well i lie, there is 1 problem on ring game, i'm hooked on it
    1 point
×
×
  • Create New...