Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 16:03

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

Advertisement



[HELP]Hilfe mit Do-Until

Discussion on [HELP]Hilfe mit Do-Until within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2008
Posts: 128
Received Thanks: 25
[HELP]Hilfe mit Do-Until

ich habe den code:

Code:
#include <GUIConstants.au3>
Global $mouse

HotKeySet("{F1}", "Enable")
mousegetpos()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Schlichter", 498, 79, 193, 125)
$Label1 = GUICtrlCreateLabel("Fahre mit der Maus auf den gewünschten Ordner und drücke dann F1!", 8, 8, 478, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Start", 8, 32, 481, 41, 0)
GUICtrlSetState($Button1, $GUI_DISABLE)
GUICtrlSetFont(-1, 14, 800, 0, "Footlight MT Light")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			suchen()
	EndSwitch
WEnd

Func Enable()
	$mouse=Mousegetpos()
	GUICtrlSetState($Button1, $GUI_ENABLE)
EndFunc


Func Suchen ()
	WinMinimizeAll()
	Do
$coord = PixelSearch( 0, 0, 1679, 1015,0x747475)
Sleep(100)
MouseMove($coord[0], $Coord[1])
MouseDown("LEFT")
Sleep(200)
MouseMove($mouse[0], $mouse[1])
Sleep(40)
MouseUp("LEFT")
Until @error=1 
MsgBox(0, "Fertig!", "Arbeiten abgeschlossen")
EndFunc
ich will das er nach dem farbwert sucht, und wenn er keinen mehr findet die msg box öffnet.
Jetzt sucht er... wenn er keinen mehr findet kommt logischerweise eine error box. Kann man den Code noch vereinfachen?(Können bestimmt, kann mir das wer machen)?

lg lucabest
lucabest is offline  
Old 08/11/2009, 17:40   #2
 
SCORNI's Avatar
 
elite*gold: 26
Join Date: Jun 2009
Posts: 972
Received Thanks: 228
easy
PHP Code:
#include <GUIConstants.au3>
Global $mouse

HotKeySet
("{F1}""Enable")
mousegetpos()
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Schlichter"49879193125)
$Label1 GUICtrlCreateLabel("Fahre mit der Maus auf den gewünschten Ordner und drücke dann F1!"8847820)
GUICtrlSetFont(-1108000"MS Sans Serif")
$Button1 GUICtrlCreateButton("Start"832481410)
GUICtrlSetState($Button1$GUI_DISABLE)
GUICtrlSetFont(-1148000"Footlight MT Light")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            suchen
()
    EndSwitch
WEnd

Func Enable
()
    
$mouse=Mousegetpos()
    
GUICtrlSetState($Button1$GUI_ENABLE)
EndFunc


Func Suchen 
()
    
WinMinimizeAll()
    while 
1
$coord 
PixelSearch0016791015,0xAEAEAE)
if 
not @error then
Sleep
(100)
MouseMove($coord[0], $Coord[1])
MouseDown("LEFT")
Sleep(200)
MouseMove($mouse[0], $mouse[1])
Sleep(40)
MouseUp("LEFT")
EndIf
if @
error Then
MsgBox
(0"Fertig!""Arbeiten abgeschlossen")
exit
endif
wend
EndFunc 
SCORNI is offline  
Thanks
1 User
Old 08/11/2009, 17:45   #3
 
elite*gold: 0
Join Date: Dec 2008
Posts: 128
Received Thanks: 25
JA thx funzt.
Vielen Dank Scorni


vote4Close
lucabest is offline  
Reply


Similar Threads Similar Threads
Hilfe Hilfe Pls Gucken Brauche Hilfe
04/04/2010 - Technical Support - 3 Replies
Ja wegen der Signatur sieht es euch ma an in pics /http://img641.imageshack.us/img641/6070/unbenann t790kjkh.png http://img444.imageshack.us/img444/6981/unbenannt kjhghzuijhbh.png kann mir pls einer HELFEN...
HILFE HILFE HILFE MIT SjSro Startproblem
12/14/2009 - SRO Private Server - 4 Replies
Hi Leute hab ein Problem mit SjSro wenn ich auf starten klicke kommt diese Meldung Sorry.Failed to execute Silkroad. bitte helfen hab anti virus aus geht immer noch nicht wo liegt das problem thx schon mal im voraus BITTE HELFEN BITTE WILL UMBEDINGT ZOCKEN!!



All times are GMT +1. The time now is 16:04.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.