Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/14/2022 in all areas

  1. Modified Script: #include <AutoItConstants.au3> ; Compare Global $iPID = Run("magick compare -metric RMSE 1.jpg 2.jpg NULL:", "", Default, $STDOUT_CHILD) If $iPID = 0 Then Exit ConsoleWrite("Error running Magick! @error=" & @error & ", @extended=" & @extended & @CRLF) ; Wait until the process has closed using the PID returned by Run. Global $iWait = ProcessWaitClose($iPID) If $iWait = 0 Then Exit ConsoleWrite("Error returned by ProcessWaitClose! @error=" & @error & ", @extended=" & @extended & @CRLF) ; Read the Stdout stream Global $sScreenOutput = StdoutRead($iPID) If @error Then Exit ConsoleWrite("Error returned by StdOutRead! @error=" & @error & ", @extended=" & @extended & @CRLF) MsgBox(0, 0, $sScreenOutput)
    1 point
  2. Please provide more information: Post the output you get when you run "magick" in a DOS window @SW_SHOW isn't a valid flag for the Run statement Check for error after each function. Run sets @error Check the length of $ScreenOutput using StringLen to make sure the string is empty
    1 point
  3. Nine

    Click Mouse Side Button

    Thumb button is $XBUTTON1 and small finger button is $XBUTTON2. Here an example with thumb button : #include <WinAPISys.au3> Local $hWnd = WinGetHandle("[CLASS:CabinetWClass]") ConsoleWrite($hWnd & @CRLF) WinActivate($hWnd) WinWaitActive($hWnd) Global Const $XBUTTON1 = 1, $XBUTTON2 = 2 _WinAPI_Mouse_Event($MOUSEEVENTF_XDOWN, 0, 0, $XBUTTON1) _WinAPI_Mouse_Event($MOUSEEVENTF_XUP, 0, 0, $XBUTTON1)
    1 point
  4. Hi @TomJohn. Something like this? For $i = 1 to 3 Dim $aArray[0] Assign("array"&$i, $aArray) Next ConsoleWrite(VarGetType($array1)&@CRLF) ConsoleWrite(VarGetType($array2)&@CRLF) ConsoleWrite(VarGetType($array3)&@CRLF)
    1 point
  5. try: $aWords = StringRegExp(FileRead("some.txt"),"(\w+)",3) $sRandom = $aWords[Random(0,UBound($aWords),1)] ConsoleWrite($sRandom & @CRLF)
    1 point
×
×
  • Create New...