Jump to content

alex33

Members
  • Posts

    2
  • Joined

  • Last visited

alex33's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. Help me finish the script. It works manually, but not with a script. Maybe I don't have to drive exactly straight so that there is a curved line,or did I pick up the speed incorrectly? I tried many variants. You need to hold down the left button, swipe in the right direction, release it, return the mouse to its original position. for comfortable swipe photos in mobile applications or for swiping talkback gestures on an Android virtual machine. Global $iX = 0, $iY = 0 Global $sKeySwipeLeft = "^{LEFT}" Global $sKeySwipeRight = "^{RIGHT}" Global $sKeySwipeUp = "^{UP}" Global $sKeySwipeDown = "^{DOWN}" Beep(1000, 300) HotKeySet($sKeySwipeLeft, "swipe_left") HotKeySet($sKeySwipeRight, "swipe_right") HotKeySet($sKeySwipeUp, "swipe_up") HotKeySet($sKeySwipeDown, "swipe_down") While 1 Sleep(1000) WEnd Func swipe_left() HotKeySet($sKeySwipeLeft) Sleep(10) ;Beep(900, 100) $iX = MouseGetPos(0) $iY = MouseGetPos(1) MouseDown("left") Sleep(10) MouseMove($iX - 100, $iY, 10) Sleep(10) MouseUp("left") Sleep(10) MouseMove($iX, $iY, 1) HotKeySet($sKeySwipeLeft, "swipe_left") EndFunc Func swipe_right() HotKeySet($sKeySwipeRight) Sleep(10) ;Beep(900, 100) $iX = MouseGetPos(0) $iY = MouseGetPos(1) MouseDown("left") Sleep(10) MouseMove($iX + 100, $iY, 10) Sleep(10) MouseUp("left") Sleep(10) MouseMove($iX, $iY, 1) HotKeySet($sKeySwipeRight, "swipe_right") EndFunc Func swipe_up() HotKeySet($sKeySwipeUp) Sleep(10) ;Beep(900, 100) $iX = MouseGetPos(0) $iY = MouseGetPos(1) MouseDown("left") Sleep(10) MouseMove($iX, $iY + 100, 10) Sleep(10) MouseUp("left") Sleep(10) MouseMove($iX, $iY, 1) HotKeySet($sKeySwipeUp, "swipe_up") EndFunc Func swipe_down() HotKeySet($sKeySwipeDown) Sleep(10) ;Beep(900, 100) $iX = MouseGetPos(0) $iY = MouseGetPos(1) MouseDown("left") Sleep(10) MouseMove($iX, $iY - 100, 10) Sleep(10) MouseUp("left") Sleep(10) MouseMove($iX, $iY, 1) HotKeySet($sKeySwipeDown, "swipe_down") EndFunc I repeat, this works when executed manually.
  2. My russion Work example: (for russion site rghost, for Windows 7 RUS, IE11) : #include <IE.au3> Global $oIE = _IECreate("http://rghost.ru/") Global $iTimer=TimerInit() $oIE.navigate('javascript:document.getElementById("choose").click();void(0);',0) ConsoleWrite("===time: "&TimerDiff($iTimer)&"==="&@CRLF) ;Beep(900, 1000) Global $sFilePath=@ScriptFullPath Global $hwnd=WinWait("Выбор выкладываемого файла","",5) If Not $hwnd Then Exit 2 ControlSetText($hwnd,"","Edit1",$sFilePath) Sleep(3000); задержка, чтобы было видно ControlClick($hwnd,"","Button1")
×
×
  • Create New...