hi ich habe mal wieder eine frage
ich habe mit koda ein fenter gemacht , das ist ja auch nicht schwer.
doch jetzt meine frage.
wie bekomme ich es hin, dass wenn ich ein button klicke etwas passiert.
gut das war es schon.
bis dann euer MANNY
GUI
-
- [ offen ]
-
manny89 -
29. März 2008 um 21:22 -
Geschlossen -
Erledigt
-
-
entweder mit GUIGetMsg oder mit GUICtrlSetOnEvent... Hilfe nachlesen bzw. die Tutorials machen
-
vielen dank ging aber schnell mit der antwort
-
mh ich habe das immer noch nicht hinbekommen
weiß nicht was ich flasch mache
vllt kann mir jemand mal ein kleines bsp machen zu den hier#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 451, 193, 125)
$Button1 = GUICtrlCreateButton("Button1", 128, 72, 225, 97, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
WEnd
wenn der button geklickt wird soll ein msg kommen
ps help
danke schon mal
euer MANNY -
hi
[autoit]
[/autoit]
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 451, 193, 125)
$Button1 = GUICtrlCreateButton("Button1", 128, 72, 225, 97, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
msgbox(0,'nanu?!','halihalo')
EndSwitch
WEnd -
danke für die antwort
-
hi ich mal wieder
jetzt habe ich ein neues problemhier mal mein script (nur übung)
HotKeySet("{ESC}" , "Terminate")
Func Terminate()
Exit
EndFunc
#include <GUIConstants.au3>#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 451, 193, 125)
GUICtrlCreateLabel("", 80, 0, 4, 4)
$KNUDDELS = GUICtrlCreateLabel("KNUDDELS", 240, 0, 63, 17)
$Input1 = GUICtrlCreateInput("Hier kommt dein text rein", 144, 56, 289, 21)
$nr1 = GUICtrlCreateLabel("nr1", 104, 56, 19, 17)
$nr2 = GUICtrlCreateLabel("nr2", 104, 112, 19, 17)
$Input2 = GUICtrlCreateInput("Hier kommt noch ein Text rein", 144, 104, 289, 21)
$Start = GUICtrlCreateButton("Start", 200, 168, 201, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Start
msgbox(0,'Start','Loß geht es')
EndSwitch
WEnd
meine frage ist jetzt
ich habe ja 2 edit felden in mein script.
dann soll der start button geklickt werden.
dann soll das script gestartet werden.
und wenn nix in den edit felder eingegeben wurde
soll eine fehler meldung kommen.
okay BB
euer manny -
Evtl. sowas an der Stelle wo steht was passieren soll wenn man auf Start klickt
[autoit]
[/autoit]
If GUICtrlRead($Input1) = "" Then ; If GUICtrlRead($Input1) = "" AND If GUICtrlRead($Input2) = "" Then
myscript()
Else
other_things_todo() -
bitte bitte bitte benutze doch einmal den autoit hack
[autoit]damit man den code auch in syntax sjeht
[/autoit]