Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/22/2019 in all areas

  1. BTW AutoIt arrays are limited to only 16 millions cells, while databases are essentially unbounded in size (I've [remotely] approached an SQLite DB totalling 120Tb) and they offer unrivaled possibilities for searching, sorting, massaging data in any volume and complexity.
    2 points
  2. Nine

    Get path to active folder

    Local $hWnd = WinGetHandle ("[CLASS:CabinetWClass]") Local $sText = ControlGetText ($hWnd, "", 1001) MsgBox ($MB_SYSTEMMODAL,"",$sText) Try this
    1 point
  3. In this case I suggest to use a database. Because sooner or later you will hit one of the AutoIt limits with such a huge array.
    1 point
  4. Gianni

    _HTML.au3 (V1.01)

    Hi @Letraindusoir in the above listing comment out the line nr. 36 ; _IEDocWriteHTML($oIE2, "<HTML></HTML>") and, since web links often disappear, you can try testing with this other link on line 37: https://html.com/tables/rowspan-colspan/ (... till also this will disappears from the web ...) GUICtrlSetData($idInputUrl, "https://html.com/tables/rowspan-colspan/") ; example page you can see extraction differences selecting tables 2 and 3
    1 point
  5. Very nice ... Thanks for sharing. I had to recompile for 32 bit Win 7, which meant I needed to change #include <WinAPISysWin.au3> to #include <WinAPI.au3>.
    1 point
  6. Yashied

    Skin UDF

    LAST VERSION - 0.2 03-Jan-15 Skin UDF allows you to create buttons from the predefined images (files, resources, etc.). I rewrote this library by using GDI+ (first version used GDI). This allowed add the many additional features and get rid of the problems related to the transparency. Nevertheless, the library has a beta status, so there is no detailed description of the functions. But I am sure that the example below gives complete information about the features of this library. I hope that many users will find it useful. If you will have any questions, please ask them in this thread. Available functions Skin Library v1.0 Skin.zip Example #Include <GUIConstantsEx.au3> #Include <Skin.au3> Global $Button[3] $hForm = GUICreate('MyGUI', 278, 106) GUICtrlCreatePic('background.bmp', 0, 0, 278, 106) GUICtrlSetState(-1, $GUI_DISABLE) ; Create buttons from PNG images (images should be located in the same folder as the script) $Button[0] = _Skin_AddButton(20 , 20, 66, 66, 'red_normal.png', 'red_hover.png', 'red_click.png', 'disable.png', 'alpha.png', 1) $Button[1] = _Skin_AddButton(106, 20, 66, 66, 'yellow_normal.png', 'yellow_hover.png', 'yellow_click.png', 'disable.png', 'alpha.png', 1) $Button[2] = _Skin_AddButton(192, 20, 66, 66, 'green_normal.png', 'green_hover.png', 'green_click.png', 'disable.png', 'alpha.png', 1) #cs ; Create buttons from GDI+ HBITMAP handles $Button[0] = _Skin_AddButtonEx(20 , 20, 64, 64, _GDIPlus_BitmapCreateFromFile('red_normal.png'), ..., 1, 1) $Button[1] = _Skin_AddButtonEx(104, 20, 64, 64, _GDIPlus_BitmapCreateFromFile('yellow_normal.png'), ..., 1, 1) $Button[2] = _Skin_AddButtonEx(188, 20, 64, 64, _GDIPlus_BitmapCreateFromFile('green_normal.png'), ..., 1, 1) #ce ; Disable "Yellow" button (Optional) _Skin_DisableButton($Button[1], 1) ; Enable keyboard input (Optional) _Skin_EnableKBInput(1) ; Set margins for dotted focus rectangle (Optional) For $i = 0 To 2 _Skin_SetFocusRect($Button[$i], 5, 5, 56, 56) Next ; Enable dotted focus rectangle (Optional) _Skin_EnableFocus(1) GUISetState() ; _Skin_Helper() must be called continuously in the main loop While 1 _Skin_Helper($hForm) $ID = GUIGetMsg() Switch $ID Case 0 ContinueLoop Case $GUI_EVENT_CLOSE ExitLoop Case $Button[0] ConsoleWrite('Red' & @CR) Case $Button[1] ConsoleWrite('Yellow' & @CR) Case $Button[2] ConsoleWrite('Green' & @CR) Case Else EndSwitch WEnd ; You must delete all created buttons before destroying the appropriate window ;~For $i = 0 To 2 ;~ _Skin_DeleteButton($Button[$i]) ;~Next
    1 point
  7. UEZ

    GDI+ text stroke effects

    Try something like this here: ;coded by UEZ build 2016-12-31 #include <GDIPlus.au3> #include <GUIConstantsEx.au3> _GDIPlus_Startup() Global $hBitmap_StrokeText = _GDIPlus_BitmapeCreateStrokeText("AutoIt", "Arial Black", 300, 0xF0035D8B, 0xFF41ABE1, 0xFFFFFFFF) Global $aDim = _GDIPlus_ImageGetDimension($hBitmap_StrokeText) Global $hGUI = GUICreate("GDI+ Stroke Text Example", $aDim[0], $aDim[1]) GUISetBkColor(0xFAFAFA) GUISetState() Global $hGfx = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImageRect($hGfx, $hBitmap_StrokeText, 0, 0, $aDim[0], $aDim[1]) Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBitmap_StrokeText) _GDIPlus_Shutdown() GUIDelete() Exit EndSwitch Until False Func _GDIPlus_BitmapeCreateStrokeText($sText, $sFont = "Arial Black", $fSize = 300.0, $iC1 = 0xFFFF0000, $iC2 = 0xFF00FF00, $iC3 = 0xFF0000FF, $fBlur = 20.0) Local Const $hPath = _GDIPlus_PathCreate() Local Const $hFamily = _GDIPlus_FontFamilyCreate($sFont) Local Const $hFormat = _GDIPlus_StringFormatCreate() Local $tLayout = _GDIPlus_RectFCreate() _GDIPlus_PathAddString($hPath, $sText, $tLayout, $hFamily, 0, $fSize, $hFormat) Local Const $aBounds = _GDIPlus_PathGetWorldBounds($hPath) Local $iW = $aBounds[2] * 3, $iH = $aBounds[3] * 3 Local Const $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local Const $hCanvas = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetSmoothingMode($hCanvas, 4) _GDIPlus_GraphicsSetTextRenderingHint($hCanvas, 4) _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, 2) ;~ Local Const $hBrush = _GDIPlus_BrushCreateSolid($iC3) Local Const $hBrush = _GDIPlus_LineBrushCreate(0, 0, $aBounds[2] / 9, $aBounds[3] / 2, $iC3, 0xC8D8D8FF, 0) _GDIPlus_LineBrushSetSigmaBlend($hBrush, 0.1, 0.5) _GDIPlus_LineBrushSetGammaCorrection($hBrush, 1) Local Const $hPen = _GDIPlus_PenCreate() _GDIPlus_PenSetLineJoin($hPen, 2) _GDIPlus_PenSetColor($hPen, $iC1) Local Const $fBorder = $fSize / 5.5 _GDIPlus_PenSetWidth($hPen, $fBorder) _GDIPlus_PenSetAlignment($hPen, 0) _GDIPlus_GraphicsDrawPath($hCanvas, $hPath, $hPen) Local Const $hEffect = _GDIPlus_EffectCreateBlur($fBlur) _GDIPlus_BitmapApplyEffect($hBitmap, $hEffect) _GDIPlus_PenSetColor($hPen, $iC2) _GDIPlus_PenSetWidth($hPen, $fSize / 10) _GDIPlus_PenSetAlignment($hPen, 0) _GDIPlus_GraphicsDrawPath($hCanvas, $hPath, $hPen) _GDIPlus_GraphicsFillPath($hCanvas, $hPath, $hBrush) Local Const $aPoints = _GDIPlus_PathGetLastPoint($hPath) Local Const $aBitmap_Cropped = _GDIPlus_BitmapCloneArea($hBitmap, 0, 0, $aPoints[0] + 2 * $aBounds[0] + $fBorder, $aPoints[1] + 2 * $aBounds[1] + $fBorder, $GDIP_PXF32ARGB) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_EffectDispose($hEffect) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hCanvas) _GDIPlus_PathDispose($hPath) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) Return $aBitmap_Cropped EndFunc ;==>_GDIPlus_BitmapeCreateStrokeText If you change the font then _GDIPlus_BitmapCloneArea (line 57) needs to be adjusted appropriately.
    1 point
  8. UEZ

    Outline Text.

    I found an old snippet in my GDI+ folder: #include <GDIPlus.au3> _GDIPlus_Startup() $iBGColor = 0xFFFFFF $iW = 880 $iH = 150 $hgui = GUICreate("Outlined Text Effect", $iW, $iH) GUISetBkColor($iBGColor, $hgui) GUISetState() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphic) $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2) _GDIPlus_GraphicsSetTextRenderingHint($hBackbuffer, 4) _GDIPlus_GraphicsClear($hBackbuffer, 0xFF000000 + $iBGColor) $hFamily = _GDIPlus_FontFamilyCreate("Verdana") $hFormat = _GDIPlus_StringFormatCreate() $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0) $hPath = _GDIPlus_PathCreate() _GDIPlus_PathAddString($hPath, "Outlined Text", $tLayout, $hFamily, 0, 90 * 1.333333, $hFormat) $hPen = _GDIPlus_PenCreate(0xF0000000, 8) _GDIPlus_GraphicsDrawPath($hBackbuffer, $hPath, $hPen) $hBrush = _GDIPlus_BrushCreateSolid(0xFFFF0000) _GDIPlus_GraphicsFillPath($hBackbuffer, $hPath, $hBrush) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH) _GDIPlus_PathDispose($hPath) _GDIPlus_PenDispose($hPen) _GDIPlus_BrushDispose($hBrush) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_GraphicsDispose($hBackbuffer) _GDIPlus_BitmapDispose ($hBitmap) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() Do Until GUIGetMsg() = -3 GUIDelete() Exit Br, UEZ
    1 point
  9. Chaym, Yes, but this would be a system wide setting change which may not be a good idea. Take a look at my ExtMsgBox UDF (link is in my sig) - it lets you set font, colour and a whole lot more. M23
    1 point
×
×
  • Create New...