hallo :)
Ich versuche zurzeit einen Bot mit AutoIt zu machen stoße aber
immer auf ein bestimmtes Problem und weiss nich wie ich es beheben kann:
Eigentlich soll nachdem der fünfte case ausgeführt wurde Func start2 straten.
Aber der Bot kommt nicht dazu auf $pixelposportaleingang zu klicken sondern macht
immer mit $pixelposmapmark0 bis 3 weiter egal ob er sie findet.
Wisst ihr warum?
Ich versuche zurzeit einen Bot mit AutoIt zu machen stoße aber
immer auf ein bestimmtes Problem und weiss nich wie ich es beheben kann:
Code:
#include <GUIConstantsEx.au3>
GUICreate("jdsf", 250, 100)
GUICtrlCreateLabel("[F1] - Start", 8, 8)
GUICtrlCreateLabel("[ESC] - Ende", 8, 48)
GUISetState(@SW_SHOW)
HotKeySet("{F1}", "Start")
HotKeySet("{ESC}", "Ende")
While 1
Sleep(500)
WEnd
Func Ende()
Exit
EndFunc
Func Start()
While 1
$PixelPosMapMark0 = PixelSearch(742 ,116 ,896 ,172 ,0x0710CF , 0)
$PixelPosMapMark1 = PixelSearch(728 ,123 ,791 ,280 ,0x0710CF , 0)
$PixelPosMapMark2 = PixelSearch(854 ,130 ,899 ,283 ,0x0710CF , 0)
$PixelPosMapMark3 = PixelSearch(741 ,234 ,885 ,290 ,0x0710CF , 0)
; $PixelPosPortalAusgang0 = PixelSearch(0 ,0 ,@DesktopWidth, @DesktopHeight, 0x95936A, 0)
$PixelPosPortalEingang0 = PixelSearch(0 ,0 ,@DesktopWidth, @DesktopHeight, 0x7CB7EF, 0)
; $PixelPosEdgevilleBanker0 = PixelSearch(0 ,0 ,@DesktopWidth, @DesktopHeight, 0x42395A, 0)
Select
Case IsArray($PixelPosMapMark0)
MouseClick("left", $PixelPosMapMark0[0], $PixelPosMapMark0[1], 1, 0)
Sleep(5000)
Case IsArray($PixelPosMapMark1)
MouseClick("left", $PixelPosMapMark1[0], $PixelPosMapMark1[1], 1, 0)
Sleep(5000)
Case IsArray($PixelPosMapMark2)
MouseClick("left", $PixelPosMapMark2[0], $PixelPosMapMark2[1], 1, 0)
Sleep(5000)
Case IsArray($PixelPosMapMark3)
MouseClick("left", $PixelPosMapMark3[0], $PixelPosMapMark3[1], 1, 0)
Sleep(5000)
Case IsArray($PixelPosPortalEingang0) ;dieser case wird nicht ausgeführt
MouseClick("left", $PixelPosPortalEingang0[0], $PixelPosPortalEingang0[1], 1, 0)
Sleep(5000)
Return 1
EndSelect
WEnd
EndFunc
Func Start2()
;code
;code
;code
;code
EndFunc
Eigentlich soll nachdem der fünfte case ausgeführt wurde Func start2 straten.
Aber der Bot kommt nicht dazu auf $pixelposportaleingang zu klicken sondern macht
immer mit $pixelposmapmark0 bis 3 weiter egal ob er sie findet.
Wisst ihr warum?