Hallo,
ich fange gleich mal an:
Das ist die Fehlermeldung etc.
"C:\Program Files (x86)\AutoIt3" /UserParams
+>19:49:29 Starting AutoIt3Wrapper v.2.0.0.1 Environment(Language:0407 Keyboard:00000407 OS:WIN_VISTA/ CPU:X64 OS:X64)
>Running AU3Check (1.54.14.0) from:C:\Program Files (x86)\AutoIt3
+>19:49:29 AU3Check ended.rc:0
>Running:(3.3.0.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Robert\Desktop\AutoIT\Notendurchschnitt.au3"
C:\Users\Robert\Desktop\AutoIT\Notendurchschnitt.au3 (55) : ==> Variable used without being declared.:
$Durchschnitt = ($1 + $2*2 + $3*3 + $4*4 + $5*5 + $6*6)/($1+$2+$3+$4+$5+$6)
$Durchschnitt = (^ ERROR
->19:49:39 AutoIT3.exe ended.rc:1
+>19:49:40 AutoIt3Wrapper Finished
>Exit code: 1 Time: 11.511
Das das Programm:
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Notenwert = 0
HotKeySet ("{Enter}","Zahlen")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 167, 125, 192, 124)
$Input1 = GUICtrlCreateInput("Note 1", 24, 16, 73, 21)
;$Button1 = GUICtrlCreateButton("Ø", 24, 56, 105, 57)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func Zahlen ()
$Notenwert += 1
Select
Case $Notenwert = 1
$1 = GUICtrlRead ($Input1)
Case $Notenwert = 2
$2 = GUICtrlRead ($Input1)
Case $Notenwert = 3
$3 = GUICtrlRead ($Input1)
Case $Notenwert = 4
$4 = GUICtrlRead ($Input1)
Case $Notenwert = 5
$5 = GUICtrlRead ($Input1)
Case $Notenwert = 6
$6 = GUICtrlRead ($Input1)
EndSelect
If $Notenwert = 7 Then
$Notenwert = 0
$Durchschnitt = ($1 + $2*2 + $3*3 + $4*4 + $5*5 + $6*6)/($1+$2+$3+$4+$5+$6)
ToolTip ("Ø "&$Durchschnitt)
Sleep (2000)
EndIf
If $Notenwert = 1 Or $Notenwert = 0 Then
$Notenwert = 1
Else
GUICtrlSetData ($Input1,"Note "&$Notenwert)
EndIf
EndFunc
Und das mein Problem ;D :
Ich habe KEINE AHNUNG, was ich falsch gemacht habe und komme auch nicht drauf...
also falls einer von euch mir da vlt. auf die Sprünge helfen könnte, wäre das SEHR NETT! =)
==> Das soll den Notendurchschnitt ausrechnen,... ich glaube dafür gibt es eig. schon eine Funktion, aber ich will ja nur ein bisschen üben/Spaß haben
UND: Im Input würde man dann die Anzahl der entsprechenden Note eingeben... ihr könnt es ja mal kopieren und ausprobieren =)
Wenn man alle Noten eingegeben hat (Mit "Enter" bestätigt man diese), dann kommt der Fehler.
Ach ja und noch als Hintergrundinformation: Eig. sollte dann dieser ToolTip erscheinen... ;D
=> Das haben wir hier doch lange nicht mehr, dass jmd. einen Fehler im Programm nicht findet
Mit sehr freundlichen Grüßen
MasterRobb