radulcia Posted February 9, 2020 Posted February 9, 2020 expandcollapse popup#include <array.au3> #Include <File.au3> #include <string.au3> #include <Misc.au3> #include <Clipboard.au3> #include <ImageSearch.au3> #include <ScreenCapture.au3> Global $x, $y HotKeySet("{HOME}","lol1") HotKeySet("{END}","ext") While 1 Sleep(100) WEnd func ext() exit EndFunc func lol1() WinActivate("Tibia") WinSetOnTop("Tibia", "", 0) Sleep(50) MouseClick("Left", 87, 820) Sleep(50) lol() EndFunc func lol() $titlek = "Tibia" $baza = "polujenahexane.txt" Dim $array _FileReadToArray ($baza, $array) ;~ _arraydisplay ($array) _arraydelete ($array , 0) $string = _ArrayToString ($array, ":") ;~ msgbox (0, '' , $string) $Barray = stringsplit ($string , ":" , 1) _arraydelete ($Barray , 0) ;~ _arraydisplay ($Barray) $i = 0 MouseClick("Left", 1000,468 ) $login = $Barray[$i] $password = $Barray[$i + 1] Sleep(50) ControlSend($titlek, "", "", $login) Sleep(50) ControlSend($titlek, "", "", "{TAB}") Sleep(50) ControlSend($titlek, "", "", $password) Sleep(50) ControlSend($titlek, "", "", "{ENTER}") Sleep(1000) $result = _ImageSearch("szukajszarik.bmp", 1, $x, $y, 20) Sleep(50) If $result = 1 Then Sleep(50) _ScreenCapture_Capture(@ScriptDir & "\znalezione\"&$login&" "&$password&".jpg") Sleep(50) ControlSend($titlek, "", "", "{ESC}") Sleep(50) MouseClick("Left", 84, 840) $i = 0 lol2() Else ControlSend($titlek, "", "", "{ENTER}") Sleep(50) lol2() EndIf EndFunc func lol2() Local $aLines $hFile = FileOpen("polujenahexane.txt") While 1 $sPath = FileReadLine($hFile) ; This reads the next line on each pass If @error Then ExitLoop ; Stop when there are no more lines to read _FileReadToArray(@ScriptDir & $sPath, $aLines, $FRTA_NOCOUNT) ; Read file into an array _FileWriteFromArray(@ScriptDir & $sPath, $aLines, 1) ; Rewrite the file without the first line WEnd FileClose($hFile) lol() EndFunc i have problem with ending this scripts. , Unable to parse line.: Local $aLines????? Local $aLines^ ERROR"
Developers Jos Posted February 9, 2020 Developers Posted February 9, 2020 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts