|
You last visited: Today at 20:42
Advertisement
AutoIt
Discussion on AutoIt within the General Coding forum part of the Coders Den category.
02/10/2009, 17:10
|
#1
|
elite*gold: 0
Join Date: Jan 2009
Posts: 191
Received Thanks: 13
|
AutoIt
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
|
#2
|
elite*gold: 0
Join Date: Jul 2007
Posts: 93
Received Thanks: 13
|
[...]
Case $button1
_start()
[...]
Func _start()
MsgBox(64,"Info","Bot wird gestartet...")
EndFunc
 , da gibts auch noch mehr hilfe^^
|
|
|
02/10/2009, 17:34
|
#3
|
elite*gold: 0
Join Date: Jan 2009
Posts: 191
Received Thanks: 13
|
was muss bei den ... hin^^
|
|
|
02/10/2009, 17:36
|
#4
|
elite*gold: 0
Join Date: Aug 2005
Posts: 1,245
Received Thanks: 60
|
Quote:
Originally Posted by I3iLLiG
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
|
#5
|
elite*gold: 0
Join Date: Jul 2007
Posts: 93
Received Thanks: 13
|
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
|
#6
|
elite*gold: 0
Join Date: Jan 2009
Posts: 191
Received Thanks: 13
|
#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
|
#7
|
elite*gold: 0
Join Date: Jul 2007
Posts: 93
Received Thanks: 13
|
#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
|
#8
|
elite*gold: 0
Join Date: Jan 2009
Posts: 191
Received Thanks: 13
|
#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
|
#9
|
elite*gold: 0
Join Date: Jan 2009
Posts: 191
Received Thanks: 13
|
jetzt habe ich es thx^^
|
|
|
02/10/2009, 20:59
|
#10
|
elite*gold: 0
Join Date: Aug 2005
Posts: 1,245
Received Thanks: 60
|
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", 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, $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", 91, 766, 1) 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. ~~~", 250, 150, 193, 125) $Label1 = GUICtrlCreateLabel("Status: iniated...", 24, 24, 193, 83) GUICtrlSetFont(-1, 20, 200, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("Button1", 24, 80, 200, 50, 0) 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", 91, 766, 1) EndFunc
Besser, oder? :P
|
|
|
All times are GMT +1. The time now is 20:42.
|
|