#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.5
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#cs -----------------
Local $aPos = MouseGetPos()
MsgBox(0, "Mouse x, y:", $aPos[0] & ", " & $aPos[1])
Local $Mouse1_x = $aPos[0]
Local $Mouse1_y = $aPos[1]
#ce -----------
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Misc.au3>
#include <ImageSearchEasy.au3>
HotKeySet("{ESC}", "MyExit")
CreateWindows()
; Vi tri ban hang tren ban do nho : 1879 , 1000
;Vi tri mo ban hang: 1122, 740
Func CreateWindows()
; Crée une interface graphique avec un contrôle bouton
Global $main = GUICreate("rage_mage",280, 250)
WinSetOnTop($main, "", 1)
Local $idOK = GUICtrlCreateButton("Close", 90, 120, 50, 25)
Local $idMousePos = GUICtrlCreateButton("Mouse Pos", 5, 120, 80, 25)
Local $idRune = GUICtrlCreateButton("auto click", 5, 90, 85, 25)
Local $idRune2 = GUICtrlCreateButton("auto elite", 95, 90, 85, 25)
; Affiche l'interface graphique.
GUISetState(@SW_SHOW, $main)
; Boucle jusqu'à ce que l'utilisateur quitte.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $idOK
ExitLoop
Case $idRune
Sleep(1000)
$il = 1
While $il < 2202
GUICtrlCreateLabel("auto click: " & $il, 5, 5, 150, 20)
Sleep(1000)
MouseClick("left", 777, 480, 1,5)
Sleep(45000)
MouseClick("left", 767, 884, 1,5);
Sleep(5000)
$il = $il + 1
WEnd
Case $idRune2
Sleep(1000)
$il = 1
While $il < 2202
GUICtrlCreateLabel("auto elite: " & $il, 5, 5, 150, 20)
Sleep(1000)
MouseClick("left", 769, 783, 1,5)
Sleep(45000)
MouseClick("left", 768, 914, 1,5);
Sleep(10000)
$il = $il + 1
WEnd
Case $idMousePos
; Run getMousePosition
Local $mPos = getMousePosition()
Local $tmp3 = "Mouse x: " & $mPos[0] & ", Mouse y: " & $mPos[1]
GUICtrlCreateLabel($tmp3, 5, 5, 300, 20) ;message, column, row, width, heigh
EndSwitch
WEnd
; Supprime la GUI précédente et tous les contrôles.
GUIDelete($main)
EndFunc ;==>CreateWindows
Func getMousePosition()
Local $x = 1, $pos
While $x = 1 ; Loop until the mouse is clicked.
if _IsPressed("01") then ; If left mouse is pushed.
$pos = MouseGetPos() ; Record the position.
$x = 0 ; Change x to end loop.
EndIf
WEnd
Return $pos
EndFunc;==>getMousePosition
Func MyExit()
Exit
EndFunc
Aucun commentaire:
Enregistrer un commentaire