Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 10:23

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

Advertisement



Bereich in AutoIt festlegen?

Discussion on Bereich in AutoIt festlegen? within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2012
Posts: 50
Received Thanks: 6
Bereich in AutoIt festlegen?

Hallo!

ich suche hilfe für mein script, dass ständig auf eine Minimap klicken soll. Undzwar will ich nicht in eine Area also in ein bereich landen und deswegen hab ich mit Pixelsearch den Bereich in $bereichtop , $bereichLeft, $bereichBottom, $bereichRight definiert. Aber beim Minimapklicken klickt der bot so:

Code:
	  Sleep(500)
	  MouseMove($MinimapLeft + Random(5,80),$MinimapTop + Random(5,80))
	  MouseClick("left")
	  $mPos = MouseGetPos()
	  $Color = PixelGetColor($mPos[0],$mPos[1])
   If $Color = 2592034 Then
	  Global $timerNew = TimerInit()
	  Sleep(500)
	  Send("d")
Also das ist nur ein kleiner ausschnitt und ich mach das eben mit Random. Wie kann ich jetzt einbauen dass wenn der Bot auf den Bereich von der Zone klickt in die ich nicht will, einfach die Funktion neustartet bis es einen Punkt auf der Minimap angeklickt hat die ok ist?

Wäre sehr nett wenn ihr mir helfen würdet

wannabegodlike
wannabegodlike is offline  
Old 08/23/2014, 14:52   #2
 
elite*gold: 0
Join Date: Nov 2012
Posts: 50
Received Thanks: 6
Kann mir keiner helfen?
wannabegodlike is offline  
Old 08/23/2014, 17:32   #3
 
elite*gold: 113
The Black Market: 133/2/0
Join Date: Dec 2009
Posts: 16,685
Received Thanks: 4,450
Pseudocode:

Code:
If $mPos[0] > $BlockedAreaLeft AND $mPos[0] < $BlockedAreaRight AND $mPos[1] > $BlockedAreaTop AND $mPos[1] < $BlockedAreaBottom Then

;Restart your function here

EndIf
Schrecklich aussehender Code, aber das wäre in etwa die Logik
Rorc is offline  
Thanks
1 User
Old 08/23/2014, 17:51   #4
 
elite*gold: 0
Join Date: Nov 2012
Posts: 50
Received Thanks: 6
Quote:
Originally Posted by Shanks View Post
Pseudocode:

Code:
If $mPos[0] > $BlockedAreaLeft AND $mPos[0] < $BlockedAreaRight AND $mPos[1] > $BlockedAreaTop AND $mPos[1] < $BlockedAreaBottom Then

;Restart your function here

EndIf
Schrecklich aussehender Code, aber das wäre in etwa die Logik
..Solang sie ihren Zweck erfüllt
Danke!
wannabegodlike is offline  
Reply


Similar Threads Similar Threads
AutoIT:bestimmten Bereich nach Farben abbsuchen
08/01/2010 - General Coding - 3 Replies
Hi :D, ich hab das problem ich hab von einem spiel einen Bereich wo irgendwo ein weißes kreuz erscheint und jetzt wollte ich mal fragen ob und wie es mit autoit geht das sobald das kreuz erscheint der Bot automatisch draufklickt. Mfg Crossi xD Schomma danke im Vorraus :handsdown: :handsdown:
AutoIT Bereich abscannen
07/03/2009 - AutoIt - 15 Replies
In AutoIT gibt es ja folgende Funktion : PixelSearch ( left, top, right, bottom, color ]] ) jetzt meine Frage ich habe im Beispiel code nur folgendes entdeckt : $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) jetzt ist meine Frage , was da jetzt welche Koordinaten sind



All times are GMT +1. The time now is 10:23.


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.