#cs ---------------------------------------------------------------------------- after Script from nobbe ( 2008 in http://www.autoitscript.com/forum/index.php?s=&showtopic=64703&view=findpost&p=485031 ) #ce ---------------------------------------------------------------------------- #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #Tidy_Parameters=/sf #include-once #include #include #include #include #include #include #include #Region globals Global Const $GUI_FONTBOLD = 1 Global Enum _ ; stored progress bar image integers $eGDIp_PBarBack, _ $eGDIp_PBarGreen, _ $eGDIp_PBarMarquee, _ $eGDIp_PBarRed, _ $eGDIp_PBarYellow Global Enum _ $eGDI_PBCnt, _ ;_ just a zero but used to locate pbar count and others below $eGDI_CBHandle, _ ;_ callback function handle $eGDI_CBTimer, _ ;_ callback time handle $eGDI_CBCount ;_ number of times callback has been initialised Global Enum _ ; progres bar properties $eGDIPbar_ID, _ ;_ Control ID of the label $eGDIPbar_Width, _ ;_ Width of the progress bar $eGDIPbar_Height, _ ;_ Height of the progress bar $eGDIPbar_Pcent, _ ;_ Progress percentage $eGDIPbar_ShowPcent, _ ;_ display current percentage $eGDIPbar_Text, _ ;_ Text displayed on the progress bar $eGDIPbar_TextAlign, _ ;_ set the text alignment. Left Right, Center $eGDIPbar_FontName, _ ;_ Font name $eGDIPbar_FontSize, _ ;_ Font size $eGDIPbar_FontStyle, _ ;_ Font style $eGDIPbar_FontColour, _ ;_ Font colour $eGDIPbar_GfxO, _ ;_ Graphics object handle $eGDIPbar_BmpO, _ ;_ Main bitmap object $eGDIPbar_GfxCtx, _ ;_ Graphics context of the main bitmap $eGDIPbar_FrontImgO, _ ;_ Front (progress) bitmap object handle $eGDIPbar_FrontImgW, _ ;_ Width of the front bitmap $eGDIPbar_FrontImgH, _ ;_ Height of the front bitmap $eGDIPbar_BackImgO, _ ;_ Background bitmap object handle $eGDIPbar_BackImgW, _ ;_ Width of the background bitmap $eGDIPbar_BackImgH, _ ;_ Height of the background bitmap $eGDIPbar_Max Global $__g_avGDIpPBars[1][$eGDIPbar_Max] = [[0, -1, -1, 0]] ;_ progress bar and callback settings array #EndRegion globals Func _GDIp_CreateProgress($iLeft, $iTop, $iWidth = Default, $iHeight = Default, $bShowPcent = Default, $sProgressImg = Default, $sBackImg = Default, $bBorder = Default) __GDIp_CheckForGDIPlus() ; Displays a message box and terminates the application $iWidth = ($iWidth = Default) ? (150) : ($iWidth) $iHeight = ($iHeight = Default) ? (17) : ($iHeight) $bShowPcent = ($bShowPcent = Default) ? (__GDIp_GetProgressDefault($eGDIPbar_ShowPcent)) : ($bShowPcent) $bBorder = ($bBorder = Default) ? ($WS_BORDER) : (-1) Local $iID = $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_PBCnt] + 1 ;_ increase the control count ReDim $__g_avGDIpPBars[$iID + 1][$eGDIPbar_Max] ;_ resize the array ; create the control $__g_avGDIpPBars[$iID][$eGDIPbar_ID] = GUICtrlCreateLabel("", $iLeft, $iTop, $iWidth, $iHeight, $WS_BORDER) If Not $__g_avGDIpPBars[$iID][$eGDIPbar_ID] Then Return SetError(1, 0, __GDIp_GetLastError(31)) GUICtrlSetBkColor($__g_avGDIpPBars[$iID][$eGDIPbar_ID], $GUI_BKCOLOR_TRANSPARENT) $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_PBCnt] = $iID ; add the control id to the array _GDIPlus_Startup() ; initialise the GDI+ library If @error Then Return SetError(2, 0, __GDIp_GetLastError(@extended)) Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND(GUICtrlGetHandle($__g_avGDIpPBars[$iID][$eGDIPbar_ID])) If @error Then Return SetError(3, 0, __GDIp_GetLastError(@extended)) Local $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphic) If @error Then Return SetError(4, 0, __GDIp_GetLastError(@extended)) ; load the control properties $__g_avGDIpPBars[$iID][$eGDIPbar_Width] = $iWidth ; progress width $__g_avGDIpPBars[$iID][$eGDIPbar_Height] = $iHeight ; progress height $__g_avGDIpPBars[$iID][$eGDIPbar_Pcent] = 0 ; progress percentage $__g_avGDIpPBars[$iID][$eGDIPbar_ShowPcent] = $bShowPcent ; pshow percentage on progress bar $__g_avGDIpPBars[$iID][$eGDIPbar_Text] = __GDIp_GetProgressDefault($eGDIPbar_Text) $__g_avGDIpPBars[$iID][$eGDIPbar_TextAlign] = __GDIp_GetProgressDefault($eGDIPbar_TextAlign) $__g_avGDIpPBars[$iID][$eGDIPbar_FontName] = __GDIp_GetProgressDefault($eGDIPbar_FontName) $__g_avGDIpPBars[$iID][$eGDIPbar_FontSize] = __GDIp_GetProgressDefault($eGDIPbar_FontSize) $__g_avGDIpPBars[$iID][$eGDIPbar_FontStyle] = __GDIp_GetProgressDefault($eGDIPbar_FontStyle) $__g_avGDIpPBars[$iID][$eGDIPbar_FontColour] = __GDIp_GetProgressDefault($eGDIPbar_FontColour) $__g_avGDIpPBars[$iID][$eGDIPbar_GfxO] = $hGraphic ; graphic object $__g_avGDIpPBars[$iID][$eGDIPbar_BmpO] = $hBitmap ; bitmap object $__g_avGDIpPBars[$iID][$eGDIPbar_GfxCtx] = _GDIPlus_ImageGetGraphicsContext($hBitmap) If @error Then Return SetError(5, 0, __GDIp_GetLastError(@extended)) $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgO] = 0 ; front bitmap $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgO] = 0 ; background bitmap $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW] = $iWidth ; foreground image width $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgH] = $iHeight ; foreground image height $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgW] = $iWidth ; background image width $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgH] = $iHeight ; background image height ; create an array to loop and load the images Local $avImages[3] = [ _ 2, _ $sProgressImg, _ $sBackImg] Local $bIsMarquee = ($sProgressImg = $eGDIp_PBarMarquee) ? (True) : (False) Local $vImage = -1 For $i = 1 To $avImages[0] $vImage = $avImages[$i] $avImages[$i] = __GDIp_CheckForDefaultImages($avImages[$i], $i) If @error Then Return SetError(6, 0, __GDIp_GetLastError(30, $avImages[$i])) If $avImages[$i] = '' Then ; check for other options $avImages[$i] = $vImage ; Reload the variable If IsString($avImages[$i]) Then ; check for a hex string ;#ffff6347 $avImages[$i] = StringStripWS($avImages[$i], 3) If StringRegExp($avImages[$i], "^(#|0x)?[0-9A-Fa-f]{6,8}$") Then If StringLeft($avImages[$i], 1) = "#" Then $avImages[$i] = StringReplace($avImages[$i], "#", "0x", 1) $avImages[$i] = __GDIp_CreateProgressColourImage($iID, $avImages[$i]) ; try to create specified colour as an image If @error Then Return SetError(7, 0, __GDIp_GetLastError(30, $avImages[$i])) Else ; check if a file path If Not FileExists($avImages[$i]) Then Return SetError(8, 0, __GDIp_GetLastError(30, $avImages[$i])) EndIf Else ; assume hex colour $avImages[$i] = __GDIp_CreateProgressColourImage($iID, $avImages[$i]) ; try to create specified colour as an image If @error Then Return SetError(9, 0, __GDIp_GetLastError(30, $avImages[$i])) EndIf EndIf Next _GDIp_LoadProgressImages($iID, $avImages[1], $avImages[2]) ; add images if specified __GDIp_RefreshProgress($iID, 0) ; id of label control If $bIsMarquee Then _GDIp_SetMarqueeSpeed($iID, 2) Local $vRet = __GDIp_InitProgressCallback() If @error Then Return SetError(7, 0, $vRet) ;~ _ArrayDisplay($__g_avGDIpPBars) Return SetError(0, 0, $iID) EndFunc ;==>_GDIp_CreateProgress Func _GDIp_DeleteProgress(ByRef $iID) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) Local $iRet = GUICtrlDelete($__g_avGDIpPBars[$iID][$eGDIPbar_ID]) Local $error = @error ; release the GDI+ objects _GDIp_Shutdown($iID) For $i = $eGDIPbar_ID To $eGDIPbar_Max - 1 $__g_avGDIpPBars[$iID][$i] = -1 ; clear the array column Next Return SetError($error, 0, $iRet) EndFunc ;==>_GDIp_DeleteProgress Func _GDIp_InitProgressText(ByRef $iID, $sText = '', $sAlign = Default, $sFontName = Default, $iFontSize = Default, $FontStyle = Default, $iFontColour = Default) ;# If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) _GDIp_SetProgressText($iID, $sText) _GDIp_SetProgress_Align($iID, $sAlign) _GDIp_SetProgressFont($iID, $sFontName) _GDIp_SetProgressFontSize($iID, $iFontSize) _GDIp_SetProgressFontSize($iID, $FontStyle) _GDIp_SetProgressFontColour($iID, $iFontColour) EndFunc ;==>_GDIp_InitProgressText Func _GDIp_LoadProgressImages(ByRef $iID, $sProgressImg = '', $sBackImg = '') If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If GUICtrlGetHandle($__g_avGDIpPBars[$iID][$eGDIPbar_ID]) = 0 Then Return SetError(2, 0, 0) Local $hImage = '' If $sProgressImg <> '' And FileExists($sProgressImg) Then $hImage = _GDIPlus_ImageLoadFromFile($sProgressImg) If Not @error Then _WinAPI_DeleteObject($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgO]) _GDIPlus_ImageDispose($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgO]) $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgO] = $hImage $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW] = _GDIPlus_ImageGetWidth($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgO]) $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgH] = _GDIPlus_ImageGetHeight($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgO]) EndIf EndIf If $sBackImg <> '' And FileExists($sBackImg) Then $hImage = _GDIPlus_ImageLoadFromFile($sBackImg) If Not @error Then _WinAPI_DeleteObject($__g_avGDIpPBars[$iID][$eGDIPbar_BackImgO]) _GDIPlus_ImageDispose($__g_avGDIpPBars[$iID][$eGDIPbar_BackImgO]) $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgO] = $hImage $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgW] = _GDIPlus_ImageGetWidth($__g_avGDIpPBars[$iID][$eGDIPbar_BackImgO]) $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgH] = _GDIPlus_ImageGetHeight($__g_avGDIpPBars[$iID][$eGDIPbar_BackImgO]) EndIf EndIf Return SetError(@error, 0, __GDIp_GetLastError(@extended)) EndFunc ;==>_GDIp_LoadProgressImages Func _GDIp_SetMarqueeSpeed(ByRef $iID, $iSpeed = 2, $bResizeProgressImg = False) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $iSpeed < 0 Then $__g_avGDIpPBars[$iID][8] = _WinAPI_LoWord($__g_avGDIpPBars[$iID][8]) If $bResizeProgressImg = -1 Then $__g_avGDIpPBars[$iID][11] = $__g_avGDIpPBars[$iID][1] Return 1 EndIf If $iSpeed > 10 Then $iSpeed = 10 If $iSpeed < 1 Then $iSpeed = 1 $__g_avGDIpPBars[$iID][$eGDIPbar_Pcent] = _WinAPI_MakeLong(_WinAPI_LoWord($__g_avGDIpPBars[$iID][$eGDIPbar_Pcent]), Number($iSpeed)) If $bResizeProgressImg Then $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW] = Int($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW] / 10) Return 1 EndFunc ;==>_GDIp_SetMarqueeSpeed Func _GDIp_SetProgress_Align(ByRef $iID, $sAlign = Default) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $sAlign = Default Then ; check if the saved setting is correct and set if not If $__g_avGDIpPBars[$iID][$eGDIPbar_TextAlign] <> __GDIp_GetProgressDefault($eGDIPbar_TextAlign) Then $__g_avGDIpPBars[$iID][$eGDIPbar_TextAlign] = __GDIp_GetProgressDefault($eGDIPbar_TextAlign) Else $__g_avGDIpPBars[$iID][$eGDIPbar_TextAlign] = $sAlign EndIf EndFunc ;==>_GDIp_SetProgress_Align Func _GDIp_SetProgressFont(ByRef $iID, $sFontName) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $sFontName = Default Then ; check if the saved setting is correct and set if not If $__g_avGDIpPBars[$iID][$eGDIPbar_FontName] <> __GDIp_GetProgressDefault($eGDIPbar_FontName) Then $__g_avGDIpPBars[$iID][$eGDIPbar_FontName] = __GDIp_GetProgressDefault($eGDIPbar_FontName) Else $__g_avGDIpPBars[$iID][$eGDIPbar_FontName] = $sFontName EndIf EndFunc ;==>_GDIp_SetProgressFont Func _GDIp_SetProgressFontColour(ByRef $iID, $iFontColour) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $iFontColour = Default Then ; check if the saved setting is correct and set if not If $__g_avGDIpPBars[$iID][$eGDIPbar_FontColour] <> __GDIp_GetProgressDefault($eGDIPbar_FontColour) Then $__g_avGDIpPBars[$iID][$eGDIPbar_FontColour] = __GDIp_GetProgressDefault($eGDIPbar_FontColour) Else $__g_avGDIpPBars[$iID][$eGDIPbar_FontColour] = __GDIp_ColorToARGB($iFontColour) EndIf EndFunc ;==>_GDIp_SetProgressFontColour Func _GDIp_SetProgressFontSize(ByRef $iID, $iFontSize) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $iFontSize = Default Then ; check if the saved setting is correct and set if not If $__g_avGDIpPBars[$iID][$eGDIPbar_FontSize] <> __GDIp_GetProgressDefault($eGDIPbar_FontSize) Then $__g_avGDIpPBars[$iID][$eGDIPbar_FontSize] = __GDIp_GetProgressDefault($eGDIPbar_FontSize) Else $iFontSize = Number($iFontSize) If $iFontSize > 0 Then $__g_avGDIpPBars[$iID][$eGDIPbar_FontSize] = $iFontSize EndIf EndFunc ;==>_GDIp_SetProgressFontSize Func _GDIp_SetProgressFontStyle(ByRef $iID, $FontStyle) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $FontStyle = Default Then ; check if the saved setting is correct and set if not If $__g_avGDIpPBars[$iID][$eGDIPbar_FontStyle] <> __GDIp_GetProgressDefault($eGDIPbar_FontStyle) Then $__g_avGDIpPBars[$iID][$eGDIPbar_FontStyle] = __GDIp_GetProgressDefault($eGDIPbar_FontStyle) Else $FontStyle = Number($FontStyle) If $FontStyle > -1 Then $__g_avGDIpPBars[$iID][$eGDIPbar_FontStyle] = Number($FontStyle) EndIf EndFunc ;==>_GDIp_SetProgressFontStyle Func _GDIp_SetProgressText(ByRef $iID, $sText = '') If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) ; add hidden character if string is blank. __GDIp_DrawProgressText doesn't seem to work if there are no characters If StringStripWS($sText, $STR_STRIPALL) = '' Then $sText = __GDIp_GetProgressDefault($eGDIPbar_Text) $__g_avGDIpPBars[$iID][$eGDIPbar_Text] = $sText EndFunc ;==>_GDIp_SetProgressText Func _GDIp_SetProgressValue(ByRef $iID, $iPcent) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $iPcent > 100 Then $iPcent = 100 If $iPcent < 0 Then $iPcent = 0 $__g_avGDIpPBars[$iID][$eGDIPbar_Pcent] = $iPcent Return 1 EndFunc ;==>_GDIp_SetProgressValue Func _GDIp_Shutdown($iID = 0) Local $iStart = ($iID = 0) ? (1) : ($iID) Local $iEnd = ($iID = 0) ? ($__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_PBCnt]) : ($iID) ; release the GDI+ objects For $i = $iStart To $iEnd _GDIPlus_GraphicsDispose($__g_avGDIpPBars[$i][$eGDIPbar_GfxO]) _WinAPI_DeleteObject($__g_avGDIpPBars[$i][$eGDIPbar_BmpO]) _GDIPlus_GraphicsDispose($__g_avGDIpPBars[$i][$eGDIPbar_GfxCtx]) _WinAPI_DeleteObject($__g_avGDIpPBars[$i][$eGDIPbar_FrontImgO]) _GDIPlus_ImageDispose($__g_avGDIpPBars[$i][$eGDIPbar_FrontImgO]) _WinAPI_DeleteObject($__g_avGDIpPBars[$i][$eGDIPbar_BackImgO]) _GDIPlus_ImageDispose($__g_avGDIpPBars[$i][$eGDIPbar_BackImgO]) Next If @error Then ConsoleWrite('_GDIp_Shutdown error: ' & __GDIp_GetLastError(@extended)) If Not $iID Then FileDelete(@TempDir & '\GDIp_Pbar*.png') ;_ remove any pbar images __GDIp_FreeProgressCallback(1) $__g_avGDIpPBars = 0 ; needed? _GDIPlus_Shutdown() EndIf EndFunc ;==>_GDIp_Shutdown #Region internal functions Func __GDIp_CheckForDefaultImages($vImage, $iType) Local $iName = -1 Local $sPath = '' ; set the default image If $vImage = Default And $iType = 1 Then $iName = $eGDIp_PBarGreen If $vImage = Default And $iType = 2 Then $iName = $eGDIp_PBarBack If $iName = -1 Then ; loop against the remaining stored images For $i = $eGDIp_PBarMarquee To $eGDIp_PBarYellow If $i = $vImage Then $iName = $vImage ExitLoop EndIf Next EndIf ; create the image If $iName <> -1 Then $sPath = __GDIp_CreateProgressImage($iName) If @error Then Return SetError(1, 0, $sPath) Return $sPath EndFunc ;==>__GDIp_CheckForDefaultImages Func __GDIp_CheckForGDIPlus($bFatal = True) Local $hDll = DllOpen("GDIPlus.dll") Local $avDll = DllCall("Kernel32.dll", "dword", "GetModuleHandle", "str", "GDIPlus") DllClose($hDll) If $avDll[0] = 0 And $bFatal Then _WinAPI_FatalAppExit("GDIplus not found. Please install GDIplus to use this application") Return ($avDll[0] = 0) EndFunc ;==>__GDIp_CheckForGDIPlus Func __GDIp_ColorToARGB($vColor) Local $iDefault = '0xFFFFFFFF' If IsString($vColor) Then ; Trim "0x" prefix using regex if present $vColor = StringRegExpReplace($vColor, "^(?:0x)?(.*)$", "$1") ; Validate the string is a valid hexadecimal color If Not StringRegExp($vColor, "^(?:[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$") Then ; Invalid format $vColor = $iDefault Else ; Check if it's in RGB format (6 digits) or ARGB format (8 digits) If StringLen($vColor) == 6 Then $vColor = "FF" & $vColor ; Convert to ARGB format (add "FF" for alpha) $vColor = "0x" & $vColor EndIf ElseIf IsInt($vColor) Then ; Convert integer to hexadecimal string $vColor = Hex($vColor, 8) If StringLeft($vColor, 2) = '00' Then ; it's actually a 6-digit RGB value padded to 8 digits $vColor = StringMid($vColor, 3, 6) $vColor = 'FF' & $vColor EndIf $vColor = "0x" & $vColor ; Return in ARGB format Else ; Invalid input type $vColor = $iDefault EndIf Return $vColor EndFunc ;==>__GDIp_ColorToARGB Func __GDIp_CreateProgressColourImage(ByRef $iID, $vColor) $vColor = __GDIp_ColorToARGB($vColor) ; convert to argb for gdi funcs Local $sImgPath = @TempDir & '\GDIp_Pbar' & $vColor & '.png' ; create a file path If FileExists($sImgPath) Then Return ; if it exists, don't re-create Local $iExtended = 0 Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW], $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgH]) If Not @error Then ; Get a graphics context from the bitmap Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap) If Not @error Then ; clear the graphic to the specified colour _GDIPlus_GraphicsClear($hContext, $vColor) If Not @error Then ; Save the bitmap to the specified file path _GDIPlus_ImageSaveToFile($hBitmap, $sImgPath) If @error Then $iExtended = @error Else $iExtended = @error EndIf ; Clean up resources _GDIPlus_GraphicsDispose($hContext) _GDIPlus_BitmapDispose($hBitmap) Else $iExtended = @error EndIf Else $iExtended = @error EndIf If Not $iExtended Then Return $sImgPath Return SetError(1, 0, __GDIp_GetLastError($iExtended)) EndFunc ;==>__GDIp_CreateProgressColourImage Func __GDIp_CreateProgressImage($sName) Local $sPath = @TempDir & '\GDIp_Pbar' & StringUpper($sName) & '.png' If FileExists($sPath) Then Return $sPath Local $sBinary = '' Switch $sName Case $eGDIp_PBarBack $sBinary = __GDIp_ProgressBack() Case $eGDIp_PBarGreen $sBinary = __GDIp_ProgressGreen() Case $eGDIp_PBarMarquee $sBinary = __GDIp_ProgressMarquee() Case $eGDIp_PBarRed $sBinary = __GDIp_ProgressRed() Case $eGDIp_PBarYellow $sBinary = __GDIp_ProgressYellow() Case Else $sBinary = __GDIp_ProgressGreen() EndSwitch Local $hFile = FileOpen($sPath, BitOR($FO_CREATEPATH, $FO_OVERWRITE, $FO_BINARY)) If $hFile <> -1 Then ; write the binary string to the file If FileWrite($hFile, $sBinary) Then ; close the file handle If FileClose($hFile) Then Return $sPath EndIf EndIf Return SetError(1, 0, $sPath) EndFunc ;==>__GDIp_CreateProgressImage Func __GDIp_DrawProgressText(ByRef $iID, $sString) Local $hBrush = _GDIPlus_BrushCreateSolid($__g_avGDIpPBars[$iID][$eGDIPbar_FontColour]) ; needs alpha colour Local $hFormat = _GDIPlus_StringFormatCreate(0x0400) Local $hFamily = _GDIPlus_FontFamilyCreate($__g_avGDIpPBars[$iID][$eGDIPbar_FontName]) Local $hFont = _GDIPlus_FontCreate($hFamily, $__g_avGDIpPBars[$iID][$eGDIPbar_FontSize], $__g_avGDIpPBars[$iID][$eGDIPbar_FontStyle]) Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0) Local $aInfo = _GDIPlus_GraphicsMeasureString($__g_avGDIpPBars[$iID][$eGDIPbar_GfxCtx], $sString, $hFont, $tLayout, $hFormat) If Not IsArray($aInfo) Then Return SetError(1, @error, __GDIp_GetLastError(@extended)) ; set text alignment Local $iXpos = 0 Local $sBarHeight = $__g_avGDIpPBars[$iID][$eGDIPbar_Height] - 1 Local $iBarWidth = $__g_avGDIpPBars[$iID][$eGDIPbar_Width] - 1 ; calculate the text position based on selected alignment Local $sAlignment = $__g_avGDIpPBars[$iID][$eGDIPbar_TextAlign] If $sAlignment <> 'left' Then $iXpos = ($sAlignment = 'right') ? ($iBarWidth - DllStructGetData($aInfo[0], "Width")) : (($iBarWidth - DllStructGetData($aInfo[0], "Width")) / 2) ; change alignment to center if the progress bar text is blank and show progress is selected If $__g_avGDIpPBars[$iID][$eGDIPbar_ShowPcent] = True And StringInStr($sString, __GDIp_GetProgressDefault($eGDIPbar_Text)) Then $iXpos = ($iBarWidth - DllStructGetData($aInfo[0], "Width")) / 2 DllStructSetData($aInfo[0], "X", Int($iXpos)) DllStructSetData($aInfo[0], "Y", Int(($sBarHeight - DllStructGetData($aInfo[0], "Height") + 3) / 2)) _GDIPlus_GraphicsDrawStringEx($__g_avGDIpPBars[$iID][$eGDIPbar_GfxCtx], $sString, $hFont, $aInfo[0], $hFormat, $hBrush) _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) If @error Then Return SetError(2, @error, __GDIp_GetLastError(@extended)) EndFunc ;==>__GDIp_DrawProgressText Func __GDIp_FreeProgressCallback($bForce = False) $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] -= 1 ; decrement to keep track of the number of initializations. ; check if we've over done the decrement If $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] < 0 Then ; reset to 0 $__g_avGDIpPBars = 0 Return EndIf If (Not $bForce) And ($__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] > 0) Then Return ; return without freeing the timer. ; forces the freeing of the timer even if the reference count is > 0 ; free the callback function ; kill the timer If $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBHandle] <> -1 Then DllCallbackFree($__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBHandle]) If $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBTimer] <> -1 Then DllCall("user32.dll", "int", "KillTimer", "hwnd", 0, "uint", $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBTimer]) ; reset the array values $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBHandle] = -1 $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBTimer] = -1 $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] = 0 EndFunc ;==>__GDIp_FreeProgressCallback Func __GDIp_GetLastError($iExtended, $sInfo = '') Local $sErrMsg = 'Unknown error (' & $iExtended & ')' Switch $iExtended Case $GDIP_ERROK $sErrMsg = 'Method call was successful' Case $GDIP_ERRGENERICERROR $sErrMsg = 'Generic method call error' Case $GDIP_ERRINVALIDPARAMETER $sErrMsg = 'One of the arguments passed to the method was not valid' Case $GDIP_ERROUTOFMEMORY $sErrMsg = 'The operating system is out of memory' Case $GDIP_ERROBJECTBUSY $sErrMsg = 'One of the arguments in the call is already in use' Case $GDIP_ERRINSUFFICIENTBUFFER $sErrMsg = 'A buffer is not large enough' Case $GDIP_ERRNOTIMPLEMENTED $sErrMsg = 'The method is not implemented' Case $GDIP_ERRWIN32ERROR $sErrMsg = 'The method generated a Microsoft Win32 error' Case $GDIP_ERRWRONGSTATE $sErrMsg = 'The object is in an invalid state to satisfy the API call' Case $GDIP_ERRABORTED $sErrMsg = 'The method was aborted' Case $GDIP_ERRFILENOTFOUND $sErrMsg = 'The specified image file or metafile cannot be found' Case $GDIP_ERRVALUEOVERFLOW $sErrMsg = 'The method produced a numeric overflow' Case $GDIP_ERRACCESSDENIED $sErrMsg = 'A write operation is not allowed on the specified file' Case $GDIP_ERRUNKNOWNIMAGEFORMAT $sErrMsg = 'The specified image file format is not known' Case $GDIP_ERRFONTFAMILYNOTFOUND $sErrMsg = 'The specified font family cannot be found' Case $GDIP_ERRFONTSTYLENOTFOUND $sErrMsg = 'The specified style is not available for the specified font' Case $GDIP_ERRNOTTRUETYPEFONT $sErrMsg = 'The font retrieved is not a TrueType font' Case $GDIP_ERRUNSUPPORTEDGDIVERSION $sErrMsg = 'The installed GDI+ version is incompatible' Case $GDIP_ERRGDIPLUSNOTINITIALIZED $sErrMsg = 'The GDI+ API is not in an initialized state' Case $GDIP_ERRPROPERTYNOTFOUND $sErrMsg = 'The specified property does not exist in the image' Case $GDIP_ERRPROPERTYNOTSUPPORTED $sErrMsg = 'The specified property is not supported' Case 30 $sErrMsg = $sInfo & '(missing)' Case 31 $sErrMsg = 'Failed to create progress bar' Case Else EndSwitch Return $sErrMsg EndFunc ;==>__GDIp_GetLastError Func __GDIp_GetProgressDefault($iName) Local $vValue Switch $iName Case $eGDIPbar_ShowPcent $vValue = True Case $eGDIPbar_Text ;_ text string $vValue = Chr(160) Case $eGDIPbar_TextAlign ;_ text alignment. Left Right, Center $vValue = 'left' Case $eGDIPbar_FontName ;_ Font name $vValue = 'Arial' Case $eGDIPbar_FontSize ;_ Font size $vValue = 10 Case $eGDIPbar_FontStyle ;_ Font style $vValue = $GUI_FONTNORMAL Case $eGDIPbar_FontColour ;_ Font colour $vValue = 0xFF000000 EndSwitch Return $vValue EndFunc ;==>__GDIp_GetProgressDefault Func __GDIp_InitProgressCallback($ForceReInit = False) Local $iTime = 50, $sParam = "hwnd;int;int;dword" $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] += 1 ; increment to keep track of the number of initializations If $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] > 1 And Not $ForceReInit Then Return True ; skip to avoid multiple initializations If $ForceReInit Then ; re-initialization timer even if it is already initialized. Local $iInit = $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] ; temporarily stores the number of initialisations __GDIp_FreeProgressCallback(True) ; free the existing timer, $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBCount] = $iInit ; restore the number of initialisations EndIf ; register the function to call Local $hCallBack = DllCallbackRegister("__GDIp_PaintProgressBars", "int", $sParam) ; start a timer Local $aTimer = DllCall("user32.dll", "uint", "SetTimer", _ "hwnd", 0, "uint", 0, "int", $iTime, "ptr", DllCallbackGetPtr($hCallBack)) If @error Then SetError(@error, 0, _WinAPI_GetLastErrorMessage()) $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBHandle] = $hCallBack ; stores the callback handle $__g_avGDIpPBars[$eGDI_PBCnt][$eGDI_CBTimer] = $aTimer[0] ; stores the timer handle Return True EndFunc ;==>__GDIp_InitProgressCallback Func __GDIp_PaintProgressBars($hWnd, $nMsg, $wParam, $lParam) #forceref $hWnd, $nMsg, $wParam, $lParam For $i = 1 To UBound($__g_avGDIpPBars) - 1 If Not ($__g_avGDIpPBars[$i][0] = -1) Then __GDIp_RefreshProgress($i) ; Next EndFunc ;==>__GDIp_PaintProgressBars Func __GDIp_RefreshProgress(ByRef $iID, $iPcent = $__g_avGDIpPBars[$iID][$eGDIPbar_Pcent]) If Not __GDIp_ValidateProgressArray($iID) Then Return SetError(1, 0, 0) If $__g_avGDIpPBars[$iID][$eGDIPbar_Width] < 1 Then Return SetError(2, 0, 0) ; set the height for the rectangle Local $sBarHeight = $__g_avGDIpPBars[$iID][$eGDIPbar_Height] - 1 Local $iBarWidth = $__g_avGDIpPBars[$iID][$eGDIPbar_Width] - 1 Local $iPositionInBar = 0 Local $bIsMarquee = False ; the progress is a marquee type so change function If $__g_avGDIpPBars[$iID][$eGDIPbar_Pcent] > 65535 Then $bIsMarquee = True $iPcent = _WinAPI_LoWord($__g_avGDIpPBars[$iID][$eGDIPbar_Pcent]) If $iPcent > 100 Then $iPcent = 0 If $iPcent < 0 Then $iPcent = 0 $__g_avGDIpPBars[$iID][$eGDIPbar_Pcent] = _WinAPI_MakeLong($iPcent + _WinAPI_HiWord($__g_avGDIpPBars[$iID][$eGDIPbar_Pcent]), _WinAPI_HiWord($__g_avGDIpPBars[$iID][$eGDIPbar_Pcent])) $iPositionInBar = ($iBarWidth + ($sBarHeight / $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgH] * $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW])) / 100 * $iPcent ;; or we move out the bar Else If $iPcent < 0 Then $iPcent = 0 If $iPcent > 100 Then $iPcent = 100 $__g_avGDIpPBars[$iID][$eGDIPbar_Pcent] = $iPcent $iPositionInBar = ($iBarWidth) / 100 * $iPcent ;; or we move out the bar EndIf If $iPcent = 0 Then $iPositionInBar = 0 _GDIPlus_GraphicsClear($__g_avGDIpPBars[$iID][$eGDIPbar_GfxCtx], 0xFFF0F0F0) ; set it to default gui colour of light grey ; set value that differ between normal and marquee progress bars Local $nSrcX = (Not $bIsMarquee) ? (Int(($__g_avGDIpPBars[$iID][$eGDIPbar_BackImgW] / 100) * $iPcent)) : (0) Local $nSrcWidth = (Not $bIsMarquee) ? (Int(($__g_avGDIpPBars[$iID][$eGDIPbar_BackImgW] / 100) * (100 - $iPcent))) : ($__g_avGDIpPBars[$iID][$eGDIPbar_BackImgW]) Local $nDstX = (Not $bIsMarquee) ? ($iPositionInBar) : (0) Local $nDstWidth = (Not $bIsMarquee) ? ($iBarWidth - $iPositionInBar + 1) : ($iBarWidth) ; draw the back ground image from the right first. Marquee fails if it's the other way around _GDIPlus_GraphicsDrawImageRectRect( _ $__g_avGDIpPBars[$iID][$eGDIPbar_GfxCtx], _ ;_ $hGraphics Handle to a Graphics object $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgO], _ ;_ $hImage Handle to an Image object $nSrcX, _ ;_ $nSrcX The X coordinate of the upper left corner of the source image 0, _ ;_ $nSrcY The Y coordinate of the upper left corner of the source image $nSrcWidth, _ ;_ $nSrcWidth Width of the source image $__g_avGDIpPBars[$iID][$eGDIPbar_BackImgH], _ ;_ $nSrcHeight Height of the source image $nDstX, _ ;_ $nDstX The X coordinate of the upper left corner of the destination image 0, _ ;_ $nDstY The Y coordinate of the upper left corner of the destination image $nDstWidth, _ ;_ $nDstWidth Width of the destination image $sBarHeight) ; _ $nDstHeight Height of the destination image ; update the differences for the progress image $nSrcX = '' $nSrcWidth = (Not $bIsMarquee) ? (Int(($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW] / 100) * $iPcent)) : ($__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW]) $nDstX = (Not $bIsMarquee) ? (0) : ($iPositionInBar - ($sBarHeight / $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgH] * $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW])) $nDstWidth = (Not $bIsMarquee) ? ($iPositionInBar) : ($sBarHeight / $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgH] * $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgW]) ; draw the progress bar image from the left If $iPositionInBar > 0 Then _GDIPlus_GraphicsDrawImageRectRect( _ $__g_avGDIpPBars[$iID][$eGDIPbar_GfxCtx], _ ;_ $hGraphics Handle to a Graphics object $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgO], _ ;_ $hImage Handle to an Image object 0, _ ;_ $nSrcX The X coordinate of the upper left corner of the source image 0, _ ;_ $nSrcY The Y coordinate of the upper left corner of the source image $nSrcWidth, _ ;_ $nSrcWidth Width of the source image $__g_avGDIpPBars[$iID][$eGDIPbar_FrontImgH], _ ;_ $nSrcHeight Height of the source image $nDstX, _ ;_ $nDstX The X coordinate of the upper left corner of the destination image 0, _ ;_ $nDstY The Y coordinate of the upper left corner of the destination image $nDstWidth, _ ;_ $nDstWidth Width of the destination image $sBarHeight) ;_ $nDstHeight Height of the destination image ; determine progress bar text string Local $sPbarText = $__g_avGDIpPBars[$iID][$eGDIPbar_Text] If $__g_avGDIpPBars[$iID][$eGDIPbar_ShowPcent] = True Then $sPbarText &= ($bIsMarquee) ? (' ' & StringReplace(" ", " ", ".", Mod(@SEC, 5) + 1)) : (' ' & $iPcent & '%') ; set the progress bar text __GDIp_DrawProgressText($iID, $sPbarText) _GDIPlus_GraphicsDrawImage($__g_avGDIpPBars[$iID][$eGDIPbar_GfxO], $__g_avGDIpPBars[$iID][$eGDIPbar_BmpO], 0, 0) EndFunc ;==>__GDIp_RefreshProgress Func __GDIp_ValidateProgressArray(ByRef $iID) If Not IsArray($__g_avGDIpPBars) Or UBound($__g_avGDIpPBars, 2) <> $eGDIPbar_Max Or UBound($__g_avGDIpPBars) < ($iID - 1) Then Return False Return True EndFunc ;==>__GDIp_ValidateProgressArray #EndRegion internal functions #Region progress image binary strings Func __GDIp_ProgressBack() Local $sBinary = '0xFFD8FFE000104A46494600010101004800480000FFE100164578696600004D4D002A00000008000000000000FFFE00134372656174656420776974682047494D50FFDB004300050304040403050404' $sBinary &= '0405050506070C08070707070F0B0B090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F13172224221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E1E' $sBinary &= '1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1EFFC00011080019012C03012200021101031101FFC4001A00010101010003000000000000' $sBinary &= '0000000000060705030408FFC4003110000101080200030606030000000000000005010203041355929315530611121421323336B20722233173743471C2FFC400140101000000000000000000000000' $sBinary &= '00000000FFC40014110100000000000000000000000000000000FFDA000C03010002110311003F00FA2D2E751A227CABD3523251A61F82E3D12245718F3CF3CD758D6B5AD69EE5640B5276A748B91F93' $sBinary &= '2FFC10BEC61D167EC051D640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B527' $sBinary &= '6A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D0051' $sBinary &= '5640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A745640B5276A749D00515640B5276A' $sBinary &= '745640B5276A749D00515640B5276A745640B5276A749D00503F3080EB3DE949BA9D24BC5EB5EC8A309C4A89EC901F82C79B0E03DE977D5EA798D6F933FD30F3CD7C24B789FF00C996FE0FFB7C0A4489' $sBinary &= '48F1E4A562B90A235D7A043F7B1D6B59F030EB313A67C99FA3131699478C7EAB54FEDC4FB9A7240DBB8E99E9898B471D33D313169888036EE3A67A6262D1C74CF4C4C5A62200DBB8E99E9898B471D33D' $sBinary &= '313169888036EE3A67A6262D1C74CF4C4C5A62200DBB8E99E9898B471D33D313169888036EE3A67A6262D1C74CF4C4C5A62200DBB8E99E9898B471D33D313169888036EE3A67A6262D1C74CF4C4C5A62' $sBinary &= '200DBB8E99E9898B471D33D313169888036EE3A67A6262D1C74CF4C4C5A62200DBB8E99E9898B471D33D313169888036EE3A67A6262D1C74CF4C4C5A62200DBB8E99E9898B471D33D313169888036EE3' $sBinary &= 'A67A6262D1C74CF4C4C5A62200DBB8E99E9898B471D33D313169888036EE3A67A6262D1C74CF4C4C5A62200DBB8E99E9898B471D33D31316988803679A4F9AF4FC9898B48AF18D480A10213613FEA760' $sBinary &= '33CD9E96F9B3F3BC469AFF00E0F7D2913FB6FF00DAE81FFFD9' Return $sBinary EndFunc ;==>__GDIp_ProgressBack Func __GDIp_ProgressGreen() Local $sBinary = '0xFFD8FFE000104A46494600010101004800480000FFE100164578696600004D4D002A00000008000000000000FFFE00134372656174656420776974682047494D50FFDB004300050304040403050404' $sBinary &= '0405050506070C08070707070F0B0B090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F13172224221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E1E' $sBinary &= '1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1EFFC00011080019012C03012200021101031101FFC4001C00000105010101000000000000' $sBinary &= '00000000040001020607050308FFC4003F10000102040205080607090000000000000001030204050652A1111531429212162132415391931314435181A2072233367274B2253554556165717382FFC4' $sBinary &= '001B01000301010101010000000000000000000102030004050607FFC40030110001020305060504030000000000000001000203A1E1040506165211154142519114314353611213E2F0213281FFDA00' $sBinary &= '0C03010002110311003F00DAA4AE5B7E06A0F5F7E9914C2C28AE2BCEC1CA55D1D3A74F4E90D82E3B523EABB47F838D980DC8BFB51EFC446462D87C7BEF07B091B38AFCBAD188A3C17B9A07913C7E57D0' $sBinary &= 'A95EB61763B49F31B2495CB73B1DA5F98D98535105B5190379BFA2E5CD368D216DA95AB7FB1EA77990124ACD0BB1E90F3203196E3096E306F171E0986258C7942D7D2B1455D8F48F9900E954A3AFB592' $sBinary &= 'E380CA1A8BFA863316C08B738F05765FF19DCA1699AC290BBD26BFF508FEB9475FE0FC6133E6942605185B1DD17436F98A782BC7AC521776497846F4D475DC92F90A7C04D368DE2DEAA2F68BD15B55CA' $sBinary &= '376B525E100DCBA2F7523E101555D8454DE31E8EF68CAD6AE50FB5990F0806F4B414F654FF00080A8B878C66F1AF4A6F98C15CD662809B5BA77C84566ADE4DB0537E428AE823ABEF01B7C40A2EBF638E' $sBinary &= '135A22CEDB889D30D33C5B23AC2DAF752FC5B333757A01E3885DE31070507624B40E135A9EB2B67FB5F13636B3B613F95713664D1C4784710379C4E8A27145A0709AD835ADAFEFA4F13636B7B593B691' $sBinary &= 'C6D98DC511E51440DEB13A4D4CE2BB48E51DCADA75CDAB8A91C6D8DAEAD44DEA3F1B66251290894DBDA274487175A4728EE56E1AEED3C547E3685AF2D3C546E368C31548AA9B7BC5E88670B5691DCADD' $sBinary &= '75EDA58A8DC6D0B5F5A58A8BC6D184AA91536F88BD10CE36AD23B95BC6BFB4715178DA16BFB4715178DA306518DBE62F443395AF48EE56F5AFED1C545E3685CE0B47DF45E368C1446DF317A2D9CAD7A4' $sBinary &= '772B7AE705A3A3AD44E36884571DA10ED8A87E63460EA0B31B1466DF114F04ECC616A27FA8EE56F6EDD367226847287A7FDAD1C7A8DC89E9A1D513B0B72CB0EC9671391A74AE9EAF469D8612E7DA17AB' $sBinary &= '5BF74C1F894F4EEEB6BE3DA003D0AFA5B82FA8D6EB6063C6C1B0AE3D669D35355172269B8BEB2E9D9B0329F6D4E2C09144BA3E05BAAFF7A6ABF9B73F52874BF510775C41C492FF003F8AAAC5C1AC88F7' $sBinary &= '3DD17CC93E555556ADB9A4DFC825BB76653DA645AA0096899B85A39E5551382208F52555546EDF98C791EEDD066137F22E52FB03D9D84CDCCC1CD2AA5C9F05BEA4AAA8CDD0A6137F20B6A8AFA6FE45DA' $sBinary &= '1144017534737EF74EDC2F09BCF2AAAA35477937F2088292EA6F64771DD8A02FED52ADBA5A79BF7BAE9661B87AE555E10D29DD1D6C8F44A5BB8B2057815CED2C2E769E695574B70DC3D72AAEAEAB7316' $sBinary &= '432D29DC591C6888A8FB95BAA554F96A1EB95575E2A53ABBD91E51D25DC591CC5181B91BAA554870C433CF2AA31CA3BD8B205768AF2EFE4454E6D4760A6E369E69554DD84E11E795516ED0DFD1D7C81E' $sBinary &= '3A0CC63C8AC4CFDB44790BB859AE5550383611F52555668A81318F23C63B7A6177F22BE2065F66B9554CE09827D495576E2B76671E4422B72671E471C40CBCCD72AA4381A09F56555D45B6E671E4456D' $sBinary &= 'A99C791CD1032F335CAA94E0483EECAABA3CD999C790CB6CCCE3C8E788D9759AE554321C0F765547F366671E437366671E4022065D66B9550C8503DD97E48E5B6267BCC86E6C4CF7990108D9759AE555' $sBinary &= 'B2140F765F92379B133DE642E6C4CF7990108D9759AE555B2140F765F92316D899C79024D5B13690AF262D3F018411879A39E5544603823D59557066E8B38D3BF59B8B47F82CF4385D96A740DC4D44AA' $sBinary &= 'AAABB1418D7FE87BEEA39F9B8FF4C275D8EE9F0D17EE7D7B7FCAAF56E9C322EEB47DE113EAFE08D9B3679FCED2BFFFD9' Return $sBinary EndFunc ;==>__GDIp_ProgressGreen Func __GDIp_ProgressMarquee() Local $sBinary = '0xFFD8FFE000104A46494600010101004800480000FFE100164578696600004D4D002A00000008000000000000FFFE00134372656174656420776974682047494D50FFDB004300050304040403050404' $sBinary &= '0405050506070C08070707070F0B0B090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F13172224221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E1E' $sBinary &= '1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1EFFC00011080019007D03012200021101031101FFC4001B00000105010100000000000000' $sBinary &= '000000000600010304050208FFC40037100000040304030F040300000000000000000102040305D1061155932183911215222531324142525492A1A2A3D2131682E1145153FFC4001701010101010000' $sBinary &= '0000000000000000000004050203FFC40026110001030107050101000000000000000002000103050406314291A1E111124143D19252FFDA000C03010002110311003F00F4D1EF360AC72121B8970763' $sBinary &= '929A0C053D8C5CB17D24233996E79D1AEFC7F4304FD17290987CA233292E12C725341C9A64B85B2C94D00CAA710525C271E83A08D53E629BF74EEED5AA808728B795366B600E24DAA2934C970D645A94' $sBinary &= 'D036E24B87B2C94D008AED2CA53CE7B76A95411AED5C88B9CFFD95FC410ED40D99B552E5AAC438C8DAB7D463F4E4BDC5964A6817D39277265929A00A3B616748F4CC7D989F10DF78D9CC47D889F11C1E' $sBinary &= 'D91FF6DAA1956E16F68FE9BEA36DC493B8B2C94D039224BDC1964A68024AD859D3E498FB313E23B4DAD909F24C3D95FC4686D91BE76D56C2B50BFB47F4DF51A1224B87323D4A681C9325C3191EA53401' $sBinary &= 'C9B4F2751F05F5FAA5D04A8B412F51701DDFAB550242D02F99B55421A946581B6A8B48A4B84B2C94D03F1360EC7253402E99CB75735CDFF81D04899992B9B1FD1FA0C0919FCAA90DA04B0744A5BCD833' $sBinary &= '1C9487E26C158E4240EA5F453E48BE92A0EFF96E3FD3C882193C5FAB2B11648E4FA15E114E3489C1DFA15B00E043241DCB949131AD48F207065D3B06738B3B1CEFD27B070102496163F2A64D4609712D' $sBinary &= 'B9545C59A8E7D6F219F1ECC463EB0DE0808E8A259B6E54996E8C32627B7285E25968DDB2117DAB1BB640B42077BBC0F9F6E508AE240FECDB942A8B2B1BB642CC1B2F18BAE08421A1A000E7DB95D02E44' $sBinary &= '01ECDB959ADECCC72EB790D16F672395DA4F607082E3A48866DB95461BB314581EDCAD06F67DC17F7B05F812170576856C180106476660F2AB434E18B0745B0648E0BA15E113EF2B9ECABC202C20966E' $sBinary &= '89E23DADD17FFFD9' Return $sBinary EndFunc ;==>__GDIp_ProgressMarquee Func __GDIp_ProgressRed() Local $sBinary = '0xFFD8FFE000104A46494600010101004800480000FFE100164578696600004D4D002A00000008000000000000FFFE00134372656174656420776974682047494D50FFDB004300050304040403050404' $sBinary &= '0405050506070C08070707070F0B0B090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F13172224221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E1E' $sBinary &= '1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1EFFC00011080019012C03012200021101031101FFC4001B00010101000301010000000000' $sBinary &= '000000000007080204050103FFC4003510000101070400030603090000000000000003010506145194D1020416540711211232364474B21331C22233344142617172C1FFC4001B010100020301010000' $sBinary &= '00000000000000000001040203060507FFC40031110001020209030301090000000000000000010304150216175354A1A3E1E20506110712B144212231324151618182FFDA000C03010002110311003F' $sBinary &= '00A0231FC39B6DC2A9BCB7EEBD7B8D2A358A7E3EE5366AF367E7E7E6DFCCEEE9F1160A6FCDB86E52C995A3BF8B5EBF56AFDED3C84BF91CDD28E75154FB5B5DAD04E51A2AA9FA27C1B119E20C14DF9C70' $sBinary &= 'DCA593EF3F82FB8E1B94B2642D07335CC9D2DA765402A1AEB9FC17DC70DCA591CFE0BEE386E52C99140993A4D4A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239' $sBinary &= 'FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA59322813' $sBinary &= '27454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8' $sBinary &= 'E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DC' $sBinary &= 'A5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035D73F82FB8E1B94B239FC17DC70DCA5932281327454A8035DE98FE0B6E9D4D9B70FA33CFF00884ABFE4FCF578850533' $sBinary &= 'E71C372964C969FEED5FF4FD4C3ACA129D45D35AF6640D1F26B65FC46833D9F2D3BB70F9FF006DCA59383B62E9B475AAE978E99666B6B18CDB2CC6E8637D1ADF77D3CFD4C87ABDF2DDE0A7C22AFD66BF' $sBinary &= 'B341760A2A9B8F251A4735DCBD0A160FA6D375B4FB5153E49946FB6575454F3D4DD1A99ED6E946F93595D4D3C94F6AA51A6958C7E2B7A7D5A9F734F2452E90AAABF7F2DCC59F50DB6E8D14585F2A8889' $sBinary &= 'F9FF006FF041F4EDD4A34E72EA50BA835C956F32DCB89EA6B69F49A9C0854BA9412EA50BA81255BCCB726D39BC26A702152EA504BA942EA04956F32DC5A73784D4E042A5D4A0975285D4092ADE65B8B4' $sBinary &= 'E6F09A9C0854BA9412EA50BA81255BCCB7169CDE1353810A9752825D4A175024AB7996E2D39BC26A702152EA504BA942EA04956F32DC5A73784D4E042A5D4A0975285D4092ADE65B8B4E6F09A9C0854B' $sBinary &= 'A9412EA50BA81255BCCB7169CDE1353810A9752825D4A175024AB7996E2D39BC26A702152EA504BA942EA04956F32DC5A73784D4E042A5D4A0975285D4092ADE65B8B4E6F09A9C0854BA9412EA50BA81' $sBinary &= '255BCCB7169CDE1353810A9752825D4A175024AB7996E2D39BC26A702152EA504BA942EA04956F32DC5A73784D4E042A5D4A0975285D4092ADE65B8B4E6F09A9C086A5B753F0D6F4FE8FD4C3ACA6D94A' $sBinary &= '34BD8253A32DE65B982FA96DAFD26A7033EB76AAFB5EEB4B3783DA55DBC29AF4EA4B5FED6EB5EA637D96FAB3D9D2CFF87B857FC1EF8514FABD7F6E92D4374F561C4A6B4BCFF5B9E0F5CEF1A1D520E943' $sBinary &= '5163D9E5517CFBBCFE1FC7B53E4FFFD9' Return $sBinary EndFunc ;==>__GDIp_ProgressRed Func __GDIp_ProgressYellow() Local $sBinary = '0xFFD8FFE000104A46494600010101004800480000FFE100164578696600004D4D002A00000008000000000000FFFE00134372656174656420776974682047494D50FFDB004300050304040403050404' $sBinary &= '0405050506070C08070707070F0B0B090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F13172224221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E1E' $sBinary &= '1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1EFFC00011080019012C03012200021101031101FFC4001C00010100020301010000000000' $sBinary &= '00000000070001060304050208FFC40032100001020504010106040700000000000000019102030405061215525311211331327174B20722368114333441446272FFC4001B0101000202030000000000' $sBinary &= '0000000000000001020405030607FFC400301100010105070303020700000000000000000102030414A116175254A3E1E20506110712B1214431324142516182FFDA000C03010002110311003F00FD21' $sBinary &= '6CADC6F6CA499718AD3FC4C7225C73229EB2F5AC4B0A2AAAF9F53B70D5E1F17C3B12FC965041907F8FF4D2BEC84E1A1FEDF33C5DEF7446BB69A445FD57E4DAA43B0A34A4DC4D7DD2ECABFB4A33AF15EA' $sBinary &= 'B2B4A0BA41CC62AF79C721695604BD78AF5595A516BC57AACAD2834222DA47095604BD78AF5595A516BC57AACAD2834216D2384AB025EBC57AACAD28B5E2BD5656941A10B691C255812F5E2BD5656945' $sBinary &= 'AF15EAB2B4A0D085B48E12AC097AF15EAB2B4A2D78AF5595A506842DA47095604BD78AF5595A516BC57AACAD2834216D2384AB025EBC57AACAD28B5E2BD5656941A10B691C255812F5E2BD5656945AF1' $sBinary &= '5EAB2B4A0D085B48E12AC097AF15EAB2B4A2D78AF5595A506842DA47095604BD78AF5595A516BC57AACAD2834216D2384AB025EBC57AACAD28B5E2BD5656941A10B691C255812F5E2BD5656945AF15EA' $sBinary &= 'B2B4A0D085B48E12AC097AF15EAB2B4A2D78AF5595A506842DA47095604BD78AF5595A516BC57AACAD2834216D2384AB025EBC57AACAD28C7B4C57AACCD28352526DA477812AC095ED315EAB2B4A3E62' $sBinary &= '9F88C3EF86C69F3F641B45EE3CFACF84963BC639A12AC0AB156E1BE7C6AB0F9FFA946A59ADE21A2B9C99767A9824D3452123F14B12240B16A89157F2FA79F440FE67F509FB9E9DDFF9743F4C9F7C6764' $sBinary &= 'EDAEB91319D49876F17E8A8BF063BF72CB2ED550EEDCAD355574D493E54112C31D2CAF544FF487C98A2B1D6A78F32E2635DCC7F55DD3EAE67DCA79259F7A7CF1E34D2A4578F2AABF93F9FF006123513F' $sBinary &= '6D76136459EAD13E0898E6D9EAF82B0584622FA68F17EEF4F9969F4C35D854D9EAF82B18D9EAF82B058445D9BCCDE9F313E986BB0A7B3D5F0562D9EAF82B05842ECDE66F4F989F4C35D853D9EAF82B16' $sBinary &= 'CF57C1582C21766F337A7CC4FA61AEC29ECF57C158B67ABE0AC1610BB3799BD3E627D30D7614F67ABE0AC5B3D5F0560B085D9BCCDE9F313E986BB0A7B3D5F0562D9EAF82B05842ECDE66F4F989F4C35D' $sBinary &= '853D9EAF82B16CF57C1582C21766F337A7CC4FA61AEC29ECF57C158B67ABE0AC1610BB3799BD3E627D30D7614F67ABE0AC5B3D5F0560B085D9BCCDE9F313E986BB0A7B3D5F0562D9EAF82B05842ECDE6' $sBinary &= '6F4F989F4C35D853D9EAF82B16CF57C1582C21766F337A7CC4FA61AEC29ECF57C158B67ABE0AC1610BB3799BD3E627D30D7614F67ABE0AC5B3D5F0560B085D9BCCDE9F313E986BB0A7B3D5F0562D9EAF' $sBinary &= '82B05842ECDE66F4F989F4C35D854D9EAF82B12D9EAF82B05644DDA3CF1E26F4F989F4C35D8528ACF57E3E0563A35565AC54F497130764599F4D5E33F77A7CC4FA61AEC6DF1D86B967A2FB2898C6512E' $sBinary &= '6D1CEA2911CB89624A5455F4F77E78CD445FFC1EFD2933EAE3FB6137DD13B3DBE9718CC4B4FF00DFE1153C7B7C7E3FDFB97E0E17B148F19F6F83FFD9' Return $sBinary EndFunc ;==>__GDIp_ProgressYellow #EndRegion progress image binary strings