#include <buttonconstants.au3>
#include <editconstants.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#include <guiconstantsex.au3>
$Calcolatrice = GUICreate("Prima Calcolatrice", 318, 430, 775, 289)
GUISetBkColor(0x33ff00)
$Casella = GUICtrlCreateInput("", 16, 16, 281, 20, 0x0800)
$Button1 = GUICtrlCreateButton("1", 24, 64, 57, 41, $WS_GROUP)
$Button2 = GUICtrlCreateButton("2", 128, 64, 57, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("3", 232, 64, 57, 41, $WS_GROUP)
$Button4 = GUICtrlCreateButton("4", 24, 112, 57, 41, $WS_GROUP)
$Button5 = GUICtrlCreateButton("5", 128, 112, 57, 41, $WS_GROUP)
$Button6 = GUICtrlCreateButton("6", 232, 112, 57, 41, $WS_GROUP)
$Button7 = GUICtrlCreateButton("7", 24, 160, 57, 41, $WS_GROUP)
$Button8 = GUICtrlCreateButton("8", 128, 160, 57, 41, $WS_GROUP)
$Button9 = GUICtrlCreateButton("9", 232, 160, 57, 41, $WS_GROUP)
$Button10 = GUICtrlCreateButton("0", 128, 208, 57, 41, $WS_GROUP)
$Button11 = GUICtrlCreateButton("+", 16, 272, 57, 25, $WS_GROUP)
$Button12 = GUICtrlCreateButton("-", 88, 272, 57, 25, $WS_GROUP)
$Button13 = GUICtrlCreateButton("x", 160, 272, 57, 25, $WS_GROUP)
$Button14 = GUICtrlCreateButton("/", 240, 272, 57, 25, $WS_GROUP)
$Button15 = GUICtrlCreateButton("=", 16, 376, 281, 25, $WS_GROUP)
$Button16 = GUICtrlCreateButton(".", 232, 208, 57, 41, $WS_GROUP)
$Button17 = GUICtrlCreateButton("AC", 160, 304, 57, 25, $WS_GROUP)
$Button18 = GUICtrlCreateButton("00", 24, 208, 57, 41, $WS_GROUP)
$Button19 = GUICtrlCreateButton("Esci", 88, 304, 57, 25, $WS_GROUP)
$Button20 = GUICtrlCreateButton("(", 16, 304, 57, 25, $WS_GROUP)
$Button21 = GUICtrlCreateButton(")", 240, 304, 57, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
While 1
$numeri = GUICtrlRead($Casella)
Switch GUIGetMsg ()
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Casella,$numeri&"1")
Case $Button2
GUICtrlSetData($Casella,$numeri&"2")
Case $Button3
GUICtrlSetData($Casella,$numeri&"3")
Case $Button4
GUICtrlSetData($Casella,$numeri&"4")
Case $Button5
GUICtrlSetData($Casella,$numeri&"5")
Case $Button6
GUICtrlSetData($Casella,$numeri&"6")
Case $Button7
GUICtrlSetData($Casella,$numeri&"7")
Case $Button8
GUICtrlSetData($Casella,$numeri&"8")
Case $Button9
GUICtrlSetData($Casella,$numeri&"9")
Case $Button10
GUICtrlSetData($Casella,$numeri&"0")
Case $Button12
GUICtrlSetData($Casella,$numeri&"-")
Case $Button11
GUICtrlSetData($Casella,$numeri&"+")
Case $Button14
GUICtrlSetData($Casella,$numeri&"/")
Case $Button13
GUICtrlSetData($Casella,$numeri&"*")
Case $Button16
GUICtrlSetData($Casella,$numeri&".")
Case $Button17
GUICtrlSetData($Casella, "")
Case $Button18
GUICtrlSetData($Casella,$numeri&"00")
Case $Button20
GUICtrlSetData($Casella,$numeri&"(")
Case $Button21
GUICtrlSetData($Casella,$numeri&")")
Case $Button19
Exit
Case $Button15
$Ris = Execute($numeri)
GUICtrlSetData ($Casella,$Ris)
EndSwitch
WEnd
Questa versione è munita anche di parentesi rotonde xD e non si può scrivere nell'Imput box