Volevo fare un programma x la sQuola, che calcoli l'errore di un tot di misure...
Vorrei però che nel primo form si scelga il numero di misure e in base alla risposta si apra un nuovo form.
CODICE
#include <GUIConstants.au3>
$Form1 = GUICreate("Numero Dati", 244, 253, 271, 260)
GUISetBkColor(0x000000)
$testo = GUICtrlCreateLabel("Numero di misure fatte", 16, 8, 217, 32)
GUICtrlSetFont(-1, 16, 800, 2, "Palatino Linotype")
GUICtrlSetColor(-1, 0x00FF00)
$Button2 = GUICtrlCreateButton("2", 16, 48, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button3 = GUICtrlCreateButton("3", 72, 48, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button4 = GUICtrlCreateButton("4", 128, 48, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button5 = GUICtrlCreateButton("5", 184, 48, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button6 = GUICtrlCreateButton("6", 16, 88, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button7 = GUICtrlCreateButton("7", 72, 88, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button8 = GUICtrlCreateButton("8", 128, 88, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button9 = GUICtrlCreateButton("9", 184, 88, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button10 = GUICtrlCreateButton("10", 16, 128, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button11 = GUICtrlCreateButton("11", 72, 128, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button12 = GUICtrlCreateButton("12", 128, 128, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button13 = GUICtrlCreateButton("13", 184, 128, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button14 = GUICtrlCreateButton("14", 16, 168, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button15 = GUICtrlCreateButton("15", 72, 168, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button16 = GUICtrlCreateButton("16", 128, 168, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button17 = GUICtrlCreateButton("17", 184, 168, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button18 = GUICtrlCreateButton("18", 48, 208, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button19 = GUICtrlCreateButton("19", 104, 208, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
$Button20 = GUICtrlCreateButton("20", 160, 208, 41, 33, 0)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $nMsg = $button2
$Form2 = GUICreate("Errore Assoluto", 279, 283, 202, 181)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("Calcolo Dell' Errore Assoluto", 16, 8, 251, 28)
GUICtrlSetFont(-1, 16, 400, 0, "Modern No. 20")
GUICtrlSetColor(-1, 0x0000FF)
$Label2 = GUICtrlCreateLabel("Inserisci i dati", 80, 40, 99, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFF00)
$Dato1 = GUICtrlCreateInput("", 32, 72, 73, 21)
GUICtrlSetCursor (-1, 5)
$Dato2 = GUICtrlCreateInput("", 168, 72, 73, 21)
GUICtrlSetCursor (-1, 5)
$errore = GUICtrlCreateLabel("Errore assoluto", 64, 168, 149, 32)
GUICtrlSetFont(-1, 18, 800, 2, "Monotype Corsiva")
GUICtrlSetColor(-1, 0xFF0000)
$calcola = GUICtrlCreateButton("Calcola", 88, 112, 105, 41, 0)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
GUICtrlSetCursor (-1, 0)
$fine = GUICtrlCreateInput("", 48, 200, 177, 24)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
EndSelect
WEnd
Non so se fin qui è sbagliato, ma non riesco a continuare...
Praticamente una volta cliccato sul tasto "2" dovrebbe creare un altro form dove si inseriscono due dati e calcoli l' errore.