Hallo alle Zusammen!
Ich wollte mich mal mit der Checkbox befassen und peer erklärung von Kamin das man denn Skript kürzer gestahlten kann. Nun mein Problem wie man sieht ist in der Checkbox ein mal der MSPaint und beim anderen Notepad eingetragen sind, meine genaue Frage ist die wie bekomme ich es hin das ich auch denn Notepad.exe so wie es bei Mspaint schon ist mit einbaue. Muss ich ein 2 DIM erstellen.????
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Dim $Checkbox[2]
$Form1 = GUICreate("Form1", 450, 178, 251, 139)
$Start = GUICtrlCreateButton("Start", 304, 120, 137, 49)
$Alle = GUICtrlCreateButton(" Alle Auswählen", 152, 120, 137, 49)
$kein = GUICtrlCreateButton("Keine Auswahl", 8, 120, 137, 49)
$Checkbox[0] = GUICtrlCreateCheckbox("Paint", 10, 39, 121, 25)
GUICtrlSetFont(-1, 12, 400, 0, "arial")
$Checkbox[1] = GUICtrlCreateCheckbox("Notepad", 10, 80, 121, 25)
GUICtrlSetFont(-1, 12, 400, 0, "arial")
$Label1 = GUICtrlCreateLabel("Checkbox test", 123, 10, 191, 36)
GUICtrlSetFont(-1, 20, 800, 0, "arial")
GUICtrlSetColor(-1, 0x006AB9)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
For $i = 0 To 1
If GUICtrlRead($Checkbox[$i]) = $GUI_CHECKED Then RunWait ('mspaint.exe')
Next
Case $Alle
For $i = 0 To 1
GUICtrlSetState($Checkbox[$i], $GUI_CHECKED)
Next
Case $kein
For $i = 0 To 1
GUICtrlSetState($Checkbox[$i], $GUI_UNCHECKED)
Next
EndSwitch
WEnd
Danke schon mal im vorraus.
MfG
Baron