hey leute,
ich hoffe ihr könnt mir diesesmal wieder helfen ![]()
also ich habe eine rechenoperation die ich durchführe
um zu zeigen was schritt für schritt dabei gerechnet wird will ich dem benutzer zeigen was der computer rechnet
ich habe mehrere variablen die den wert enthalten (am ende halt die lösung) und will die variable ausgeben
sie ändert sich aber ständig
so nun mein problem
ich habe z.b. 1 + 1 = $a
jetzt will ich $a ausgeben
und danach ändert sich a weiter weil damit gerechnet wird
ausgegeben soll es aber in einer weitern koda designer box die sich öffnet wenn man auf einen anderen button drückt
[spoiler]
[autoit]
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\patrick becker\desktop\form2.kxf
$Form1_1 = GUICreate("Form1", 688, 423, 222, 124)
$Input1 = GUICtrlCreateInput("", 8, 16, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input2 = GUICtrlCreateInput("", 160, 16, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input3 = GUICtrlCreateInput("", 304, 16, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input4 = GUICtrlCreateInput("", 456, 16, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input5 = GUICtrlCreateInput("", 9, 80, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input6 = GUICtrlCreateInput("", 160, 80, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input7 = GUICtrlCreateInput("", 304, 80, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input8 = GUICtrlCreateInput("", 456, 80, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input9 = GUICtrlCreateInput("", 10, 144, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input10 = GUICtrlCreateInput("", 160, 144, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input11 = GUICtrlCreateInput("", 304, 144, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Input12 = GUICtrlCreateInput("", 456, 144, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$x = GUICtrlCreateLabel("x", 24, 227, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$y = GUICtrlCreateLabel("y", 248, 20, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Start = GUICtrlCreateButton("Start", 584, 16, 65, 49)
$Hilfe = GUICtrlCreateButton("Hilfe", 584, 80, 65, 49)
$a = GUICtrlCreateLabel("+", 136, 23, 22, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$v = GUICtrlCreateLabel("+", 280, 24, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$z = GUICtrlCreateLabel("z", 400, 19, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$c = GUICtrlCreateLabel("=", 432, 21, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("x", 104, 83, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("+", 136, 86, 22, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("y", 248, 84, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("z", 400, 91, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("=", 432, 93, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label6 = GUICtrlCreateLabel("+", 279, 85, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label7 = GUICtrlCreateLabel("x", 104, 147, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label8 = GUICtrlCreateLabel("+", 136, 149, 22, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label9 = GUICtrlCreateLabel("y", 248, 148, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label10 = GUICtrlCreateLabel("+", 279, 150, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label11 = GUICtrlCreateLabel("z", 400, 147, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label12 = GUICtrlCreateLabel("=", 432, 149, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label13 = GUICtrlCreateLabel("x", 103, 23, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label14 = GUICtrlCreateLabel("y", 24, 292, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label15 = GUICtrlCreateLabel("z", 22, 355, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label16 = GUICtrlCreateLabel("=", 72, 229, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label17 = GUICtrlCreateLabel("=", 72, 301, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label18 = GUICtrlCreateLabel("=", 72, 357, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$ErgebnissX = GUICtrlCreateLabel("", 120, 232, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$ErgebnissY = GUICtrlCreateLabel("", 120, 296, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$ErgebnissZ = GUICtrlCreateLabel("", 120, 360, 81, 45)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
$xKoordinate1 = GUICtrlRead($Input1)
$yKoordinate1 = GUICtrlRead($Input2)
$zKoordinate1 = GUICtrlRead($Input3)
$Ergebniss1 = GUICtrlRead($Input4)
$xKoordinate2 = GUICtrlRead($Input5)
$yKoordinate2 = GUICtrlRead($Input6)
$zKoordinate2 = GUICtrlRead($Input7)
$Ergebniss2 = GUICtrlRead($Input8)
$xKoordinate3 = GUICtrlRead($Input9)
$yKoordinate3 = GUICtrlRead($Input10)
$zKoordinate3 = GUICtrlRead($Input11)
$Ergebniss3 = GUICtrlRead($Input12)
If $xKoordinate1 = 0 Then MsgBox(0, "Information","Die erste x-Koordinate darf nicht Null sein , da man sonst durch Null teilt!")
If $xKoordinate1 = 0 Then Exit
$x1 = $xKoordinate1
$x2 = $xKoordinate2
$x3 = $xKoordinate3
$y1 = $yKoordinate1
$y2 = $yKoordinate2
$y3 = $yKoordinate3
$z1 = $zKoordinate1
$z2 = $zKoordinate2
$z3 = $zKoordinate3
$e1 = $Ergebniss1
$e2 = $Ergebniss2
$e3 = $Ergebniss3
$y1 = $y1 / $x1
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1
$x1 = $x1 * (-1) * $x2
$y1 = $y1 *(-1) * $x2
$z1 = $z1 *(-1) * $x2
$e1 = $e1 * (-1) * $x2
$x2 = $x1 + $x2
$y2 = $y1 + $y2
$z2 = $z1 + $z2
$e2 = $e1 + $e2
$y1 = $y1 / $x1
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1
$x1 = $x1 * (-1) * $x3
$y1 = $y1 *(-1) * $x3
$z1 = $z1 *(-1) * $x3
$e1 = $e1 * (-1) * $x3
$x3 = $x1 + $x3
$y3 = $y1 + $y3
$z3 = $z1 + $z3
$e3 = $e1 + $e3
$y1 = $y1 / $x1
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1
$z2 = $z2 / $y2
$e2 = $e2 / $y2
$y2 = $y2 / $y2
$y2 = $y2 * (-1) * $y3
$z2 = $z2 * (-1) * $y3
$e2 = $e2 * (-1) * $y3
$x3 = $x2 + $x3
$y3 = $y2 + $y3
$z3 = $z2 + $z3
$e3 = $e2 + $e3
$z2 = $z2 / $y2
$e2 = $e2 / $y2
$y2 = $y2 / $y2
$e3 = $e3 / $z3
$z3 = $z3 / $z3
$y2 = $y2 * (-1) * $y1
$z2 = $z2 * (-1) * $y1
$e2 = $e2 * (-1) * $y1
$x1 = $x1 + $x2
$y1 = $y1 + $y2
$z1 = $z1 + $z2
$e1 = $e1 + $e2
$z2 = $z2 / $y2
$e2 = $e2 / $y2
$y2 = $y2 / $y2
$z3 = $z3 * (-1) * $z1
$e3 = $e3 * (-1) * $z1
$z1 = $z1 + $z3
$e1 = $e1 + $e3
$e3 = $e3 / $z3
$z3 = $z3 / $z3
$z3 = $z3 * (-1) * $z2
$e3 = $e3 * (-1) * $z2
$y2 = $y2 + $y3
$z2 = $z2 + $z3
$e2 = $e2 + $e3
$e3 = $e3 / $z3
$z3 = $z3 / $z3
GUICtrlSetData($ErgebnissX, $e1)
GUICtrlSetData($ErgebnissY, $e2)
GUICtrlSetData($ErgebnissZ, $e3)
Case $Hilfe
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 201, 123)
$Label1 = GUICtrlCreateLabel("Label1", 72, 80, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd
[autoit]
[spoiler]
ichh offe es ist verständlich.ich will also eine variable benutzen die sich ständigt änder.sie ändert sich wenn man auf einen button drückt.aber wenn man auf einen andern button drückt soll die variable jeweils nach den verschiedenen rechenoperationen angezeigt werden
mfg patii