Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/05/2022 in all areas

  1. Some console apps use special keyboard inputs. Choice might be one of them.
    1 point
  2. I think that global array or ByRef parameters would be the best (and the most simple) solution. But here is another quite simple example/solution using (1D) array of (two) arrays: #include <Array.au3> #include <Debug.au3> local $aArray0, $aArray1, $aArray2 $aArray0 = _Test_func() $aArray1 = $aArray0[0] $aArray2 = $aArray0[1] _DebugArrayDisplay($aArray1) _DebugArrayDisplay($aArray2) Func _Test_func() Local $aArrayRet[2] local $aArrayA = [1, 2, 3] local $aArrayB = [4, 5, 6] $aArrayRet[0] = $aArrayA $aArrayRet[1] = $aArrayB return $aArrayRet EndFunc
    1 point
  3. 1 point
  4. Oh, sorry I forgot. CPU and computers haven't change in 10 years. LOL
    1 point
  5. CarlD

    AutoIt Snippets

    Func _ConsoleEraseLine() is for compiled CUI scripts. It allows successive one-line console outputs to be printed to a single line on the screen (by overwriting the previous line). Output lines must NOT end in @LF. Compile the code, then command EraseLineDemo.exe. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=EraseLineDemo.exe #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Run_Au3Stripper=y #AutoIt3Wrapper_AU3Check_Parameters=-w 3 -w 4 -w 5 -w 6 -d #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; ; CLD rev.10/31/2021 Global $vLine1 = "The quick brown fox jumped over the lazy dog." Global $vLine2 = 9999999 Global $vLine3 = 0000001 Global $vLine4 = "0000001" Global $vLine5 = 3.1416 Global $vLine6 = -9999999 Global $vLine7 = -0000001 Global $vLine8 = "-0000001" Global $vLine9 = -03.1416 Global $vLine10 = "-03.1416" Global $vLine11 = True ConsoleWrite($vLine1) Sleep(2000) _ConsoleEraseLine($vLine1) ConsoleWrite($vLine2) Sleep(2000) _ConsoleEraseLine($vLine2) ConsoleWrite($vLine3) Sleep(2000) _ConsoleEraseLine($vLine3) ConsoleWrite($vLine4) Sleep(2000) _ConsoleEraseLine($vLine4) ConsoleWrite($vLine5) Sleep(2000) _ConsoleEraseLine($vLine5) ConsoleWrite($vLine6) Sleep(2000) _ConsoleEraseLine($vLine6) ConsoleWrite($vLine7) Sleep(2000) _ConsoleEraseLine($vLine7) ConsoleWrite($vLine8) Sleep(2000) _ConsoleEraseLine($vLine8) ConsoleWrite($vLine9) Sleep(2000) _ConsoleEraseLine($vLine9) ConsoleWrite($vLine10) Sleep(2000) _ConsoleEraseLine($vLine10) ConsoleWrite($vLine11) Sleep(2000) _ConsoleEraseLine($vLine11) Exit ConsoleWrite("Done!" & @LF) Func _ConsoleEraseLine($vIn) ; Erase one line (only) from console output (DOS only, not SciTE) ; $vIn = Line_to_Erase ; Does NOT work if line ends with @LF !! If StringRight($vIn, 1) = @LF Then Return Local $sOut = "" For $i = 1 To StringLen($vIn) $sOut &= Chr(8) & " " & Chr(8) Next ConsoleWrite($sOut) EndFunc ;==>_ConsoleEraseLine
    1 point
×
×
  • Create New...