jetzt zeige ich euch wie man eine GUI oder eine Form erstellt.
Also, zuerst erstellen wir eine neue *.au3 Datei.
So nun fangen wir an.... Zuerst, möchten wir das Fenster erstellen wo alle Buttons etc rein kommen sollen....
Dazu brauchen wir erstmal diesen Code :
PHP Code:
GuiCreate
Also könnte der Code so aussehen :
PHP Code:
GUICreate("TITEL", 367, 202, 203, 123)
PHP Code:
GuiCtrlCreate
PHP Code:
Button
Der Code könnte so aussehen :
PHP Code:
GUICtrlCreateButton("Start", 64, 120, 259, 25)
PHP Code:
GUISetState(@SW_SHOW)
Nun wollen wir nurnoch Funktionen für den Button setzen. Aber das geht nicht so einfach. Zuerst müssen wir eine Schleife erstellen welche die Funktionen erkennt....
Dazu benutzen wir diesen Code :
PHP Code:
While 1
$nMsg = GUIGetMsg()
WEnd
PHP Code:
Exit
PHP Code:
$Button =
Wir brauchen eine Bedingung und die Funktion, dafür benutzten wir die IF Funktion....
PHP Code:
If
;...
Then
;...
PHP Code:
;...
Also nach dem If Teil, kommt der Button hin, also $Button. Nach dem Then Teil die Funktion also
PHP Code:
Exit
So müsste es dann aussehen :
PHP Code:
if $nMsg=$Start Then Exit
PHP Code:
if $nMsg=$GUI_EVENT_CLOSE then Exit
PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
So und das wars ....
Der komplette Code :
PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("TITEL", 367, 202, 203, 123)
$Start = GUICtrlCreateButton("Start", 64, 120, 259, 25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
if $nMsg=$GUI_EVENT_CLOSE then Exit
if $nMsg=$Start Then Exit
WEnd
All Creditz to R.o.x