Hallo Zusammen,
habe hier ein Script, welches ein internes Umfragetool mit Radiobuttons und Edit Feldern werden soll! (ist gob fertig)
Diese Werte sollen dann in eine Excel Datei oder DB geschrieben werden! (sollte auch nicht das problem sein :))
Nun komme ich nicht auf die Lösung, wie man alle Felder prüft, dass diese auch ausgefüllt sind ...
Kann mir da bitte einer von euch einen Tipp geben
Eventuell auch beim erstellen der Radio Button .....
Spoiler anzeigen
#include <Excel.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Dim $x, $wert_edit, $radio_x1, $radio_x2, $radio_x3, $radio_x4,$radio_x5,$radio_x6
[/autoit] [autoit][/autoit] [autoit]GUICreate("",@DesktopWidth,@DesktopHeight,0,0,0x80000000) ; will create a dialog box that when displayed is centered
$TL_Combo = GUICtrlCreateCombo("",600, 100,100,20) ; create first item
$Label_1 = GUICtrlCreateLabel("Feedback an die Teamleitung und das Qualitätsmanagement",260,30,@DesktopWidth,50)
GUICtrlSetFont($Label_1,22,120, 0, "Arial")
GUICtrlSetData($TL_Combo, "Teamleiter1|Teamleiter2|Teamleiter3|Teamleiter4|Teamleiter5", "Teamleiter1") ; add other item snd set a new default
;----------erste spalte ----------------------------------------------
$top_1 = 190
$top_2 = 420
$top_3 = 640
$left_s1 = 110
$left_s2 = 530
GUICtrlCreateGroup("1. Objektivität / Fairness 1 ", 90, 150, 400, 200)
$radio11 = GUICtrlCreateRadio("1",$left_s1 + 00,$top_1, 30, 20, $WS_GROUP)
$radio12 = GUICtrlCreateRadio("2",$left_s1 + 30,$top_1, 30, 20)
$radio13 = GUICtrlCreateRadio("3",$left_s1 + 60,$top_1, 30, 20)
$radio14 = GUICtrlCreateRadio("4",$left_s1 + 90,$top_1, 30, 20)
$radio15 = GUICtrlCreateRadio("5",$left_s1 + 120,$top_1, 30, 20)
$radio16 = GUICtrlCreateRadio("6",$left_s1 + 150,$top_1, 30, 20)
$edit11 = GUICtrlCreateEdit("", 110, 235, 360, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
GUICtrlCreateGroup("2. Objektivität / Fairness 2 ", 90, 380, 400, 200)
$radio21 = GUICtrlCreateRadio("1",$left_s1 + 00, $top_2, 30, 20, $WS_GROUP)
$radio22 = GUICtrlCreateRadio("2",$left_s1 + 30, $top_2, 30, 20)
$radio23 = GUICtrlCreateRadio("3",$left_s1 + 60, $top_2, 30, 20)
$radio24 = GUICtrlCreateRadio("4",$left_s1 + 90, $top_2, 30, 20)
$radio25 = GUICtrlCreateRadio("5",$left_s1 + 120, $top_2, 30, 20)
$radio26 = GUICtrlCreateRadio("6",$left_s1 + 150, $top_2, 30, 20)
$edit21 = GUICtrlCreateEdit("", 110, 465, 360, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
GUICtrlCreateGroup("3. Objektivität / Fairness 3 ", 90, 610, 400, 200)
$radio31 = GUICtrlCreateRadio("1",$left_s1 + 00, $top_3, 30, 20, $WS_GROUP)
$radio32 = GUICtrlCreateRadio("2",$left_s1 + 30, $top_3, 30, 20)
$radio33 = GUICtrlCreateRadio("3",$left_s1 + 60, $top_3, 30, 20)
$radio34 = GUICtrlCreateRadio("4",$left_s1 + 90, $top_3, 30, 20)
$radio35 = GUICtrlCreateRadio("5",$left_s1 + 120, $top_3, 30, 20)
$radio36 = GUICtrlCreateRadio("6",$left_s1 + 150, $top_3, 30, 20)
$edit31 = GUICtrlCreateEdit("", 110, 690, 360, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
;----------zweite spalte ----------------------------------------------
GUICtrlCreateGroup("4. Objektivität / Fairness 4 ", 510, 150, 400, 200)
$radio41 = GUICtrlCreateRadio("1", $left_s2 + 00, $top_1, 30, 20, $WS_GROUP)
$radio42 = GUICtrlCreateRadio("2", $left_s2 + 30, $top_1, 30, 20)
$radio43 = GUICtrlCreateRadio("3", $left_s2 + 60, $top_1, 30, 20)
$radio44 = GUICtrlCreateRadio("4", $left_s2 + 90, $top_1, 30, 20)
$radio45 = GUICtrlCreateRadio("5", $left_s2 + 120, $top_1, 30, 20)
$radio46 = GUICtrlCreateRadio("6", $left_s2 + 150, $top_1, 30, 20)
$edit41 = GUICtrlCreateEdit("", 530, 235, 360, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
GUICtrlCreateGroup("5. Objektivität / Fairness 5 ", 510, 380, 400, 200)
$radio51 = GUICtrlCreateRadio("1", $left_s2 + 00, $top_2, 30, 20, $WS_GROUP)
$radio52 = GUICtrlCreateRadio("2", $left_s2 + 30, $top_2, 30, 20)
$radio53 = GUICtrlCreateRadio("3", $left_s2 + 60, $top_2, 30, 20)
$radio54 = GUICtrlCreateRadio("4", $left_s2 + 90, $top_2, 30, 20)
$radio55 = GUICtrlCreateRadio("5", $left_s2 + 120,$top_2, 30, 20)
$radio56 = GUICtrlCreateRadio("6", $left_s2 + 150,$top_2, 30, 20)
$edit51 = GUICtrlCreateEdit("", 530, 465, 360, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
GUICtrlCreateGroup("6. Objektivität / Fairness 6 ", 510, 610, 400, 200)
$radio61 = GUICtrlCreateRadio("1", $left_s2 + 00, $top_3, 30, 20, $WS_GROUP)
$radio62 = GUICtrlCreateRadio("2", $left_s2 + 30, $top_3, 30, 20)
$radio63 = GUICtrlCreateRadio("3", $left_s2 + 60, $top_3, 30, 20)
$radio64 = GUICtrlCreateRadio("4", $left_s2 + 90, $top_3, 30, 20)
$radio65 = GUICtrlCreateRadio("5", $left_s2 + 120,$top_3, 30, 20)
$radio66 = GUICtrlCreateRadio("6", $left_s2 + 150,$top_3, 30, 20)
$edit61 = GUICtrlCreateEdit("", 530, 690, 360, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group
$Button_1 = GUICtrlCreateButton("Formular Absenden",@DesktopWidth * (50 /100) -50,900,130,30, 0x0C00)
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
[/autoit] [autoit][/autoit] [autoit]Case $GUI_EVENT_CLOSE
Exit
Case $TL_Combo
[/autoit] [autoit][/autoit] [autoit]Case $Button_1
$wert1 = GUICtrlRead($TL_Combo)
_radio_edit($radio11, $radio12, $radio13, $radio14, $radio15, $radio16, $edit11)
[/autoit] [autoit][/autoit] [autoit]$f1 = $x & "|" & $wert_edit
;_radio_edit($radio21, $radio22, $radio23, $radio24, $radio25, $radio26, $edit21)
;MsgBox(0,"",$x & @CRLF & $wert_edit)
;$f2 = $x & "|" & $wert_edit
;_radio_edit($radio31, $radio32, $radio33, $radio34, $radio35, $radio36, $edit31)
;MsgBox(0,"",$x & @CRLF & $wert_edit)
;$f3 = $x & "|" & $wert_edit
;MsgBox(0,"",$wert1 & @crlf & $f1 & @CRLF & $f2 & @CRLF & $f3)
EndSwitch
WEnd
Func _radio_edit($radio_x1,$radio_x2, $radio_x3 , $radio_x4, $radio_x5, $radio_x6, $edit_x)
[/autoit] [autoit][/autoit] [autoit]$x = ""
$wert_edit = ""
$wert_edit = GUICtrlRead($edit_x)
[/autoit] [autoit][/autoit] [autoit]; Group mit $radio1 bis $radio6
For $i = $radio_x1 To $radio_x6
If GUICtrlRead($i) = $GUI_CHECKED Then
Switch $i
Case $radio_x1
$x = 1
Case $radio_x2
$x = 2
Case $radio_x3
$x = 3
Case $radio_x4
$x = 4
Case $radio_x5
$x = 5
Case $radio_x6
$x = 6
EndSwitch
ExitLoop
EndIf
Next
Return $x & $wert_edit
[/autoit] [autoit][/autoit] [autoit]EndFunc
[/autoit]Danke
Gruß gmmg