hallo leute ![]()
also ich benutzte den koda form designer um meine oberfläche schön zu gestalten...
ich habe eine gleichung und möchte dahinter das ergebniss haben...das ergebniss soll erscheinen,wenn man auf einen button drückt.
ich möchte als keine msgbox dafür sondern er soll in der gleichen öberfläche sein wie der rest...also es soll quasi dazu erscheinen wenn man den button drückt soll das ergebniss erscheinen... leider habe ich aber keine funktion gefunden wie das möglich ist.
bitte um hilfe ![]()
Koda Form Designer mit Variablen?
-
patiii -
13. Juli 2011 um 16:50 -
Geschlossen -
Erledigt
-
-
1.) Skript posten!
2.) Execute()
DFPWare
-
hi danke schonmal...
wie geht das denn mit execute?das is das skript
#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", 935, 216, 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", 656, 19, 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")
$GO = GUICtrlCreateButton("GO", 840, 16, 65, 49)
$a = GUICtrlCreateLabel("a", 136, 23, 22, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$v = GUICtrlCreateLabel("v", 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("c", 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("a", 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("c", 432, 93, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label6 = GUICtrlCreateLabel("v", 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("a", 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("v", 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("c", 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", 656, 84, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label15 = GUICtrlCreateLabel("z", 656, 147, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label16 = GUICtrlCreateLabel("c", 704, 21, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label17 = GUICtrlCreateLabel("c", 704, 85, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label18 = GUICtrlCreateLabel("c", 704, 149, 20, 41)
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
ExitEndSwitch
WEndund da soll hinter den gleichungen stehen x = und dann wenn man auf den button drückt soll dahinter das errechnete ergbeniss erscheinen...
EDIT:man muss dazu sagen dass a und c für + steht und c für = das ging i-wie in koda nicht muss man manuell machen -
Ich denke du solltest erstmal die Buchstaben im Skript durch die Zeichen +-= usw. ersetzen

DFPWare
-
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [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", 935, 216, 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", 656, 19, 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")
$GO = GUICtrlCreateButton("Start", 840, 16, 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", 656, 84, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label15 = GUICtrlCreateLabel("z", 656, 147, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label16 = GUICtrlCreateLabel("=", 704, 21, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label17 = GUICtrlCreateLabel("=", 704, 85, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label18 = GUICtrlCreateLabel("=", 704, 149, 20, 41)
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 $GO
$xKoordinate1 = GUICtrlRead($Input1)
$yKoordinate1 = GUICtrlRead($Input2)
$zKoordinate1 = GUICtrlRead($Input3)
$Ergebniss1 = GUICtrlRead($Input4)$xKoordinate2 = GUICtrlRead($Input5)
[/autoit] [autoit][/autoit] [autoit]
$yKoordinate2 = GUICtrlRead($Input6)
$zKoordinate2 = GUICtrlRead($Input7)
$Ergebniss2 = GUICtrlRead($Input8)$xKoordinate3 = GUICtrlRead($Input9)
[/autoit] [autoit][/autoit] [autoit]
$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!")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
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
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 / $x1
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1$x1 = $x1 * (-1) * $x2
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 *(-1) * $x2
$z1 = $z1 *(-1) * $x2
$e1 = $e1 * (-1) * $x2$x2 = $x1 + $x2
[/autoit] [autoit][/autoit] [autoit]
$y2 = $y1 + $y2
$z2 = $z1 + $z2
$e2 = $e1 + $e2$y1 = $y1 / $x1
[/autoit] [autoit][/autoit] [autoit]
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1$x1 = $x1 * (-1) * $x3
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 *(-1) * $x3
$z1 = $z1 *(-1) * $x3
$e1 = $e1 * (-1) * $x3$x3 = $x1 + $x3
[/autoit] [autoit][/autoit] [autoit]
$y3 = $y1 + $y3
$z3 = $z1 + $z3
$e3 = $e1 + $e3$y1 = $y1 / $x1
[/autoit] [autoit][/autoit] [autoit]
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1$z2 = $z2 / $y2
[/autoit] [autoit][/autoit] [autoit]
$e2 = $e2 / $y2
$y2 = $y2 / $y2$y2 = $y2 * (-1) * $y3
[/autoit] [autoit][/autoit] [autoit]
$z2 = $z2 * (-1) * $y3
$e2 = $e2 * (-1) * $y3$x3 = $x2 + $x3
[/autoit] [autoit][/autoit] [autoit]
$y3 = $y2 + $y3
$z3 = $z2 + $z3
$e3 = $e2 + $e3$z2 = $z2 / $y2
[/autoit] [autoit][/autoit] [autoit]
$e2 = $e2 / $y2
$y2 = $y2 / $y2$e3 = $e3 / $z3
[/autoit] [autoit][/autoit] [autoit]
$z3 = $z3 / $z3$y2 = $y2 * (-1) * $y1
[/autoit] [autoit][/autoit] [autoit]
$z2 = $z2 * (-1) * $y1
$e2 = $e2 * (-1) * $y1$x1 = $x1 + $x2
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 + $y2
$z1 = $z1 + $z2
$e1 = $e1 + $e2$z2 = $z2 / $y2
[/autoit] [autoit][/autoit] [autoit]
$e2 = $e2 / $y2
$y2 = $y2 / $y2$z3 = $z3 * (-1) * $z1
[/autoit] [autoit][/autoit] [autoit]
$e3 = $e3 * (-1) * $z1$z1 = $z1 + $z3
[/autoit] [autoit][/autoit] [autoit]
$e1 = $e1 + $e3$e3 = $e3 / $z3
[/autoit] [autoit][/autoit] [autoit]
$z3 = $z3 / $z3$z3 = $z3 * (-1) * $z2
[/autoit] [autoit][/autoit] [autoit]
$e3 = $e3 * (-1) * $z2$y2 = $y2 + $y3
[/autoit] [autoit][/autoit] [autoit]
$z2 = $z2 + $z3
$e2 = $e2 + $e3$e3 = $e3 / $z3
[/autoit] [autoit][/autoit] [autoit]
$z3 = $z3 / $z3MsgBox(0, "Werte","Der Wert von x ist " & $e1 & @CRLF & "Der Wert von y ist " & $e2 & @CRLF & "Der Wert von z ist " & $e3)
[/autoit]
EndSwitch
WEnd]
EDIT: also zur erklärung nochmal...
ich habe 3 gleichungen wenn ich auf den button drücke rechnet er die lösungen aus das sind natürlich variablen
wenn er es ausgerechnet hat soll er die lösung in der box von dem koda form designer die kösung hinschreiben (die felder sind ja noch offen) -
Spoiler!
AutoIt!
MfG, campweb
-
Ich versteh noch nicht ganz so, also soll man bei x und y was eintragen und dann kommt bei z die Summe der beiden rein oder wie?
Wofür sind dann die Labels ganz rechts??DFPWare
-
es ist etwas für den matheunterricht und ich hatte spaß daran ein programm zu programmieren dafür...
man gibt 3 gleichungen an
BSP:
3x+4y+5z=10
5x+5y+8z=20
8x+9y+7z=12so und wenn ich auf den button drücke rechnet er mir x,y und z aus
und dann ganz am rand soll dann stehen x= Lösung y=Lösung und z=Lösung
die lösungen rechnet er dann aus in meinem fall $e1=x $e2=y und $e3=z
so und ich will jetzt diese 3 variablen oben einfügen sodass dann ganz rechts steht x= und dann der wert von $e1
und so weiter... -
Puh das weiß ich wirklich nicht, aber rechnen kannst du mit Execute() und Sachen in ein Label schreiben mit GuiCtrlSetData()
DFPWare
-
Du könntest ja mit einer Matrix arbeiten...
Es gibt bereits Funktionen für lineare Gleichunglösung, du kannst ja mal die Forensuche und/oder Google quälen ;). Vielleicht hilft dir davon was auf die Sprünge, aber einfach ist das für einen Anfänger wohl eher nicht.
Ich kann dir aber mit Sicherheit sagen, so einfach wie du dir das hier vorstellst ist es definitiv nicht. -
um mal auf GuiCtrlSetData zurückzukommen...
aus den beispielen wurde ich nciht ganz schlau aber ist es richtig dass ich also als ergebniss ein label machen kann und mit der funktion dann den label ändern kann?
also dann so wie meine variable dann ist das der label den wert hat?
mfg patiii
-
Zitat
aus den beispielen wurde ich nciht ganz schlau aber ist es richtig dass ich also als ergebniss ein label machen kann und mit der funktion dann den label ändern kann?
also dann so wie meine variable dann ist das der label den wert hat?
Ja, GUICtrlSetData verändert den Inhalt diverser Controls, unter anderem den Text eines LabelControls.
Wenn du diese Beispiele nicht verstehst, fürchte ich, dass du dich mit deinem momentanen Vorhaben ein wenig übernimmst. Es sei denn du verwendest fertige Funktionen. -
Spoiler anzeigen
[autoit][/autoit] [autoit][/autoit] [autoit]#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#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", 935, 216, 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", 656, 19, 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")
$GO = GUICtrlCreateButton("Start", 840, 16, 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", 656, 84, 19, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label15 = GUICtrlCreateLabel("z", 656, 147, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label16 = GUICtrlCreateLabel("=", 704, 21, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label17 = GUICtrlCreateLabel("=", 704, 85, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$Label18 = GUICtrlCreateLabel("=", 704, 149, 20, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$DasErgebniss = GUICtrlCreateLabel("DasErgebniss", 760, 32, 69, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GO
$xKoordinate1 = GUICtrlRead($Input1)
$yKoordinate1 = GUICtrlRead($Input2)
$zKoordinate1 = GUICtrlRead($Input3)
$Ergebniss1 = GUICtrlRead($Input4)$xKoordinate2 = GUICtrlRead($Input5)
[/autoit] [autoit][/autoit] [autoit]
$yKoordinate2 = GUICtrlRead($Input6)
$zKoordinate2 = GUICtrlRead($Input7)
$Ergebniss2 = GUICtrlRead($Input8)$xKoordinate3 = GUICtrlRead($Input9)
[/autoit] [autoit][/autoit] [autoit]
$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!")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
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
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 / $x1
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1$x1 = $x1 * (-1) * $x2
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 *(-1) * $x2
$z1 = $z1 *(-1) * $x2
$e1 = $e1 * (-1) * $x2$x2 = $x1 + $x2
[/autoit] [autoit][/autoit] [autoit]
$y2 = $y1 + $y2
$z2 = $z1 + $z2
$e2 = $e1 + $e2$y1 = $y1 / $x1
[/autoit] [autoit][/autoit] [autoit]
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1$x1 = $x1 * (-1) * $x3
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 *(-1) * $x3
$z1 = $z1 *(-1) * $x3
$e1 = $e1 * (-1) * $x3$x3 = $x1 + $x3
[/autoit] [autoit][/autoit] [autoit]
$y3 = $y1 + $y3
$z3 = $z1 + $z3
$e3 = $e1 + $e3$y1 = $y1 / $x1
[/autoit] [autoit][/autoit] [autoit]
$z1 = $z1 / $x1
$e1 = $e1 / $x1
$x1 = $x1 / $x1$z2 = $z2 / $y2
[/autoit] [autoit][/autoit] [autoit]
$e2 = $e2 / $y2
$y2 = $y2 / $y2$y2 = $y2 * (-1) * $y3
[/autoit] [autoit][/autoit] [autoit]
$z2 = $z2 * (-1) * $y3
$e2 = $e2 * (-1) * $y3$x3 = $x2 + $x3
[/autoit] [autoit][/autoit] [autoit]
$y3 = $y2 + $y3
$z3 = $z2 + $z3
$e3 = $e2 + $e3$z2 = $z2 / $y2
[/autoit] [autoit][/autoit] [autoit]
$e2 = $e2 / $y2
$y2 = $y2 / $y2$e3 = $e3 / $z3
[/autoit] [autoit][/autoit] [autoit]
$z3 = $z3 / $z3$y2 = $y2 * (-1) * $y1
[/autoit] [autoit][/autoit] [autoit]
$z2 = $z2 * (-1) * $y1
$e2 = $e2 * (-1) * $y1$x1 = $x1 + $x2
[/autoit] [autoit][/autoit] [autoit]
$y1 = $y1 + $y2
$z1 = $z1 + $z2
$e1 = $e1 + $e2$z2 = $z2 / $y2
[/autoit] [autoit][/autoit] [autoit]
$e2 = $e2 / $y2
$y2 = $y2 / $y2$z3 = $z3 * (-1) * $z1
[/autoit] [autoit][/autoit] [autoit]
$e3 = $e3 * (-1) * $z1$z1 = $z1 + $z3
[/autoit] [autoit][/autoit] [autoit]
$e1 = $e1 + $e3$e3 = $e3 / $z3
[/autoit] [autoit][/autoit] [autoit]
$z3 = $z3 / $z3$z3 = $z3 * (-1) * $z2
[/autoit] [autoit][/autoit] [autoit]
$e3 = $e3 * (-1) * $z2$y2 = $y2 + $y3
[/autoit] [autoit][/autoit] [autoit]
$z2 = $z2 + $z3
$e2 = $e2 + $e3$e3 = $e3 / $z3
[/autoit] [autoit][/autoit] [autoit]
$z3 = $z3 / $z3MsgBox(0, "Werte","Der Wert von x ist " & $e1 & @CRLF & "Der Wert von y ist " & $e2 & @CRLF & "Der Wert von z ist " & $e3)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
ExitEndSwitch
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]
WEndalso ich hab jetzt noch ein label hinzugeführ nämlich "DasErgebniss"
könntest du mir das vllt so programmieren,dass "DasErgebniss" dann nach dem ablauf der rechnung durch $e1 ersetzt wird? wäre das möglich
dann würd ich mal gucken ob das klappt und dann versuchen es zu verstehen
-
So?
[autoit]
GUICtrlSetData($DasErgebniss, $e1)
[/autoit] -
achsoo so einfach is das...
das ist genau das was ich wollte
mein problem ist damit gelöst
herzlichen dank für die hilfe