Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 17:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem mit AutoIt bot

Discussion on Problem mit AutoIt bot within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2013
Posts: 85
Received Thanks: 0
Problem mit AutoIt bot

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:

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?
RF1T2 is offline  
Old 06/23/2013, 09:33   #2
 
FacePalmMan's Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 426
Received Thanks: 129
mögliche fehler: falsche pixelfarbe oder spiel benutzt schatten
lösung: nochmal die richtige pixelfarbe suchen oder toleranz wert erhöhen
FacePalmMan is offline  
Thanks
1 User
Old 06/23/2013, 16:34   #3
 
elite*gold: 0
Join Date: May 2013
Posts: 85
Received Thanks: 0
Was ich aber auch gerne wissen würde (auf dieses Problem bezogen), ist ob man bei pixelsearch in dem Feld in dem gesucht wird einen Bereich in der Mitte angeben kann in dem nicht gesucht wird.
RF1T2 is offline  
Reply




All times are GMT +1. The time now is 17:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.