Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/02/2017 in all areas

  1. Your link is not working. Yes, This is possible. But your C# parameter to receive the AutoIt array must be an array of objects. Something like this: public void Array( object[] aInput )
    1 point
  2. EasyAsPie() Local $iError = @error If BitAND($iError, 1) Then ConsoleWrite("1st error occured" & @LF) If BitAND($iError, 2) Then ConsoleWrite("2nd error occured" & @LF) If BitAND($iError, 4) Then ConsoleWrite("3rd error occured" & @LF) Func EasyAsPie() Local $iErrFlag = 0, $iExtFlag = 0, $vRetVal = 0 $iErrFlag = BitOR($iErrFlag, 1) ; 1st error $iErrFlag = BitOR($iErrFlag, 2) ; 2nd error $iErrFlag = BitOR($iErrFlag, 4) ; 3rd error Return SetError($iErrFlag, $iExtFlag, $vRetVal) EndFunc
    1 point
  3. Solved. In case anyone else needs this, I found an old script called "MouseClickPlus.au3" in another thread and was able to modify it to include two different coordinates, a starting coordinate and a final coordinate, and thus performing a drag. It does this through user32.dll calls. Here's what the modified script looks like: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.8.1 Author: someone Script Function: MouseClickPlus #ce ---------------------------------------------------------------------------- Func _MouseClickPlus($Window, $Button="left", $X1=0, $Y1=0, $X2=0, $Y2=0, $Clicks=1) Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 Local $MK_RBUTTON = 0x0002 Local $WM_RBUTTONDOWN = 0x0204 Local $WM_RBUTTONUP = 0x0205 Local $WM_MOUSEMOVE = 0x0200 Local $i = 0 Select Case $Button = "left" $Button = $MK_LBUTTON $ButtonDown = $WM_LBUTTONDOWN $ButtonUp = $WM_LBUTTONUP Case $Button = "right" $Button = $MK_RBUTTON $ButtonDown = $WM_RBUTTONDOWN $ButtonUp = $WM_RBUTTONUP EndSelect If $X1 = 0 OR $Y1 = 0 Then $MouseCoord = MouseGetPos() $X1 = $MouseCoord[0] $Y1 = $MouseCoord[1] EndIf For $i = 1 to $Clicks DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X1, $Y1)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonDown, _ "int", $Button, _ "long", _MakeLong($X1, $Y1)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X2, $Y2)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonUp, _ "int", $Button, _ "long", _MakeLong($X2, $Y2)) Next EndFunc Func _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc
    1 point
×
×
  • Create New...