Leaderboard
Popular Content
Showing content with the highest reputation on 02/04/2014 in all areas
-
the creation of the AutoIt-Logo ;)
wakillon and 6 others reacted to eukalyptus for a topic
requires AutoIt 3.3.10.0+ #include <GDIPlus.au3> Opt("MustDeclareVars", 1) _GDIPlus_Startup() Global $hBitmap = _CreateAutoItLogo(1920, 1200);Set resolution _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Logo.bmp") _GDIPlus_Shutdown() ShellExecute(@ScriptDir & "\Logo.bmp") Func _Draw_Inner($hContext, $hPath) Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath) Local $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1] + $aBounds[3] * 0.4) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.5, 0.5) Local $aPBlend[4][2] = [[3]] $aPBlend[1][0] = 0xFF181F39 $aPBlend[1][1] = 0 $aPBlend[2][0] = 0xFF394D82 $aPBlend[2][1] = 0.3 $aPBlend[3][0] = 0xFF607CD0 $aPBlend[3][1] = 1 _GDIPlus_PathBrushSetPresetBlend($hBrush, $aPBlend) _GDIPlus_PathBrushSetGammaCorrection($hBrush, True) _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush) _GDIPlus_BrushDispose($hBrush) Local $hPath_Clone = _GDIPlus_PathClone($hPath) Local $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] * 0.5), -$aBounds[1]) _GDIPlus_MatrixScale($hMatrix, 0.85, 0.6, True) _GDIPlus_MatrixTranslate($hMatrix, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1], True) _GDIPlus_PathTransform($hPath_Clone, $hMatrix) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.45, $aBounds[1] + $aBounds[3] * 0.1) _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFFFFFFFF) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0) _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1, 0.9) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath_Clone) $hPath_Clone = _GDIPlus_PathClone($hPath) _GDIPlus_MatrixSetElements($hMatrix) _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] * 0.5), -($aBounds[1] + $aBounds[3])) _GDIPlus_MatrixScale($hMatrix, 0.95, 0.8, True) _GDIPlus_MatrixTranslate($hMatrix, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1] + $aBounds[3], True) _GDIPlus_PathTransform($hPath_Clone, $hMatrix) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.65, $aBounds[1] + $aBounds[3] * 0.70) _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFFDDEEFF) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0) _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1, 0.7) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.3, 0.2) _GDIPlus_PathBrushSetGammaCorrection($hBrush, True) _GDIPlus_GraphicsSetCompositingQuality($hContext, 3) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_GraphicsSetCompositingQuality($hContext, 1) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath_Clone) _GDIPlus_MatrixDispose($hMatrix) EndFunc ;==>_Draw_Inner Func _Draw_A($hContext, $hPath, $hBrush_Alu) Local $hPath_Clone = _GDIPlus_PathClone($hPath) Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath_Clone) Local $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] * 0.5), -($aBounds[1] + $aBounds[3] * 0.4)) _GDIPlus_MatrixScale($hMatrix, 1.01, 1.02, True) _GDIPlus_MatrixTranslate($hMatrix, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1] + $aBounds[3] * 0.43, True) _GDIPlus_PathTransform($hPath_Clone, $hMatrix) Local $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFF000000) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.91, 0.91) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath_Clone) $hPath_Clone = _GDIPlus_PathClone($hPath) Local $hPen = _GDIPlus_PenCreate(0xDD000000, 2) _GDIPlus_PenSetLineJoin($hPen, 1) _GDIPlus_GraphicsDrawPath($hContext, $hPath, $hPen) _GDIPlus_PenDispose($hPen) Local $hBmp = _GDIPlus_BitmapCreateFromScan0($aBounds[2], $aBounds[3]) Local $hGfx = _GDIPlus_ImageGetGraphicsContext($hBmp) _GDIPlus_GraphicsFillRect($hGfx, 0, 0, $aBounds[2], $aBounds[3], $hBrush_Alu) _GDIPlus_GraphicsSetClipPath($hContext, $hPath) Local $hImgAttrib = _GDIPlus_ImageAttributesCreate() Local $tColorMatrix = _GDIPlus_ColorMatrixCreateScale(0.8, 0.9, 1.1) _GDIPlus_ImageAttributesSetColorMatrix($hImgAttrib, 1, 1, DllStructGetPtr($tColorMatrix)) _GDIPlus_GraphicsDrawImageRectRect($hContext, $hBmp, 0, 0, $aBounds[2], $aBounds[3], $aBounds[0], $aBounds[1], $aBounds[2], $aBounds[3], $hImgAttrib) _GDIPlus_ImageAttributesDispose($hImgAttrib) _GDIPlus_GraphicsResetClip($hContext) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBmp) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1] + $aBounds[3] * 1.2) _GDIPlus_PathBrushSetCenterColor($hBrush, 0) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xFFFFFFFF) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.96, 0.96) _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1, 1) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_BrushDispose($hBrush) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1] + $aBounds[3] * 0.1) _GDIPlus_PathBrushSetCenterColor($hBrush, 0) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xFF000000) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.96, 0.96) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_BrushDispose($hBrush) Local $aData = _GDIPlus_PathGetData($hPath) Local $aPnt[6][2] = [[5]] $aPnt[1][0] = $aData[1][0] $aPnt[1][1] = $aData[1][1] $aPnt[2][0] = $aData[2][0] $aPnt[2][1] = $aData[2][1] $aPnt[3][0] = $aData[3][0] $aPnt[3][1] = $aData[3][1] $aPnt[4][0] = $aData[3][0] + ($aData[11][0] - $aData[3][0]) * 0.2 $aPnt[4][1] = $aData[12][1] $aPnt[5][0] = $aData[12][0] $aPnt[5][1] = $aData[12][1] _GDIPlus_PathReset($hPath_Clone) _GDIPlus_PathAddPolygon($hPath_Clone, $aPnt) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aData[12][0] + ($aData[11][0] - $aData[12][0]) * 1.2, $aData[12][1]) _GDIPlus_PathBrushSetCenterColor($hBrush, 0) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xFFFFFFFF) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.985, 0.91) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath_Clone) $aData[0][0] = 5 $aData[5][2] = 129 $hPath_Clone = _GDIPlus_PathCreate2($aData) _GDIPlus_MatrixSetElements($hMatrix) _GDIPlus_MatrixTranslate($hMatrix, -$aData[4][0], -$aData[2][1]) _GDIPlus_MatrixScale($hMatrix, 1.12, 1.12, True) _GDIPlus_MatrixTranslate($hMatrix, $aData[4][0], $aData[2][1], True) _GDIPlus_PathTransform($hPath_Clone, $hMatrix) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aData[4][0], $aData[2][1]) Local $aPBlend[4][2] = [[3]] $aPBlend[1][0] = 0x00000000 $aPBlend[1][1] = 0 $aPBlend[2][0] = 0xAF000000 $aPBlend[2][1] = 0.1 $aPBlend[3][0] = 0 $aPBlend[3][1] = 1 _GDIPlus_PathBrushSetPresetBlend($hBrush, $aPBlend) _GDIPlus_GraphicsSetClipPath($hContext, $hPath_Clone) _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush) _GDIPlus_GraphicsResetClip($hContext) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath_Clone) _GDIPlus_MatrixDispose($hMatrix) EndFunc ;==>_Draw_A Func _Draw_Outer($hContext, $hPath_O, $hPath_I, $hBrush_Alu) Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath_I) Local $hPath = _GDIPlus_PathClone($hPath_O) Local $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, $aBounds[2] * 0.05, $aBounds[3] * 0.05) _GDIPlus_PathTransform($hPath, $hMatrix) Local $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.1, $aBounds[1] + $aBounds[2] * 0.1) _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFF000000) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.84, 0.92) _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath) $hPath = _GDIPlus_PathClone($hPath_O) _GDIPlus_MatrixSetElements($hMatrix) _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] * 0.7), -($aBounds[1] + $aBounds[3] * 0.9)) _GDIPlus_MatrixScale($hMatrix, 1.07, 1.06, True) _GDIPlus_MatrixTranslate($hMatrix, $aBounds[0] + $aBounds[2] * 0.69, $aBounds[1] + $aBounds[3] * 0.895, True) _GDIPlus_PathTransform($hPath, $hMatrix) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFFFFFFFF) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0) _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1, 1) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.4, 0.3) _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath) $hPath = _GDIPlus_PathClone($hPath_O) _GDIPlus_PathAddPath($hPath, $hPath_I) _GDIPlus_GraphicsSetClipPath($hContext, $hPath) _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush_Alu) _GDIPlus_GraphicsResetClip($hContext) _GDIPlus_PathDispose($hPath) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_O) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.8, $aBounds[1] + $aBounds[3] * 0.8) _GDIPlus_PathBrushSetCenterColor($hBrush, 0) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.98, 0.98) _GDIPlus_GraphicsFillPath($hContext, $hPath_O, $hBrush) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.2, $aBounds[1] + $aBounds[3] * 0.8) _GDIPlus_GraphicsFillPath($hContext, $hPath_O, $hBrush) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.4, $aBounds[1]) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xFF000000) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.98, 0.98) _GDIPlus_GraphicsFillPath($hContext, $hPath_O, $hBrush) _GDIPlus_BrushDispose($hBrush) Local $hPath_Clone = _GDIPlus_PathClone($hPath_I) _GDIPlus_MatrixSetElements($hMatrix) _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] * 0.5), -($aBounds[1] + $aBounds[3] * 0.5)) _GDIPlus_MatrixScale($hMatrix, 1.02, 1.02, True) _GDIPlus_MatrixTranslate($hMatrix, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1] + $aBounds[3] * 0.51, True) _GDIPlus_PathTransform($hPath_Clone, $hMatrix) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFFFFFFFF) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.98, 0.98) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath_Clone) $hPath_Clone = _GDIPlus_PathClone($hPath_I) _GDIPlus_MatrixSetElements($hMatrix) _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] * 0.5), -($aBounds[1] + $aBounds[3] * 0.5)) _GDIPlus_MatrixScale($hMatrix, 1.02, 1.02, True) _GDIPlus_MatrixTranslate($hMatrix, $aBounds[0] + $aBounds[2] * 0.5, $aBounds[1] + $aBounds[3] * 0.49, True) _GDIPlus_PathTransform($hPath_Clone, $hMatrix) $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath_Clone) _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFF000000) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.96, 0.96) _GDIPlus_GraphicsFillPath($hContext, $hPath_Clone, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath_Clone) Local $hPen = _GDIPlus_PenCreate(0xFF000000, 2) _GDIPlus_GraphicsDrawPath($hContext, $hPath_I, $hPen) _GDIPlus_GraphicsDrawPath($hContext, $hPath_O, $hPen) _GDIPlus_PenDispose($hPen) _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_GraphicsResetClip($hContext) EndFunc ;==>_Draw_Outer Func _Draw_Light($hContext, $hPath_O, $hPath_I, $hPath_A) Local $hPath = _GDIPlus_PathClone($hPath_O) _GDIPlus_PathAddPath($hPath, $hPath_I) _GDIPlus_PathAddPath($hPath, $hPath_A) Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath) Local $hBrush = _GDIPlus_LineBrushCreate($aBounds[0] + $aBounds[2], $aBounds[1], $aBounds[0] + $aBounds[2] * 0.8, $aBounds[1] + $aBounds[3], 0, 0xDDFFFFFF, 3) _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1) Local $aBlend[8][2] = [[7]] $aBlend[1][0] = 0.4 $aBlend[1][1] = 0 $aBlend[2][0] = 0.8 $aBlend[2][1] = 0.1 $aBlend[3][0] = 0.3 $aBlend[3][1] = 0.3 $aBlend[4][0] = 0.7 $aBlend[4][1] = 0.4 $aBlend[5][0] = 0.3 $aBlend[5][1] = 0.7 $aBlend[6][0] = 0 $aBlend[6][1] = 0.8 $aBlend[7][0] = 0.2 $aBlend[7][1] = 1 _GDIPlus_LineBrushSetBlend($hBrush, $aBlend) _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath) EndFunc ;==>_Draw_Light Func _Draw_3($hContext, $hPath, $hBrush_Alu) Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath) Local $hBmp = _GDIPlus_BitmapCreateFromScan0($aBounds[2] + 1, $aBounds[3] + 1) Local $hGfx = _GDIPlus_ImageGetGraphicsContext($hBmp) _GDIPlus_GraphicsFillRect($hGfx, 0, 0, $aBounds[2] + 1, $aBounds[3] + 1, $hBrush_Alu) Local $tColorMatrix = _GDIPlus_ColorMatrixCreateScale(1.3, 1.4, 2) Local $hImgAttrib = _GDIPlus_ImageAttributesCreate() _GDIPlus_ImageAttributesSetColorMatrix($hImgAttrib, 1, 1, DllStructGetPtr($tColorMatrix)) _GDIPlus_GraphicsSetClipPath($hContext, $hPath) _GDIPlus_GraphicsDrawImageRectRect($hContext, $hBmp, 0, 0, $aBounds[2], $aBounds[3], $aBounds[0], $aBounds[1], $aBounds[2], $aBounds[3], $hImgAttrib) _GDIPlus_GraphicsResetClip($hContext) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_ImageAttributesDispose($hImgAttrib) Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath) Local $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterPoint($hBrush, $aBounds[0] + $aBounds[2] * 0.22, $aBounds[1] + $aBounds[3] * 0.5) _GDIPlus_PathBrushSetCenterColor($hBrush, 0x5FFFFFFF) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xFF6080FF) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.8, 0.4) _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1) Local $aPBlend[5][2] = [[4]] $aPBlend[1][0] = 0xFF8090FF $aPBlend[1][1] = 0 $aPBlend[2][0] = 0x208090FF $aPBlend[2][1] = 0.2 $aPBlend[3][0] = 0x00000000 $aPBlend[3][1] = 0.25 $aPBlend[4][0] = 0xFFFFFFFF $aPBlend[4][1] = 1 _GDIPlus_PathBrushSetPresetBlend($hBrush, $aPBlend) _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush) _GDIPlus_BrushDispose($hBrush) EndFunc ;==>_Draw_3 Func _Draw_BG($hContext, $iWidth, $iHeight, $iColor1, $iColor2) _GDIPlus_GraphicsClear($hContext, $iColor1) Local $hPath = _GDIPlus_PathCreate() _GDIPlus_PathAddEllipse($hPath, 0, 0, $iWidth, $iHeight) Local $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterColor($hBrush, $iColor2) _GDIPlus_PathBrushSetSurroundColor($hBrush, $iColor1) _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1) _GDIPlus_GraphicsFillRect($hContext, 0, 0, $iWidth, $iHeight, $hBrush) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath) EndFunc ;==>_Draw_BG Func _CreateAutoItLogo($iWidth, $iHeight) Global $aLogo[79][3] = [[78, 0, 0],[192.180, 15.750, 0],[226.790, 15.730, 3],[259.230, 24.910, 3],[287.250, 40.920, 3],[294.600, 17.470, 3],[316.500, 0.470, 3],[342.350, 0.470, 3],[374.280, 0.470, 3],[400.130, 26.320, 3], _ [400.130, 58.250, 3],[400.130, 84.250, 3],[382.940, 106.240, 3],[359.350, 113.490, 3],[374.980, 141.270, 3],[383.930, 173.290, 3],[383.930, 207.430, 3],[383.930, 313.340, 3],[298.080, 399.190, 3],[192.180, 399.190, 3], _ [86.320, 399.190, 3],[0.470, 313.340, 3],[0.470, 207.430, 3],[0.470, 101.570, 3],[86.320, 15.730, 3],[192.180, 15.750, 131],[192.180, 359.650, 0],[275.760, 359.210, 3],[343.950, 291.020, 3],[343.950, 207.430, 3], _ [343.950, 123.850, 3],[275.760, 55.710, 3],[192.180, 55.710, 3],[108.590, 55.710, 3],[40.450, 123.850, 3],[40.450, 207.430, 3],[40.450, 291.020, 3],[108.590, 359.210, 3],[192.180, 359.650, 131],[142.450, 263.800, 0], _ [170.520, 225.280, 1],[234.980, 225.280, 1],[192.790, 164.960, 1],[122.250, 263.470, 1],[67.250, 263.470, 1],[163.590, 129.220, 1],[179.650, 107.080, 3],[207.390, 106.380, 3],[223.300, 129.220, 3],[317.200, 263.470, 1], _ [142.450, 263.800, 1],[355.481, 44.846, 0],[362.130, 44.845, 3],[361.952, 52.088, 3],[355.481, 52.088, 3],[325.026, 52.089, 1],[333.159, 63.310, 1],[355.719, 63.310, 1],[361.715, 63.427, 3],[361.595, 70.254, 3], _ [355.719, 70.254, 3],[313.153, 70.256, 1],[323.245, 83.970, 1],[355.006, 83.970, 1],[366.167, 83.908, 3],[371.688, 80.524, 3],[374.122, 74.588, 3],[376.674, 68.354, 3],[374.359, 61.052, 3],[368.066, 58.381, 3], _ [378.040, 54.937, 3],[376.437, 43.954, 3],[375.072, 40.511, 3],[372.223, 33.447, 3],[364.208, 31.250, 3],[355.362, 31.250, 3],[310.660, 31.252, 1],[320.692, 44.846, 1],[355.481, 44.846, 129]] Local $hPath_Logo = _GDIPlus_PathCreate2($aLogo) Local $hIter = _GDIPlus_PathIterCreate($hPath_Logo) Local $iIterCnt = _GDIPlus_PathIterGetSubpathCount($hIter) Local $aPath_Logo[$iIterCnt + 1] = [$iIterCnt] For $i = 1 To $iIterCnt $aPath_Logo[$i] = _GDIPlus_PathCreate() _GDIPlus_PathIterNextSubpathPath($hIter, $aPath_Logo[$i]) Next _GDIPlus_PathIterDispose($hIter) Local $aBounds = _GDIPlus_PathGetWorldBounds($aPath_Logo[2]) Local $fScale = ($iHeight * 0.5) / $aBounds[3] Local $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] * 0.5), -($aBounds[1] + $aBounds[3] * 0.5)) _GDIPlus_MatrixScale($hMatrix, $fScale, $fScale, True) _GDIPlus_MatrixTranslate($hMatrix, $iWidth * 0.5, $iHeight * 0.5, True) For $i = 1 To $aPath_Logo[0] _GDIPlus_PathTransform($aPath_Logo[$i], $hMatrix) Next _GDIPlus_MatrixDispose($hMatrix) Local $hBrush_Alu = _CreateAluTexture(400, 400) Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight) Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetSmoothingMode($hContext, 2) _Draw_BG($hContext, $iWidth, $iHeight, 0xFF1E375A, 0xFF325A88) _Draw_Outer($hContext, $aPath_Logo[1], $aPath_Logo[2], $hBrush_Alu) _Draw_Inner($hContext, $aPath_Logo[2]) _Draw_A($hContext, $aPath_Logo[3], $hBrush_Alu) _Draw_3($hContext, $aPath_Logo[4], $hBrush_Alu) _Draw_Light($hContext, $aPath_Logo[1], $aPath_Logo[2], $aPath_Logo[3]) _GDIPlus_BrushDispose($hBrush_Alu) _GDIPlus_PathDispose($hPath_Logo) For $i = 1 To $aPath_Logo[0] _GDIPlus_PathDispose($aPath_Logo[$i]) Next _GDIPlus_GraphicsDispose($hContext) Return $hBitmap EndFunc ;==>_CreateAutoItLogo Func _CreateAluTexture($iW, $iH, $iBlurDist = 14, $fBlurTrans = 0.6) $iBlurDist = Ceiling($iBlurDist) $iBlurDist += 1 - Mod($iBlurDist, 2) Local $iOverSize = 0 For $i = 1 To $iBlurDist Step 2 $iOverSize += $i + $i + 1 Next Local $iWO = $iW + $iOverSize Local $iNoiseSize = 40 Local $hBmp_Noise = _GDIPlus_BitmapCreateFromScan0($iNoiseSize, $iNoiseSize) Local $hGfx_Noise = _GDIPlus_ImageGetGraphicsContext($hBmp_Noise) Local $tData = _GDIPlus_BitmapLockBits($hBmp_Noise, 0, 0, $iNoiseSize, $iNoiseSize, BitOR($GDIP_ILMREAD, $GDIP_ILMWRITE), $GDIP_PXF32ARGB) Local $iStride = DllStructGetData($tData, "Stride") Local $iWidth = DllStructGetData($tData, "Width") Local $iHeight = DllStructGetData($tData, "Height") Local $pScan0 = DllStructGetData($tData, "Scan0") Local $tPixel = DllStructCreate("dword[" & $iWidth * $iHeight & "];", $pScan0) Local $iAmp For $row = 0 To $iHeight - 1 For $col = 0 To $iWidth - 1 $iAmp = Random(0x4F, 0xFF, 1) DllStructSetData($tPixel, 1, BitOR(0xFF000000, BitShift($iAmp, -16), BitShift($iAmp, -8), $iAmp), $row * $iWidth + $col + 1) Next Next _GDIPlus_BitmapUnlockBits($hBmp_Noise, $tData) Local $hBmp_Full = _GDIPlus_BitmapCreateFromScan0($iWO, $iH) Local $hGfx_Full = _GDIPlus_ImageGetGraphicsContext($hBmp_Full) _GDIPlus_GraphicsSetSmoothingMode($hGfx_Full, 2) _GDIPlus_GraphicsSetInterpolationMode($hGfx_Full, 7) Local $iXOff, $iYOff, $iSizeX, $iSizeY For $y = 0 To $iH Step $iNoiseSize / 2 For $x = 0 To $iWO Step $iNoiseSize / 2 $iXOff = Random(0, $iNoiseSize / 2, 1) $iYOff = Random(0, $iNoiseSize / 2, 1) $iSizeX = $iNoiseSize - $iXOff $iSizeY = $iNoiseSize - $iYOff _GDIPlus_GraphicsDrawImageRectRect($hGfx_Full, $hBmp_Noise, $iXOff, $iYOff, $iSizeX, $iSizeY, $x, $y, $iSizeX, $iSizeY) Next Next _GDIPlus_GraphicsDispose($hGfx_Noise) _GDIPlus_BitmapDispose($hBmp_Noise) Local $hBmp_Full2 = _GDIPlus_BitmapCreateFromScan0($iWO, $iH) Local $hGfx_Full2 = _GDIPlus_ImageGetGraphicsContext($hBmp_Full2) _GDIPlus_GraphicsSetSmoothingMode($hGfx_Full2, 2) _GDIPlus_GraphicsSetInterpolationMode($hGfx_Full2, 7) Local $tColorMatrix = _GDIPlus_ColorMatrixCreateScale(1, 1, 1, $fBlurTrans) Local $hImgAttrib = _GDIPlus_ImageAttributesCreate() _GDIPlus_ImageAttributesSetColorMatrix($hImgAttrib, 1, 1, DllStructGetPtr($tColorMatrix), 0, 0) For $i = 1 To $iBlurDist Step 2 _GDIPlus_GraphicsDrawImageRectRect($hGfx_Full2, $hBmp_Full, 0, 0, $iWO, $iH, $i, 0, $iWO, $iH, $hImgAttrib) _GDIPlus_GraphicsDrawImageRectRect($hGfx_Full, $hBmp_Full2, 0, 0, $iWO, $iH, $i + 1, 0, $iWO, $iH, $hImgAttrib) Next _GDIPlus_ImageAttributesDispose($hImgAttrib) _GDIPlus_GraphicsDispose($hGfx_Full2) _GDIPlus_BitmapDispose($hBmp_Full2) _GDIPlus_GraphicsDispose($hGfx_Full) Local $hTXT_Alu = _GDIPlus_TextureCreate2($hBmp_Full, $iOverSize, 0, $iW, $iH, 3) _GDIPlus_BitmapDispose($hBmp_Full) Return $hTXT_Alu EndFunc ;==>_CreateAluTexture enjoy E7 points -
Sign your exe with a Digital Signature / Signtool.exe
TheSaint reacted to Tankbuster for a topic
If someone gets offended by this, because he knows already 200 posts about it. Do not reply. Yes, some wrote already here some words what to do. Yes, you are right I created nothing new. But I want this summed up for forum searchers, that maybe find this posting useful in spending less time to find an answer in one place. I don't want to re-animate very old postings. So forgive me if I try to help other idiots like myself. ==================== First I need to give credits to: For summing it up in a nearly complete way. ==================== There is a nice Gui existing that wrapps it up: Digital Sign Tool Below you also find some instructions how to add it to the compiler. ==================== I tested this on a Windows 7 (x64) - but all codes used is x86 (32bit) - for 64bit I need to create another package (or make the script smarter). So here is the sequence in general: general purpose: I created several EXE files of the years, and I do not want to use the SIGNUI to click each file. So I want a command line version. Create a folder - I named it x:cert4me Download from : http://www.kastaban.de/cert4me/MAKE_MY_CERT_FILE.zip The zip: Contains: 1999-04-15 17:10:28 PVKIMPRT.EXE 2003-03-24 23:03:00 makecert.exe 2005-09-23 07:56:00 cert2spc.exe 2006-03-03 23:22:44 signtool.exe 2007-04-11 11:11:20 capicom.dll 2007-09-27 14:17:44 pvk2pfx.exe 2013-03-13 15:24:27 MAKE_MY_CERT_FILE.CMD 2013-03-13 15:31:52 SIGN_FILE.CMD Extract the files in : X:Cert4me now open a cmd in the created folder with the extracted files (the script will also work from other folder but so you are closer to the result...) cd /D x:\cert4me Now you either watch this little video with a sample of the signing process (a little bit fast - but you are to pause it if you like, and sorry for the German screen texts) http://www.kastaban.de/cert4me/CERT4ME/CERT4ME.html or First start : MAKE_MY_CERT_FILE.CMD myNewCertificate secret01 MAKE_MY_CERT_FILE.CMD needs two arguments 1=the name of the certificate 2=your password Sign now the EXE with: SIGN_FILE.CMD "d:\1work\mit space\TFTP_HELPER.exe" keys\myNewCertificate_cert.pfx secret01 SIGN_FILE.CMD needs three arguments 1=the file path of your executable 2=the filepath to the pfx folder (created before !) 3=your password Done. in case you want to sign more than one EXE repeat the "Sign now" step with the other EXE. ================= I packed the files from the original post and added additional files to offer a complete package. this was tested on Windows 7 (64bit) but all tools and my EXE are 32bit . Keep this in mind. For 64bit the similar tools of 64bit are maybe needed (not sure). Maybe someone could start to convert this to a AU3.....because some fields are still left open. Like the End DATE, email field, timestamps URL..... And "if" someone got additional stuff to add here (for other idio.....mmmh......searchers), do it. And most important , in case I wrote something wrong or it does not work for you please comment. ======================================================================== //edit: 16.03.2013 - Thx Emiel - as always I face problems with the NOT and Or :-)1 point -
I've recently been uncovering the useful commandline tools that can be found natively in Windows, one of which was findstr (there is also a GUI interface available in SciTE4AutoIt3.) After coming across this little gem and implementing in >SciTE Jump, it felt only right that I should share this on the forums as a standalone UDF. Thanks Function: ; #FUNCTION# ==================================================================================================================== ; Name ..........: _FindInFile ; Description ...: Search for a string within files located in a specific directory. ; Syntax ........: _FindInFile($sSearch, $sFilePath[, $sMask = '*'[, $fRecursive = True[, $fLiteral = Default[, ; $fCaseSensitive = Default[, $fDetail = Default]]]]]) ; Parameters ....: $sSearch - The keyword to search for. ; $sFilePath - The folder location of where to search. ; $sMask - [optional] A list of filetype extensions separated with ';' e.g. '*.au3;*.txt'. Default is all files. ; $fRecursive - [optional] Search within subfolders. Default is True. ; $fLiteral - [optional] Use the string as a literal search string. Default is False. ; $fCaseSensitive - [optional] Use Search is case-sensitive searching. Default is False. ; $fDetail - [optional] Show filenames only. Default is False. ; Return values .: Success - Returns a one-dimensional and is made up as follows: ; $aArray[0] = Number of rows ; $aArray[1] = 1st file ; $aArray[n] = nth file ; Failure - Returns an empty array and sets @error to non-zero ; Author ........: guinness ; Remarks .......: For more details: http://ss64.com/nt/findstr.html ; Example .......: Yes ; =============================================================================================================================== Func _FindInFile($sSearch, $sFilePath, $sMask = '*', $fRecursive = True, $fLiteral = Default, $fCaseSensitive = Default, $fDetail = Default) Local $sCaseSensitive = $fCaseSensitive ? '' : '/i', $sDetail = $fDetail ? '/n' : '/m', $sRecursive = ($fRecursive Or $fRecursive = Default) ? '/s' : '' If $fLiteral Then $sSearch = ' /c:' & $sSearch EndIf If $sMask = Default Then $sMask = '*' EndIf $sFilePath = StringRegExpReplace($sFilePath, '[\\/]+$', '') & '\' Local Const $aMask = StringSplit($sMask, ';') Local $iPID = 0, $sOutput = '' For $i = 1 To $aMask[0] $iPID = Run(@ComSpec & ' /c ' & 'findstr ' & $sCaseSensitive & ' ' & $sDetail & ' ' & $sRecursive & ' "' & $sSearch & '" "' & $sFilePath & $aMask[$i] & '"', @SystemDir, @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($iPID) $sOutput &= StdoutRead($iPID) Next Return StringSplit(StringStripWS(StringStripCR($sOutput), BitOR($STR_STRIPLEADING, $STR_STRIPTRAILING)), @LF) EndFunc ;==>_FindInFileExample use of Function: #include <Array.au3> #include <Constants.au3> Example() Func Example() Local $hTimer = TimerInit() Local $aArray = _FindInFile('findinfile', @ScriptDir, '*.au3;*.txt') ; Search for 'findinfile' within the @ScripDir and only in .au3 & .txt files. ConsoleWrite(Ceiling(TimerDiff($hTimer) / 1000) & ' second(s)' & @CRLF) _ArrayDisplay($aArray) $hTimer = TimerInit() $aArray = _FindInFile('autoit', @ScriptDir, '*.au3') ; Search for 'autoit' within the @ScripDir and only in .au3 files. ConsoleWrite(Ceiling(TimerDiff($hTimer) / 1000) & ' second(s)' & @CRLF) _ArrayDisplay($aArray) EndFunc ;==>Example1 point
-
i need to find a way to retrieve somehow the active network name in Windows 7. is another thing than active connection name , like [Local Area Connection 2] --------------------------------------------------------------------------------------------------------------- what i found in www : the registry key [HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\] can contain one network profile or it could contain a large number of network profiles [see windows 2 in my attached jpeg file] Within the above registry key, each of the networks that the computer has connected to, is recorded by the system, for every new network will be create a new profile network . Each one is identified by a unique {profileGUID} . Also, under the above regkey [in registry] exist the keys [HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\NetworkList\Signatures\Unmanaged\] [HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\NetworkList\Signatures\Managed\] with one subkey {AnotherVeryLongProfileGUIDname} for each {profileGUID} . This registry subkeys contains [also] the MAC address of the gateway [router mostly] that the system is or was connected to , and the above {proffileGUID} . if we have one connection to one router [i dont tested 2 nics conected 2 different routers] ONLY one of this profiles, is [how windows said in windows 1 in my attached jpeg file] the active network . In the same [windows 1 in my attached jpeg file] , we can see the connection , [Local Area Connection] , who is related directly with the NIC . So , 3 NICs in computer make 3 different connections. Computer was connected wired or wireless to 5 different networks [routers] wil make 5 network profiles. If conect in the same network, the computer with 3 different nics, one by one, the profile/active network will be the same , the connections will be different . even the computer has 2 connected nics in same time , will be 2 connections and 1 active network. Same NIC , in two networks , the connection remain the same , the 2 network profiles are different. --------------------------------------------------------------------------------------------------------------- With registry and WMI , I have all knowledges about nics , connections , ip….anything about... I CANT FIGURE OUT HOW TO FIND , any method , the [active profile=active network] NAME or GUID . and relate it with the active connection [Local area connection in my jpeg file] In [windows 3 in my attached jpeg file] , i see that Windows 7 can do that . i do search last three days everywhere. nothing about this . Any tips, suggestions , please ?1 point
-
Need help with Multiple TCP server
Alexxander reacted to JLogan3o13 for a topic
Then programming is not the field for you...1 point -
Idea for a bot - Will it work?
JohnOne reacted to BobbyStranger for a topic
I've heard that a copious amount of mead will cure a victim of AI, but I wouln't believe everything you read in the DSM IV manual.1 point -
_ArrayDelete documentation
SlowCoder74 reacted to Melba23 for a topic
SlowCoder74, Thanks, I will fix it. I thought I had when I changed the library to accept empty arrays. For future reference, please report errors like that via the BugTracker (the link is in the menu at the top of the page). M23 Edit: Just checked and I have in fact removed that bit in the big rewrite of the Array library that will be in the next Beta. But thanks again for pointing it out - we are always happy to get help keeping things up to date.1 point -
Registry boot VS startup folder ?
Alexxander reacted to JLogan3o13 for a topic
Yes, and do you see there were plenty of other topics returned? I'm willing to bet it took you longer to type your OP than it would have to find the answer on Google1 point -
1 point
-
Since I never new Andreik's solution, I made quick basic example. #include <GUIConstantsEx.au3> Example() Func Example() Local $WM_CLIPBOARDUPDATE = 0x031D $mygui = GUICreate("GUI", 100, 100) DllCall("User32.dll", "bool", "AddClipboardFormatListener", "hwnd", $mygui) If @error Then Exit MsgBox(0, "Error", "DllCall") EndIf GUIRegisterMsg($WM_CLIPBOARDUPDATE, "MY_WM_CLIPBOARDUPDATE") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc ;==>Example Func MY_WM_CLIPBOARDUPDATE($hWnd, $Msg, $wParam, $lParam) MsgBox(0, "Success", "Clipboard data changed") EndFunc ;==>MY_WM_CLIPBOARDUPDATE1 point
-
Look in help file WM_CLIPBOARDUPDATE message.1 point
-
Registry boot VS startup folder ?
Alexxander reacted to orbs for a topic
1) registry keys are executed before shortcuts on the startup folders. 2) on the registry, it is less apparent for users to modify or remove the command. leave the startup folder to the users, it's theirs. (also don't spam the Documents folder with creating some "My Stuff" subfolders like some programs do, it's annoying).1 point -
I agree with you, I like the way you use that array of nibble very cool1 point
-
Binary Number to String and Vice versa
czardas reacted to Noviceatthis for a topic
czardas, I think I understand your one, the explanation was most appreciated, thank you again I clearly have a lot of work to do if im gonna catch up with you guys1 point -
SDL Configure Controls, Joystick / Keyboard
Xandy reacted to mesale0077 for a topic
http://www.httsongersoft.com/programming/autoit/Desktop_Tanks.zip link broken newlink please1 point -
hi all i'm new to this could use some help
Danyfirex reacted to JLogan3o13 for a topic
Aside from the good suggestions above, as well as a little common sense (being familiar with the forum rules, for example), it is important to decide exactly what you want to do. Asking people to explain "what each thing does" is silly; you need to identify a problem you would like to overcome, and start there. We are always here to assist, but can only do so when you can explain in detail what you're trying to accomplish.1 point -
BASS Function Library (Sound and Music Functions)
Gianni reacted to FlashpointBlack for a topic
As promised: This suits my needs at the moment, but I plan to add some other things to it as well, but it's at least usable now. The slider at the bottom sets the level the microphone must detect in order to detect it as a "clap". By default, I have the setting set to nearly deafening... I have twin three year old girls who enjoy screaming and running around while I'm trying to cook, so I have it set to where I need to clap very loudly to activate the next step. That's also the reason for requiring 3 sequential claps (to cut down on false positives). While they were napping, 2 worked just fine. I've included a few of our family's favorite recipes just as an example, but they're just glorified text files. If you dive into the AU3 instead of just using the exe, some basic configuration settings are near the top since I haven't gotten around to making a GUI settings window yet. I'm open to suggestions on how to improve it, as well as any constructive criticism anyone has to offer about the code itself. I'm always eager to grow! FlashCook.rar1 point -
Over the past year of use, I've made a few mods (but not much), and core code is unchanged. I discovered that the function got slower over time, and was cursing windows until I realised my font data file had been bloated horrifically with logging of unrecognised characters. I thus added a cleaner function to remove them. I've also slightly altered the default options, with defaults for initial training (when logging is useful) and another set once usage is stable (when it probably isn't) which also stops asking for user input. I thus thought an update was in order. I'll claim much of the kudos offerred by dmob, as civilcalc's code and subsequent discussion was only a stub, but did give me an idea of how to start with screen OCR (which is why my post appeared under hers in the first place - I was hoping for a bit of constructive input, but it never eventuated). Hopefully the 700 downloads so far of my code mean at least someone other than me is using it. Cheers David OCR.au3_PixelGetColor.au31 point
-
I want to join in the fun!! $fz_FilePath = FileOpenDialog('Choose a file', @ScriptDir, 'All Files (*.*)') Local $Extension = Split_Path_Get_Extension($fz_FilePath) MsgBox(0, 'Test', 'Extension was: ' & $Extension) Func Split_Path_Get_Extension($sFilePath) Local $BackSlashLast = StringInStr($sFilePath, '\', 0, -1) Local $ForwardSlashLoc = StringInStr($sFilePath, '/', 0, -1) If $ForwardSlashLoc > $BackSlashLast Then $BackSlashLast = $ForwardSlashLoc $Sections = StringTrimLeft($sFilePath, $BackSlashLast) Return StringTrimLeft($Sections, StringInStr($Sections, '.')) EndFunc Edit: Chit, you just want the file extension, not change it!! Edit2: Ok, not as much fun as the other ... fixed for extension.1 point