Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/16/2012 in all areas

  1. If you want only the number of files using DirGetSize $patch = "C:\Windows\System32\" $test = DirGetSize($patch, 1) MsgBox(4096,'Test', "Number of files found: " & $test[1])
    1 point
  2. If you have a closer look to _GUICtrlStatic_SetImage() you will see that it is more or less the same I did except to set it for labels. Here the shorten example with a label control instead of picture control: ;coded by UEZ 2012 #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <Memory.au3> _GDIPlus_Startup() Global Const $IMAGE_BITMAP = 0 Global Const $STM_SETIMAGE = 0x0172 Global $msg Global Const $hGUI = GUICreate("Test", 600, 250) Global Const $idLogo = GUICtrlCreateLabel("", 215, 20, 169, 68, $SS_BITMAP) Global $hBmp, $hBmp_Logo If @OSBuild < 6000 Then $hBmp = Load_BMP_From_Mem(_Logo4_GIF()) $hBmp_Logo = ConvertBitmap($hBmp) _GDIPlus_BitmapDispose($hBmp) Else $hBmp_Logo = Load_BMP_From_Mem(_Logo4_GIF(), True) EndIf _WinAPI_DeleteObject(GUICtrlSendMsg($idLogo, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp_Logo)) GUISetState() While True Switch GUIGetMsg() Case $idLogo MsgBox(0, "Information", "Label was clicked!") Case $GUI_EVENT_CLOSE _WinAPI_DeleteObject($hBmp_Logo) GUIDelete($hGUI) _GDIPlus_Shutdown() Exit EndSwitch WEnd Func ConvertBitmap($hBitmap) Local $iButtonColor = _WinAPI_GetSysColor($COLOR_BTNFACE) $iButtonColor = 0x10000 * BitAND($iButtonColor, 0xFF) + BitAND($iButtonColor, 0x00FF00) + BitShift($iButtonColor, 16) Local $iWidth = _GDIPlus_ImageGetWidth($hBitmap), $iHeight = _GDIPlus_ImageGetHeight($hBitmap) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0) Local $hBitmap_New = $aResult[6] Local $hCtx_new = _GDIPlus_ImageGetGraphicsContext($hBitmap_New) Local $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $iButtonColor) _GDIPlus_GraphicsFillRect($hCtx_new, 0, 0, $iWidth, $iHeight, $hBrush) _GDIPlus_GraphicsDrawImageRect($hCtx_new, $hBitmap, 0, 0, $iWidth, $iHeight) Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_New) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BitmapDispose($hBitmap_New) _GDIPlus_GraphicsDispose($hCtx_new) Return $hHBitmap EndFunc ;====================================================================================== ; Function Name: Load_BMP_From_Mem ; Description: Loads an image which is saved as a binary string and converts it to a bitmap or hbitmap ; ; Parameters: $bImage: the binary string which contains any valid image which is supported by GDI+ ; Optional: $hHBITMAP: if false a bitmap will be created, if true a hbitmap will be created ; ; Remark: hbitmap format is used generally for GUI internal images, $bitmap is more a GDI+ image format ; ; Requirement(s): GDIPlus.au3, Memory.au3 and _GDIPlus_BitmapCreateDIBFromBitmap() from WinAPIEx.au3 ; Return Value(s): Success: handle to bitmap or hbitmap, Error: 0 ; Error codes: 1: $bImage is not a binary string ; 2: unable to create stream on HGlobal ; 3: unable to create bitmap from stream ; ; Author(s): UEZ ; Additional Code: thanks to progandy for the MemGlobalAlloc and tVARIANT lines ; Version: v0.96 Build 2011-31-12 Beta ;======================================================================================= Func Load_BMP_From_Mem($bImage, $hHBITMAP = False) If Not IsBinary($bImage) Then Return SetError(1, 0, 0) Local $declared = True If Not $ghGDIPDll Then _GDIPlus_Startup() $declared = False EndIf Local $aResult Local Const $memBitmap = Binary($bImage) ;load image saved in variable (memory) and convert it to binary Local Const $len = BinaryLen($memBitmap) ;get length of image Local Const $hData = _MemGlobalAlloc($len, $GMEM_MOVEABLE) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002) Local Const $pData = _MemGlobalLock($hData) ;translate the handle into a pointer Local $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data _MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE $aResult = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $pData, "int", True, "ptr*", 0) ;Creates a stream object that uses an HGLOBAL memory handle to store the stream contents If @error Then SetError(2, 0, 0) Local Const $hStream = $aResult[3] $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0) ;Creates a Bitmap object based on an IStream COM interface If @error Then SetError(3, 0, 0) Local Const $hBitmap = $aResult[2] Local $tVARIANT = DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr") DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "dword", 8 + 8 * @AutoItX64, _ "dword", 4, "dword", 23, "dword", 0, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($tVARIANT)) ;release memory from $hStream to avoid memory leak $tMem = 0 $tVARIANT = 0 If $hHBITMAP Then Local Const $hHBmp = _GDIPlus_BitmapCreateDIBFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) If Not $declared Then _GDIPlus_Shutdown() Return $hHBmp EndIf If Not $declared Then _GDIPlus_Shutdown() Return $hBitmap EndFunc ;==>Load_BMP_From_Mem Func _GDIPlus_BitmapCreateDIBFromBitmap($hBitmap) Local $tBIHDR, $Ret, $tData, $pBits, $hResult = 0 $Ret = DllCall($ghGDIPDll, 'uint', 'GdipGetImageDimension', 'ptr', $hBitmap, 'float*', 0, 'float*', 0) If (@error) Or ($Ret[0]) Then Return 0 $tData = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $Ret[2], $Ret[3], $GDIP_ILMREAD, $GDIP_PXF32ARGB) $pBits = DllStructGetData($tData, 'Scan0') If Not $pBits Then Return 0 $tBIHDR = DllStructCreate('dword;long;long;ushort;ushort;dword;dword;long;long;dword;dword') DllStructSetData($tBIHDR, 1, DllStructGetSize($tBIHDR)) DllStructSetData($tBIHDR, 2, $Ret[2]) DllStructSetData($tBIHDR, 3, $Ret[3]) DllStructSetData($tBIHDR, 4, 1) DllStructSetData($tBIHDR, 5, 32) DllStructSetData($tBIHDR, 6, 0) $hResult = DllCall('gdi32.dll', 'ptr', 'CreateDIBSection', 'hwnd', 0, 'ptr', DllStructGetPtr($tBIHDR), 'uint', 0, 'ptr*', 0, 'ptr', 0, 'dword', 0) If (Not @error) And ($hResult[0]) Then DllCall('gdi32.dll', 'dword', 'SetBitmapBits', 'ptr', $hResult[0], 'dword', $Ret[2] * $Ret[3] * 4, 'ptr', DllStructGetData($tData, 'Scan0')) $hResult = $hResult[0] Else $hResult = 0 EndIf _GDIPlus_BitmapUnlockBits($hBitmap, $tData) Return $hResult EndFunc ;==>_GDIPlus_BitmapCreateDIBFromBitmap Func _Logo4_GIF($bSaveBinary = False) Local $Logo4_GIF $Logo4_GIF &= 'R0lGODlhqQBEAPcAAJKSkkBAQGpqa+Hh4c3Y41aJtmSZxsPN2L+/v+3t7Tpkjdvj7KW+1pqxx1qUzDMzNXmjyMbGxpm94KqqqtDb5ebs8afC3ZSdpn9/f4SEhPHx8bCwsLjAyejo6Pz8/KPD4iEhJbS4x0xYY9XV1fT09FtodHFyckZxmlFcaExMjQAAQjY2fJiYmKChoaSkpJ2dnc7OzouZpVtbW2eVubm5uTZHV4u03Wd2hMjIyAAAe5KsxWBgYaWttUNlho2NjZq721JSUleDq9nZ2XuIlMHBwSpHZFSOx1d5mXmBi+Tk5JmirgAAagAAJAEBNNHR0ZKy0XB7ha2trUFslsfS3IOs1Kmwu7a2tgAAVObm5iMjeZS53nyp02BseIOMlKvJ5tzc3ElJSn2s2QAAc/r6+mVxfU2DuputvoeRm1ZjbqjG40NJVic4SoqszTpSaXSauXKk04mJiSoqLtTe5ydBW0t9rPb29srV4Pj4+AAAEoeHp0t5ohERESM8VOvw9JOisLvFz5iYuRgbJlJ9purq6mad0GGHqMPE0Jm10pO22DRTcRgYf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IgtFGJgDQIAB+zwAs2sjyVAbz1ADkcQBIWACp7t2YVQCEcwU+tVA0MQAROg0ywAB4K91AMELJHx2DuQAQBA2T68DFHABYuQCK7QA7dwBMAN3LdADq8ADYsADUhQgzqNpxggA3HQR68N27FdDUAgCT7AAraNxstwATeARW3/AA2yIAvQ8N1ogAQ88A2d0AKTzQI+EL4gsNRGJ93dIUQPIAC0zQLskN8vMAEemg6/0AVD0AVn8As8sA1W0MMvwA4sAAAZAAwBEAhZHd3ynTKZYA1gAC4AwAL4PdnOIAzLQAQgjgA0wJ8JruAMbgJA8NznU9gT/iayUw2kAAQmgAE+kOEbnt84nt8aDgAzLAAprs7z0tgtLiJRnQnVEAgBIAMmsA4Z4AM1DgBQzuM+kAHrYAKb/NwudAXsPOTAUuRXoAqk8KxAsAPAIABm/smT3GiBAORaLuRcjimLnQlX8OWqoApPCgKkAAKBoArqfD5zrr4S/uaY0tRyPufrMkRzIO4rgC7ojF4Qin3YjF10it3olF7pln7pmJ7pmr7pnB4QADs=' Local $bString = Binary(_Base64Decode($Logo4_GIF)) If $bSaveBinary Then Local $hFile = FileOpen(@ScriptDir & "logo4.gif", 18) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Logo4_GIF Func _Base64Decode($sB64String) Local $struct = DllStructCreate("int") Local $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $sB64String, "int", 0, "int", 1, "ptr", 0, "ptr", DllStructGetPtr($struct, 1), "ptr", 0, "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(1, 0, "") Local $a = DllStructCreate("byte[" & DllStructGetData($struct, 1) & "]") $a_Call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $sB64String, "int", 0, "int", 1, "ptr", DllStructGetPtr($a), "ptr", DllStructGetPtr($struct, 1), "ptr", 0, "ptr", 0) If @error Or Not $a_Call[0] Then Return SetError(2, 0, "") Return DllStructGetData($a, 1) EndFunc ;==>_Base64Decode Br, UEZ
    1 point
  3. it could, here is an idea: you could add another method to enter Chinese characters by number of strokes, or by key. The IME does not do that. Seriously, the idea here is not necessarily give you free software for whatever use you may have, it is just to show in an example (hint, forum name = Example scripts) how AutoIT could do certain tasks.
    1 point
×
×
  • Create New...