Hi Leute,
also ich hab erst vor kurzem mit dem scripten angefangen und bin deswegen noch ziemlich neu in dem gebiet.
nun zum problem ich wollte zum anfang mal mit was einfachen anfangen also mit nem einfachen rechner der +, -, *, / rechnen kann
hab jetzt folgendes problem, ich wollte es so machen das ich per taste im rechner eine zahl ins eingabefeld setze also ohne tastatur nur bekomm ich es irgendwie nicht hin bitte um hilfe.
hier der script wie er bis jetzt aussieht
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 439, 305, 189, 123)
$Input1 = GUICtrlCreateInput("Zahl1", 24, 16, 409, 21)
$Input2 = GUICtrlCreateInput("Zahl2", 24, 56, 409, 21)
$Button1 = GUICtrlCreateButton("Addieren", 24, 104, 409, 33, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Subtrahieren", 24, 152, 409, 33, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Dividieren", 24, 200, 409, 33, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Multiplizieren", 24, 248, 409, 33, $WS_GROUP)
$Pic1 = GUICtrlCreatePic("C:\Dokumente und Einstellungen\Admin\Eigene Dateien\Eigene Bilder\BFBC2wallpaper.jpg", 0, 0, 457, 321, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Zahl1 = GUICtrlRead ($input1)
$Zahl2 = GUICtrlRead ($input2)
$Ergebnis = $Zahl1 + $Zahl2
MsgBox (0, "ergebniss", $Ergebnis)
Case $Button2
$Zahl1 = GUICtrlRead ($input1)
$Zahl2 = GUICtrlRead ($input2)
$Ergebnis = $Zahl1 - $Zahl2
MsgBox (0, "ergebniss", $Ergebnis)
Case $Button3
$Zahl1 = GUICtrlRead ($input1)
$Zahl2 = GUICtrlRead ($input2)
$Ergebnis = $Zahl1 / $Zahl2
MsgBox (0, "ergebniss", $Ergebnis)
Case $Button4
$Zahl1 = GUICtrlRead ($input1)
$Zahl2 = GUICtrlRead ($input2)
$Ergebnis = $Zahl1 * $Zahl2
MsgBox (0, "ergebniss", $Ergebnis)
EndSwitch
WEnd