Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/06/2020 in all areas

  1. BBs19

    MetroGUI UDF

    Version 5.1

    8,853 downloads

    Features: Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 2 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left.
    1 point
  2. It's been a while since you revised and released Autoit3Wrapper. Time for a feedback. The result is very positive! I tested it with several windows at the same time, some loaded with the same script, some loaded with different scripts. Some scripts loaded in SciTE and some loaded in PSPad. All at the same time! The result is excellent! The shortcut Ctrl+Break works with the corresponding correct window! Then with the next one, etc. Thanks for your excellent work. Bernd.
    1 point
  3. Says you! 😝 I am still a hack, I could not do this easily. Finding time is hard as I get older -> I have two grandchildren and another on the way. (Not that it's relevant to the topic - I'm just so happy about it I tell everyone). 🤩
    1 point
  4. Also embed string with single quotes like this : Local Const $Date = "2020/03/06", $Time = "09:59:00", $StdStr = "INSERT INTO MeterReadings(Id,Meter,Date,Time,Reading,Error) VALUES(" $sSQL = $StdStr & "1,1,'" & $Date & "','" & $Time & "'," & 194.0 & ",'" & "Y" & "');"
    1 point
  5. I think it is not too hard to translate the code from the article I mentioned above from VB to AutoIt. But I will not add a function based on deprecated methods/properties to the OutlookEX UDF. I'm sure people expect reliable code from an UDF. Hence everything else should be kept separate. That's what I have learned from the OOF code
    1 point
  6. Please try the current Beta of AutoItAutoComplete.lua to see if that fixes it for you. Jos
    1 point
  7. It doesn't require the entire word: just this in a comment will trigger it: "inclu". Also it happens for me whether the ";inclu" is above or below where I'm typing. Do you mean this is too small a bug to bother anyone with it?
    1 point
  8. $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 100, BitOR($ES_MULTILINE, $WS_VSCROLL), $WS_EX_LEFTSCROLLBAR) Works for me correctly. French setting / KB.
    1 point
  9. Don't have a customized Scite and can replicate the issue, however as mentioned in the OP you need to type "incl" + space, not "#incl" + space
    1 point
  10. @Professor_Bernd, I've played a little with the logic in Autoit3Wrapper for HotKeySet() and now only enable the HotKeys when the Editor that was used to start Autoit3 has the focus in the latest Beta version. This allows multiple instances of Autoit3Wrapper in case one wants to test 2 scripts at the same time. Jos
    1 point
  11. add the /S parameter to the commandline. Jos
    1 point
  12. UEZ

    AutoIt Snippets

    Here a snipped how to colorize each character of a label text: GUICtrlCreateLabelColorized: #include <GDIPlus.au3> #include <GUIConstantsEx.au3> _GDIPlus_Startup() Global $hGUI = GUICreate("Test", 570, 100), $i GUISetBkColor(0xFFFFFF) Global $sText1 = "These chars were colorized separately" Global $aColors1[StringLen($sText1)] For $i = 0 To UBound($aColors1) - 1 $aColors1[$i] = Random(0x000000, 0x400000, 1) Next Global $aLabel1 = GUICtrlCreateLabelColorized($sText1, $aColors1, 10, 10, 18, "Comic Sans MS") Global $sText2 = "using " & Chr(203) & "label controls" & Chr(202) & " with " & Chr(201) & "bold" & Chr(200) & " words. ;-)" Global $aColors2[StringLen($sText2)] Global $aLabel2 = GUICtrlCreateLabelColorized($sText2, $aColors2, 18, 50, 26, "Times New Roman") GUISetState() Do ;~ For $i = 0 To UBound($aColors2) - 1 ;~ GUICtrlSetColor($aLabel2[$i][0], Random(0x000000, 0xD00000, 1)) ;~ Next ;~ Sleep(40) Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_Shutdown() Exit ; #FUNCTION# ==================================================================================================================== ; Name ..............: GUICtrlCreateLabelColorized ; Description ......: Creates a label with possibility to set different color to each character ; Syntax ............: GUICtrlCreateLabelColorized($sText, $aColors, $iX, $iY, $fFontSize, $sFont[, $iWeight = 400[, $iAttribute = 0[, ; $iFQuality = 0[, $fCorrection = 0.95]]]]) ; Parameters .....: $sText - A string value. Chr(200) = disable bold char, Chr(201) = enable bold char, ; Chr(202) = disable italic char, Chr(203) = enable italic char, ; $aColors - An array of color values in format RGB. ; $iX - An integer value - x position of the label. ; $iY - An integer value - y position of the label. ; $fFontSize - A floating point value - size of the font. ; $sFont - A string value - font name. ; $iWeight - [optional] An integer value. Default is 400. ; $iAttribute - [optional] An integer value. Default is 0. ; $iFQuality - [optional] An integer value. Default is 4 (checkout GUICtrlSetFont for more details about quality settings) ; $fCorrection - [optional] A floating point value. Default is 0.925. ; Return values .: An array with following values: ; [$i][0] = control id of the label ; [$i][1] = color value of the character in RGB format ; [$i][2] = x position of the character ; [$i][3] = y position of the character ; [$i][4] = width of the character ; [$i][5] = height of the character ; Version ..........: 0.95 build 2017-09-11 beta ; Author ...........: UEZ ; Modified ........: ; Remarks .......: AutoIt version 3.3.10.2 or higher is required, __MeasureString is an internal function to measure each character. ; Don't forget to start GDI+ before you call the function! ; Related .........: GUICtrlCreateLabel, _GDIPlus_StringFormatSetMeasurableCharacterRanges ; Link ..............: ; Example .......: Yes ; =============================================================================================================================== Func GUICtrlCreateLabelColorized($sText, $aColors, $iX, $iY, $fFontSize = 9.5, $sFont = "Arial", $iWeight = 400, $iAttribute = 0, $iFQuality = 4, $fCorrection = 0.925) If Not StringLen($sText) Then Return SetError(1, 0, 0) Local $aChars = StringSplit($sText, "", 2), $i, $aLabels[UBound($aChars)][6], $aCoord, $sChar, _ $bBold = 0, $bItalic = 0, $iBold = 700, $iItalic = 2, $iWeightPrev = $iWeight, $iItalicPrev = $iAttribute For $i = 0 To UBound($aChars) - 1 $sChar = $aChars[$i] If $sChar = " " Then $sChar = "." ;if char is space fill it up with . to calculate space between words Switch $sChar Case Chr(200) $bBold = 0 ContinueLoop Case Chr(201) $bBold = 1 ContinueLoop Case Chr(202) $bItalic = 0 ContinueLoop Case Chr(203) $bItalic = 1 ContinueLoop EndSwitch $aCoord = __MeasureString($sChar, $sFont, $fFontSize, $iAttribute + ($iWeight > 699) * 1) $aLabels[$i][1] = $aColors[$i] ;color $aLabels[$i][2] = ($iX - $aCoord[0]) * $fCorrection ;x pos $aLabels[$i][3] = $iY ;y pos $aLabels[$i][4] = $aCoord[2] ;width $aLabels[$i][5] = $aCoord[3] ;height $aLabels[$i][0] = GUICtrlCreateLabel($aChars[$i], $aLabels[$i][2], $aLabels[$i][3], $aLabels[$i][4], $aLabels[$i][5]) ;create label (char) control GUICtrlSetColor($aLabels[$i][0], $aLabels[$i][1]) ;set char color If $bBold Then $iWeight = $iBold Else $iWeight = $iWeightPrev EndIf If $bItalic Then $iAttribute = $iItalic Else $iAttribute = $iItalicPrev EndIf GUICtrlSetFont($aLabels[$i][0], $fFontSize, $iWeight, $iAttribute, $sFont, $iFQuality) ;set font for char $iX += $aCoord[1] ;calculate next x position Next Return $aLabels EndFunc ;==>GUICtrlCreateLabelColorized ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ............: __MeasureString ; Description ....: Measures a string ; Syntax ..........: __MeasureString($sString, $sFont, $fFontSize[, $iAttribute = 0]) ; Parameters ...: $sString - A string value. ; $sFont - A string value. ; $fFontSize - A floating point value. ; $iAttribute - [optional] An integer value. Default is 0. ; Return values.: An array with x, y, width and height values of the string ; Version ..........: 2020-03-08 beta ; Author ...........: UEZ ; Modified ........: ; Remarks .......: AutoIt version 3.3.10.2 or higher is required ; Related .........: GDIPlus ; Link ..............: ; Example .......: Yes ; =============================================================================================================================== Func __MeasureString($sString, $sFont, $fFontSize, $iAttribute = 0) Local Const $hDC = _WinAPI_GetDC(0), $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC), $tLayout = _GDIPlus_RectFCreate() Local Const $hFormat = _GDIPlus_StringFormatCreate(), $hFamily = _GDIPlus_FontFamilyCreate($sFont), $hFont = _GDIPlus_FontCreate($hFamily, $fFontSize, $iAttribute) Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphics, $sString, $hFont, $tLayout, $hFormat) Local $aRanges[2][2] = [[1]] $aRanges[1][1] = StringLen($sString) _GDIPlus_StringFormatSetMeasurableCharacterRanges($hFormat, $aRanges) Local Const $aRegion = _GDIPlus_GraphicsMeasureCharacterRanges($hGraphics, $sString, $hFont, $aInfo[0], $hFormat) Local Const $aBounds = _GDIPlus_RegionGetBounds($aRegion[1], $hGraphics) _GDIPlus_RegionDispose($aRegion[1]) _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_GraphicsDispose($hGraphics) _WinAPI_ReleaseDC(0, $hDC) Local $aDim[4] $aDim[0] = $aBounds[0] ;X coordinate of the upper-left corner of the rectangle $aDim[1] = $aBounds[2] ;Width of the rectangle for next char $aDim[2] = $aInfo[0].Width ;Width of the rectangle $aDim[3] = $aInfo[0].Height ;Height of the rectangle Return $aDim EndFunc ;==>__MeasureString Requires AutoIt version 3.3.10.2 or higher! Br, UEZ
    1 point
×
×
  • Create New...