Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/13/2025 in Posts

  1. ... ~3 years later, added an [unofficial] update for ArrayDisplayInternals.au3 for both v3.3.16.1 and v3.3.17.1 beta. Added: $ARRAYDISPLAY_SUBTITLECOLOUR = 1024 ; Contrasts the subtitle with a light grey background $ARRAYDISPLAY_MAXTITLE = 2048 ; Maximize title width regardless of array width Test Script #include "ArrayDisplayInternals.au3" #include <Debug.au3> #include <Array.au3> ; Sample 2D array for all tests Global $aTestArray[4][3] = [ _ [1, "Red", True], _ [2, "Green", False], _ [3, "Blue", True], _ [4, "Yellow", False] _ ] ; Flag Constants Global Const $F_LEFT = 0 Global Const $F_TRANSPOSE = 1 Global Const $F_RIGHT = 2 Global Const $F_CENTER = 4 Global Const $F_VERBOSE = 8 Global Const $F_COPYONLY = 16 Global Const $F_NOBUTTONS = 32 Global Const $F_NOROW = 64 Global Const $F_CHECKERR = 128 Global Const $F_NODATALABEL = 256 Global Const $F_NORIGHTCLICK= 512 Global Const $F_SUBTITLECOLOUR = 1024 Global Const $F_MAXTITLE = 2048 ; Utility function to log and invoke display Func RunFlagTest($sLabel, $iFlags) ConsoleWrite("Test: " & $sLabel & " | Flags: " & $iFlags & @CRLF) _DebugArrayDisplay($aTestArray, $sLabel, Default, $iFlags) EndFunc ConsoleWrite("=== Starting ARRAYDISPLAY Flag Tests ===" & @CRLF) ; --- Individual Flag Tests --- RunFlagTest("LEFT Align (Default)", $F_LEFT) RunFlagTest("TRANSPOSE", $F_TRANSPOSE) RunFlagTest("RIGHT Align", $F_RIGHT) RunFlagTest("CENTER Align", $F_CENTER) RunFlagTest("VERBOSE Mode", $F_VERBOSE) RunFlagTest("COPY ONLY Buttons", $F_COPYONLY) RunFlagTest("NO Buttons Displayed", $F_NOBUTTONS) RunFlagTest("NO ROW Column", $F_NOROW) RunFlagTest("CHECK ERROR (on valid input)", $F_CHECKERR) RunFlagTest("NO DATA LABEL Display", $F_NODATALABEL) RunFlagTest("NO RIGHT-CLICK Menu", $F_NORIGHTCLICK) RunFlagTest("CONTRAST SUBTITLE", $F_SUBTITLECOLOUR) RunFlagTest("A VERY LONG ARRAY TITLE THAT SHOULDN'T BE TRUNCATED", $F_MAXTITLE) ; --- Combination Tests --- RunFlagTest("TRANSPOSE + CENTER Align", BitOR($F_TRANSPOSE, $F_CENTER)) RunFlagTest("RIGHT Align + NO ROW", BitOR($F_RIGHT, $F_NOROW)) RunFlagTest("COPY ONLY + SUBTITLE COLOUR", BitOR($F_COPYONLY, $F_SUBTITLECOLOUR)) RunFlagTest("NO Buttons + NO DATA LABEL", BitOR($F_NOBUTTONS, $F_NODATALABEL)) RunFlagTest("VERBOSE + CHECK ERROR + CENTER Align", BitOR($F_VERBOSE, $F_CHECKERR, $F_CENTER)) RunFlagTest("TRANSPOSE + COPY ONLY + NO ROW", BitOR($F_TRANSPOSE, $F_COPYONLY, $F_NOROW)) RunFlagTest("CENTER Align + NO DATA LABEL + NO RIGHT-CLICK", BitOR($F_CENTER, $F_NODATALABEL, $F_NORIGHTCLICK)) ConsoleWrite("=== Tests Complete ===" & @CRLF)
    1 point
  2. argumentum

    Tidy/VSCode

    Nice ! Local input = "How are you ?" ; Send the HTTP GET request Local $url = "https://api.duckduckgo.com/?q=" & StringReplace($input, " ", "+") & "&format=json&no_redirect=1&no_html=1&skip_disambig=1" Local $response = BinaryToString(InetRead($url, 1)) ConsoleWrite(@CRLF & $response & @CRLF & @CRLF) ..very nice !
    1 point
  3. #include <Misc.au3> HotKeySet("{ESC}", "Terminate") ; just in case you want to exit this way Func Terminate() Exit EndFunc ;==>Terminate Exit Example() Func Example() Local $iX = 985, $iY = 284 While Sleep(100) ; otherwise the CPU is going nuts If _IsPressed("04") Then ; 04 Middle mouse button (three-button mouse) Do Sleep(100) ; wait intill is released Until Not _IsPressed("04") MouseMove($iX, $iY) ToolTip("..and here we are on " & $iX & " / " & $iY & " at " & _ @HOUR & ":" & @MIN & ":" & @SEC & @LF & "Press ESC to exit this demo.") AdlibRegister(ToolTipOff, 1000) ; to show you that we're done ; but you do your thing here EndIf WEnd EndFunc ;==>Example Func ToolTipOff() AdlibUnRegister(ToolTipOff) ToolTip("") EndFunc ;==>ToolTipOff ..this should get you started
    1 point
  4. @Ontosy, this is Sparta, I mean, this is AutoIt. If you rather use languages that have those, use those 🤔
    1 point
  5. I noticed that a couple of days ago but did not report, after we saw the issue in _GUICtrlStatusBar_EmbedControl which did not let you embed controls in your script, because of _WinAPI_SetParent() which change the parent of the embedded controls, then their background colors were not the ones you wanted. I'm sure other examples in the help file would need the same fix, e.g. to take care of the messages WM_SIZE / WM_MOVE when the GUI is resized, minimized etc... and calculate the position of these controls during the registered messages functions.
    1 point
×
×
  • Create New...