AutoIt

02/10/2009 17:10 c_gebing#1
Hi,
ich habe ein Desing mit KodaFormDesinger gemacht und ich will das wenn man auf den Buttom 1 drückt das sich der bot dan startet wie mache ich das?
02/10/2009 17:30 I3iLLiG#2
[...]

Case $button1
_start()

[...]

Func _start()
MsgBox(64,"Info","Bot wird gestartet...")
EndFunc


[Only registered and activated users can see links. Click Here To Register...], da gibts auch noch mehr hilfe^^
02/10/2009 17:34 c_gebing#3
was muss bei den ... hin^^
02/10/2009 17:36 verT!c4L#4
Quote:
Originally Posted by I3iLLiG View Post
MsgBox(64,"Info","Bot wird gestartet...")
Warum MsgBox? Ist doch stylischer über GUICtrlCreateLabel
und GUICtrlSetData, um den Status direkt in der Form selbst zu haben...
Sieht jedenfalls professioneller aus :P
02/10/2009 17:41 I3iLLiG#5
verwirre den armen jungen doch net^^

na so solls aussehen:

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 281, 105, 353, 332)
$Button1 = GUICtrlCreateButton("Anbauen", 104, 72, 89, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_start()
EndSwitch
WEnd

Func _start()
MSgBox(64,"info","bot wird gestartet...")
EndFunc
02/10/2009 17:48 c_gebing#6
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 451, 193, 125)
$Label1 = GUICtrlCreateLabel("Test", 24, 24, 193, 83)
GUICtrlSetFont(-1, 35, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Button1", 72, 216, 353, 145, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd


so hier ist der und ich will machen das wenn man auf buttom1 klickt er dan MouseMove(254,657) macht was muss ich dann da hin schreiben?
02/10/2009 17:53 I3iLLiG#7
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 451, 193, 125)
$Label1 = GUICtrlCreateLabel("Test", 24, 24, 193, 83)
GUICtrlSetFont(-1, 35, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Button1", 72, 216, 353, 145, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

Func _start()
MouseMove(254,657)
EndFunc


na so!!
02/10/2009 17:59 c_gebing#8
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 451, 193, 125)
$Label1 = GUICtrlCreateLabel("Test", 24, 24, 193, 83)
GUICtrlSetFont(-1, 35, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Button1", 72, 216, 353, 145, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd


#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 281, 105, 353, 332)
$Button1 = GUICtrlCreateButton("Anbauen", 104, 72, 89, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_start()
EndSwitch
WEnd

Func _start()
MSgBox(64,"info","bot wird gestartet...")
MouseMove(500,500)
EndFunc

also so?
02/10/2009 18:03 c_gebing#9
jetzt habe ich es thx^^
02/10/2009 20:59 verT!c4L#10
Das bezweifle ich... So sollte das aussehen:

PHP Code:
#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Form1"633451193125)
$Label1 GUICtrlCreateLabel("Test"242419383)
GUICtrlSetFont(-1354000"MS Sans Serif")
$Button1 GUICtrlCreateButton("Button1"722163531450)
GUISetState(@SW_SHOW$Form1)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg(1)
    
Select
        
Case $nMsg[0] = $GUI_EVENT_CLOSE
            
Exit
        Case 
$nMsg[0] = $Button1
            _start
()
    
EndSelect
WEnd

Func _start
()
    
GUICtrlSetData($Label1"Bot wird gestartet...")
    
MouseClick "left"917661)
EndFunc 
Sogenannte Header-Dateien (#include...) gehören an den Anfang eines Codes.
Deine Switch Case Variante hab ich nicht mal gefunden,
aber schien für mich nicht zu funktionieren.
Was funktioniert davon überhaupt ?

Die MsgBox, wie gesagt, ist gay... hab es mal so geändert wie ich es vorher meinte...

Best regards, me.

P.S.: Die Formgröße ist vooooooolllll übertrieben groß ^^

PHP Code:
#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("~~~ B.O.T. ~~~"250150193125)
$Label1 GUICtrlCreateLabel("Status: iniated..."242419383)
GUICtrlSetFont(-1202000"MS Sans Serif")
$Button1 GUICtrlCreateButton("Button1"2480200500)
GUISetState(@SW_SHOW$Form1)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg(1)
    
Select
        
Case $nMsg[0] = $GUI_EVENT_CLOSE
            
Exit
        Case 
$nMsg[0] = $Button1
            _start
()
    
EndSelect
WEnd

Func _start
()
    
GUICtrlSetData($Label1"Status: started...")
    
MouseClick "left"917661)
EndFunc 
Besser, oder? :P