Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 18:56

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

Advertisement



Do... Until... Then Hilfe.

Discussion on Do... Until... Then Hilfe. within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1


 
Requi's Avatar
 
elite*gold: 3570
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,044
Received Thanks: 8,252
Do... Until... Then Hilfe.

Ich arbeite an einem Bot der Random Koordinaten fliegen soll bis ein Pixel auftaucht. Wenn der Pixel auftaucht soll er etwas ausführen.

Code:
$coord = PixelSearch(...., 0xcc0000)
Do
MouseClick(...)
Until
$coord = 1
...
Was muss ich machen?
Requi is offline  
Old 12/26/2012, 21:05   #2
 
de4df1sh's Avatar
 
elite*gold: 305
Join Date: Dec 2012
Posts: 50
Received Thanks: 16
Das ist doch eigentlich normaler Pixelsearch Befehl
also ich würde es so machen:
Code:
$coord = PixelSearch(0,0,@DesktopWidth,@DesktopHeight, 0xcc0000)
if not @error then
MouseClick(...)
endif
de4df1sh is offline  
Old 12/26/2012, 21:06   #3
 
Achat's Avatar
 
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
Code:
Do
	$aCoord = PixelSearch(0,0,0,0, 0xcc0000)
	If Not IsArray($aCoord) Then MouseClick('left')
	Sleep(100)
Until IsArray($aCoord)

;oder

while 1
	$aCoord = PixelSearch(0,0,0,0, 0xcc0000)
	If IsArray($aCoord) Then ExitLoop
	MouseClick('left')
	Sleep(100)
WEnd
MfG
Achat is offline  
Old 12/26/2012, 21:24   #4
 
Achat's Avatar
 
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
Quote:
Return Value
Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y).
Failure: Sets @error to 1 if color is not found.
IsArray -> True
@error -> false [not @error]

MfG
Achat is offline  
Reply




All times are GMT +1. The time now is 18:56.


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.