|
You last visited: Today at 04:55
Advertisement
[HELP]Taschenrechner
Discussion on [HELP]Taschenrechner within the AutoIt forum part of the Coders Den category.
03/09/2011, 20:44
|
#1
|
elite*gold: 227
Join Date: Jun 2010
Posts: 295
Received Thanks: 37
|
[HELP]Taschenrechner
Also ich wollte nen kleinen Taschenrechner Skripten. Hab jz ein Problem.
Undzwar soll in die hinterste Inputbox der Zeile das Ergebnis angezeigt werden. Wie kann ich das machen?
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
;----------------------------------------------------GUI---------------------------------------
$Form1 = GUICreate("Taschenrechner", 843, 507, 192, 132)
$Button1 = GUICtrlCreateButton("Rechnen", 400, 56, 209, 57, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Button2 = GUICtrlCreateButton("Rechnen", 400, 144, 209, 65, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Button3 = GUICtrlCreateButton("Rechnen", 400, 232, 209, 65, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Button4 = GUICtrlCreateButton("Rechnen", 400, 328, 209, 65, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Input3 = GUICtrlCreateInput("", 656, 72, 169, 24)
$Input2 = GUICtrlCreateInput("", 224, 72, 153, 24)
$Input1 = GUICtrlCreateInput("", 16, 72, 137, 24)
$Label1 = GUICtrlCreateLabel(" +", 160, 72, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
$Label2 = GUICtrlCreateLabel(" -", 160, 160, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
$Input4 = GUICtrlCreateInput("", 16, 160, 137, 24)
$Input5 = GUICtrlCreateInput("", 224, 160, 153, 24)
$Input6 = GUICtrlCreateInput("", 656, 168, 169, 24)
$Label3 = GUICtrlCreateLabel(" x", 160, 256, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
$Input8 = GUICtrlCreateInput("", 224, 256, 153, 24)
$Input7 = GUICtrlCreateInput("", 16, 256, 137, 24)
$Input9 = GUICtrlCreateInput("", 656, 256, 169, 24)
$Input10 = GUICtrlCreateInput("", 16, 344, 137, 24)
$Input11 = GUICtrlCreateInput("", 224, 344, 153, 24)
$Label4 = GUICtrlCreateLabel(" /", 160, 344, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
$Input12 = GUICtrlCreateInput("", 656, 352, 169, 24)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;------------------------------------------------------------------Funktionen----------------------
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_plus()
Case $Button2
_minus()
Case $Button3
_mal()
Case $Button4
_geteilt()
EndSwitch
WEnd
Func _plus()
$zahl1 = $Input3
$zahl2 = $Input2
$Input1 = $zahl1 + $zahl2
EndFunc
Func _minus()
$zahl3 = $Input4
$zahl4 = $Input5
$Input6 = $zahl3 - $zahl4
EndFunc
Func _mal()
$zahl5 = $Input8
$zahl6 = $Input7
$Input9 = $zahl5 * $zahl6
EndFunc
Func _geteilt()
$zahl7 = $Input10
$zahl8 = $Input11
$Input12 = $zahl7 / $zahl8
EndFunc
Exit
|
|
|
03/09/2011, 21:07
|
#2
|
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
|
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
;----------------------------------------------------GUI---------------------------------------
$Form1 = GUICreate("Taschenrechner", 843, 507, 192, 132)
$Button1 = GUICtrlCreateButton("Rechnen", 400, 56, 209, 57, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Button2 = GUICtrlCreateButton("Rechnen", 400, 144, 209, 65, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Button3 = GUICtrlCreateButton("Rechnen", 400, 232, 209, 65, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Button4 = GUICtrlCreateButton("Rechnen", 400, 328, 209, 65, $WS_GROUP)
GUICtrlSetFont(-1, 14, 800, 0, "Mael")
$Input1 = GUICtrlCreateInput("", 16, 72, 137, 24)
$Input2 = GUICtrlCreateInput("", 224, 72, 153, 24)
$Input3 = GUICtrlCreateInput("", 656, 72, 169, 24)
$Label1 = GUICtrlCreateLabel(" +", 160, 72, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
$Label2 = GUICtrlCreateLabel(" -", 160, 160, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
$Input4 = GUICtrlCreateInput("", 16, 160, 137, 24)
$Input5 = GUICtrlCreateInput("", 224, 160, 153, 24)
$Input6 = GUICtrlCreateInput("", 656, 168, 169, 24)
$Label3 = GUICtrlCreateLabel(" x", 160, 256, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
$Input7 = GUICtrlCreateInput("", 16, 256, 137, 24)
$Input8 = GUICtrlCreateInput("", 224, 256, 153, 24)
$Input9 = GUICtrlCreateInput("", 656, 256, 169, 24)
$Input10 = GUICtrlCreateInput("", 16, 344, 137, 24)
$Input11 = GUICtrlCreateInput("", 224, 344, 153, 24)
$Input12 = GUICtrlCreateInput("", 656, 352, 169, 24)
$Label4 = GUICtrlCreateLabel(" /", 160, 344, 67, 26)
GUICtrlSetFont(-1, 11, 800, 0, "Lucida Sans Unicode")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;------------------------------------------------------------------Funktionen----------------------
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Input3, GUICtrlRead($Input1) + GUICtrlRead($Input2))
Case $Button2
GUICtrlSetData($Input6, GUICtrlRead($Input4) - GUICtrlRead($Input5))
Case $Button3
GUICtrlSetData($Input9, GUICtrlRead($Input7) * GUICtrlRead($Input8))
Case $Button4
GUICtrlSetData($Input12, GUICtrlRead($Input10) / GUICtrlRead($Input11))
EndSwitch
WEnd
|
|
|
03/09/2011, 21:24
|
#3
|
elite*gold: 227
Join Date: Jun 2010
Posts: 295
Received Thanks: 37
|
Und wenn ich ein Multitool mache, und will, dass wenn ich auf nen button drücke, sich dieser Taschenrechner öffnet, ohne Run und Shellexecute also nur 1 Source
|
|
|
 |
Similar Threads
|
Gleichheitszeichen für Taschenrechner ! (FX-86DE PLUS)
12/21/2010 - Off Topic - 3 Replies
Ich hab mir heute einen neuen Taschenrechner gekauft jetzt weis ich nicht wo das Gleichheitszeichen ist für z.B diese Aufgabe a+b = b+a
Mit Gleichheitszeichen ist nicht die Taste gaaanz unten rechts gemeint :p
|
C++ brauche Hilfe bei Taschenrechner
10/17/2010 - C/C++ - 21 Replies
Hi,
ich habe versucht in c++ einen Taschenrechner zu programmieren.
Soweit so gut wie es dann bei sowas fast immer ist, wenn man es das erste Mal macht , es geht nicht :(.
Ich weiß einfach nicht woran es liegen kann hier ma mein code:
#include<iostream>
using namespace std;
int main()
{
int plus=1;
|
[VB.Net] Der kleine Taschenrechner
05/30/2010 - Coding Tutorials - 3 Replies
Hallo Elitepvpers!
Heute zeige ich euch wie ihr mit der Programmiersprache Visual Basic 2008 einen kleinen Taschrechner programmieren könnt! So lasst uns anfangen!
Zuerst sollte man ein neues Projekt erstellen, mit dem Namen Grundrechenarten. SO wenn ihr nun die Form vor euch habt, macht folgendes :
Eine GroupBox in die Form ziehen
In diese GroupBox zieht ihr 4 RadioButtons
Diese Benennt ihr wie folgt :
Addition(+)
|
Taschenrechner Coden
12/16/2009 - General Coding - 5 Replies
Hallo Com
Es ist mir ein wenig peinlich aber ich habe ein Problem.
Ich habe nun mit dem Coden bei Visual Basic begonnen. Mein erstes Projekt ist ein Taschenrechner :rolleyes:
Ich habe das Design fertig gemacht aber bei dem Coden stecke ich fest :rolleyes:
Ich wollte fragen ob mir einer Helfen könnte :)
Hier:
Was hab ich da Falsch gemacht? Was falsches eingestellt?
Ich benutze das Programm Microsoft Visual Basic 2008 Express Edition.
|
[Hilfe] Nen AutoIt Taschenrechner
08/10/2009 - AutoIt - 5 Replies
Also ich habe mir nen taschenrechner mit autoit gemacht leider kann er nur PLUS rechnen xD siehe hier : kostenlos Dateien hochladen bei File Upload X
und ich wollte mal fragen ob er auch minus rechnen kann und mal und geteil ^^ weil ich habe die 3 sachen schon ausprobiert wie : - ( minus rechnen ) und so aber das macht er nicht ?? muss ich andere zeichen verwenden ?? wenn ja bitte postet die hier mal !! DANKE
p.s. ich spiele erst seid gestern mit autoit rum also nicht böse sein wenn ich...
|
All times are GMT +1. The time now is 04:55.
|
|