Suche Ideen

  • Moin moin,
    hat jemand von euch ne gute Idee, was für ein Skript ich als Übung schreiben könnte?
    Meine Erfahrungen mit Autoit halten sich noch in Grenzen.
    Freue mich auf gute Vorschläge.
    ;) ;) ;) ;) ;) ;)

  • Durchforste doch ertsmal die Hilfe.

    Da findest du hunderte Ansätze, mit denen du als Anfänger etwas anfangen kannst ^^

    Schau erstmal so in den GUI bereich, das ist so die Hauptfunktion von AutoIt, bzw. das was am meisten benutzt wird.

  • wie wäre es mit einem kleinen spiel ?
    bsp. : Wer wird Millionär ?
    Fragen :
    -In einer Ini abspeichern
    Joker :

    • 50:50
    • Publikum
    • Anrufen

    Ich weiß nicht wie du dich mit AutoIt auskennst also weiß ich nicht ob das für dich ein angemessenes Projekt ist.
    Falls du Hilfe brauchst kannst du dich gerne melden.

    mfg nof@ker :P

  • Das hört sich ganz gut an, schätze, dass ich das hinbekomme.
    Warum soll man Daten (Fragen) in einer .ini speichern und nicht einfach in einer .txt?
    Kann man die besser auslesen?

  • Hab das mit der ini jetz kapiert... :rock:

    Nur, dass mit dem Editbutton hastu noch nich so drauf ;P

    Also ich hab mir das meißte von Autoit so beigebracht, dass ich mir einfach im deutschem und eglischem Forum die fertigen Scripte angesehen hab und dann versucht diese zu verstehen und zu verbessern..

  • Ich hab so angefangen:

    Mir die Deutsche Hilfe runtergeladen.
    Dann erstmal so über den Index geflogen.

    Dann hab ich mir etwas ausgesucht, was mir net ganz so schwer vorkam.

    Nun hab ich versucht, die fertigen Beispiel scripts aus der Hilfe zu erweitern,
    etwas neues hinzuzufügen, gucken, was man brauch und was net...

    Das hab ich dann immer so vortgesetzt...

  • So, hab mal ein bisschen angefangen, hab aber ein Problem: Wie mach ich das, dass wenn die erste Frage richtig beantwortet wurde, die Zufallsvariabel (die für die Auswhl der Frage zuständig ist) neu generiert wird? Sonst kommt ja immer wieder dieselbe Frage.
    Ach ja, so wies jetz ist, meint der immer : Wend staement has no matching while statement.

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: Frithjof

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Ein Quiz.

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    ; Script Start - Add your code below here

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $Zufall = Random(1,2,1)

    [/autoit] [autoit][/autoit] [autoit]

    $Frage = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 1, "Frage1" , "Nicht Gefunden")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $Antwort1 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 2, "Antwort1" , "Nicht Gefunden")
    $Antwort2 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 3, "Antwort2" , "Nicht Gefunden")
    $Antwort3 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 4, "Antwort3" , "Nicht Gefunden")
    $Antwort4 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 5, "Antwort4" , "Nicht Gefunden")

    [/autoit] [autoit][/autoit] [autoit]

    $richtig = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 6, "Lösung" , "Nicht Gefunden")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form= ;Grafische Oberfläche
    $Form1 = GUICreate("Wer wird Millionär", 633, 447, 193, 125)
    $Label1 = GUICtrlCreateLabel("Frage:"& $Frage, 152, 32, 316, 57)
    $Button1 = GUICtrlCreateButton($Antwort1, 144, 192, 129, 49, 0)
    $Button2 = GUICtrlCreateButton($Antwort2, 344, 192, 129, 49, 0)
    $Button3 = GUICtrlCreateButton($Antwort3, 144, 264, 129, 49, 0)
    $Button4 = GUICtrlCreateButton($Antwort4, 344, 264, 129, 49, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $nMsg <> 0
     
    EndSwitch
    Select
    Case $nMsg = $Button1
    If $richtig <> 2 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1) ;runde 1
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!")
    EndIf
     
    Case $nMsg = $Button2
    If $richtig <> 3 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1)
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!")
    EndIf
     
    Case $nMsg = $Button3
    If $richtig <> 4 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1)
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!")
    EndIf
     
    Case $nMsg = $Button4
    If $richtig <> 5 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1)
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!") ;runde 2
    EndIf

     
    EndSelect
    $Zufall = Random(1,2,1)

    [/autoit] [autoit][/autoit] [autoit]

    Select
    Case $nMsg = $Button1
    If $richtig <> 2 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1) ;runde 1
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!")
    EndIf
     
    Case $nMsg = $Button2
    If $richtig <> 3 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1)
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!")
    EndIf
     
    Case $nMsg = $Button3
    If $richtig <> 4 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1)
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!")
    EndIf
     
    Case $nMsg = $Button4
    If $richtig <> 5 Then
    MsgBox(0,"Falsch", "richtig wäre:" & $richtig -1)
    Else
    MsgBox(0,"Super", "Sie haben richtig getippt!!!") ;runde 2
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]
  • ich verstehe dein problem nicht ganz ... :(
    eine Zufallszahl kannst du ja einfach überschreiben

    [autoit]

    $ErsteZahl=Random(1,6,1)
    MsgBox(0,"",$ErsteZahl)
    $ErsteZahl=Random(1,6,1)
    MsgBox(0,"",$ErsteZahl)

    [/autoit]


    So verändert sich die Zufallszahl falls du das gemeint hast :P

    mfg nof@ker :P

  • FojhtirfX komm mal ICQ online. Habe auch ein wenig angefangen mit dem Spiel, vielleicht können wir ja zusammen ein wenig rumbasteln.

  • Ehm hab das mal n bisschen umgeschrieben, konnte es aber nicht wirklich testen..
    Hoffe es ist soweit nachvollziehbar ^^

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: Frithjof

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Ein Quiz.

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    ; Script Start - Add your code below here

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstantsEx.au3>
    Opt ("GuiOnEventMode",1)
    Global $Frage, $Antwort1, $Antwort2, $Antwort3, $Antwort4, $richtig

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Wer wird Millionär", 633, 447, 193, 125)
    GuiSetOnEvent($GUI_EVENT_CLOSE, "Terminate")
    $Label1 = GUICtrlCreateLabel("Frage:", 152, 32, 316, 57)
    $Button1 = GUICtrlCreateButton("", 144, 192, 129, 49, 0)
    GuiCtrlSetOnEvent(-1, "result")
    $Button2 = GUICtrlCreateButton("", 344, 192, 129, 49, 0)
    GuiCtrlSetOnEvent(-1, "result")
    $Button3 = GUICtrlCreateButton("", 144, 264, 129, 49, 0)
    GuiCtrlSetOnEvent(-1, "result")
    $Button4 = GUICtrlCreateButton("", 344, 264, 129, 49, 0)
    GuiCtrlSetOnEvent(-1, "result")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    sleep(100)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func SetQuestions()
    $Zufall = Random(1,2,1)
    $Frage = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 1, "Frage1" , "Nicht Gefunden")
    $Antwort1 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 2, "Antwort1" , "Nicht Gefunden")
    $Antwort2 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 3, "Antwort2" , "Nicht Gefunden")
    $Antwort3 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 4, "Antwort3" , "Nicht Gefunden")
    $Antwort4 = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 5, "Antwort4" , "Nicht Gefunden")
    $richtig = IniRead("C:\Dokumente und Einstellungen\Frithjof\Desktop\fragen"& $zufall & ".ini", 6, "Lösung" , "Nicht Gefunden")
    GuiCtrlSetData($Label1, $Frage)
    GuiCtrlSetData($Button1, $Antwort1)
    GuiCtrlSetData($Button2, $Antwort2)
    GuiCtrlSetData($Button3, $Antwort3)
    GuiCtrlSetData($Button4, $Antwort4)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func result()
    Switch @GUI_CtrlId
    Case 4;Button 1
    If $Antwort1 = $richtig Then
    MsgBox(0,"Info!", "Die Antwort ist richtig!")
    Else
    MsgBox(0,"Info!", "Die Antwort ist falsch!")
    EndIf
    Case 5
    If $Antwort2 = $richtig Then
    MsgBox(0,"Info!", "Die Antwort ist richtig!")
    Else
    MsgBox(0,"Info!", "Die Antwort ist falsch!")
    EndIf
    Case 6
    If $Antwort3 = $richtig Then
    MsgBox(0,"Info!", "Die Antwort ist richtig!")
    Else
    MsgBox(0,"Info!", "Die Antwort ist falsch!")
    EndIf
    Case 7;Button 4
    If $Antwort4 = $richtig Then
    MsgBox(0,"Info!", "Die Antwort ist richtig!")
    Else
    MsgBox(0,"Info!", "Die Antwort ist falsch!")
    EndIf
    EndSwitch
    SetQuestions()
    EnDFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Terminate()
    Exit
    EndFunc

    [/autoit]
  • Meine version sieht bis jetzt so aus

    Spoiler anzeigen
    [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    ;Variablen deklarierung
    Global $ini = @ScriptDir & "\Daten.ini", $splash = @ScriptDir & "\Millionär.jpg", $bkgr = @ScriptDir & "\a.jpg", $var = IniReadSection(@ScriptDir & "\Daten.ini", "Fragen")
    Global $Antwort[5],$a
    ;<==

    [/autoit] [autoit][/autoit] [autoit]

    ;Splash
    SplashImageOn("", $splash, 320, 322, -1, -1, 1)
    Sleep(1500)
    SplashOff()
    ;<==

    [/autoit] [autoit][/autoit] [autoit]

    ;Main Gui
    GUICreate("Wer wird Millionär", 631, 378)
    GUICtrlCreatePic($bkgr, 0, 0, 631, 378)
    GUISetFont(15)
    $Frage = GUICtrlCreateEdit("", 50, 235, 390, 47, $ES_READONLY, 0) ;Feld für Frage
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $Antwort[1] = GUICtrlCreateLabel("", 63, 300, 150, 23) ;Feld für Antwort A
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $Antwort[2] = GUICtrlCreateLabel("", 63, 337, 150, 23) ;Feld für Antwort B
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $Antwort[3] = GUICtrlCreateLabel("", 295, 300, 150, 23) ;Feld für Antwort C
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $Antwort[4] = GUICtrlCreateLabel("", 295, 337, 150, 23) ;Feld für Antwort D
    GUICtrlSetBkColor(-1, 0xFFFFFF)

    [/autoit] [autoit][/autoit] [autoit]

    $question = Random(1, UBound($var) - 1, 1) ;Zufällige Frage

    [/autoit] [autoit][/autoit] [autoit]

    $str = StringSplit($var[$question][1], '-', 1) ;Antworten splitten
    GUICtrlSetData($Frage, $var[$question][0]) ;Frage Nr. 1

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To 4
    GUICtrlSetData($Antwort[$i], $str[$i]) ;Antwortmöglichkeiten zu Frage Nr. 1
    Next

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    Switch $str[5]

    [/autoit] [autoit][/autoit] [autoit]

    Case 1
    $a = "A"
    Case 2
    $a = "B"
    Case 3
    $a = "C"
    Case 4
    $a = "D"
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    MsgBox(0,"Richtige Antwort","Richtige antwort ist " & $a)
    ;<==

    [/autoit] [autoit][/autoit] [autoit]

    ;Mainloop
    While 1
    $Msg = GUIGetMsg()
    Switch $Msg
    Case $GUI_EVENT_CLOSE
    $close = MsgBox(4, "Wirklich Beenden?", "Wollen sie wirklich aufhören?")
    Switch $close
    Case 6
    Exit
    EndSwitch
    EndSwitch
    WEnd
    ;<==

    [/autoit]

    Download

    Edit: Habs jetzt nen bisschen verändert... nur leider komme ich nicht weiter im moment ;)
    @FojhtirfX add mich mal ICQ (261461364) dann können wa zusammen bisschen was machen

    Edit2: So, kann mir wer helfen ? Ich bräuchte etwas, das einen Mausklick auf ein Label regestriert. Dann lege ich ein Transparentes Label auf die Antwortmöglichkeiten, und wenn sie gedrückt werden, dann soll entweder Richtig oder Falsch kommen ;)

    4 Mal editiert, zuletzt von SiLenCa (28. April 2009 um 17:12)

  • So, habe es jetzt soweiter erst einmal zum Funktionieren bekommen. Wer mal Lust hat es zu Spielen hier derDownloadlink

    und hier der SourceCode: (Noch unsauber aber das mache ich morgen -.-)

    Spoiler anzeigen
    [autoit]

    #include <StaticConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    ;Variablen deklarierung
    Global $ini = @ScriptDir & "\Daten.ini", $splash = @ScriptDir & "\Millionär.jpg", $bkgr = @ScriptDir & "\a.jpg", $var = IniReadSection(@ScriptDir & "\Daten.ini", "Fragen")
    Global $Antwort[5], $e, $question, $str, $y = 315, $Euro = "0 Euro"
    ;<==

    [/autoit] [autoit][/autoit] [autoit]

    If $var = 1 Then
    MsgBox(0, "Fehler", "Datei 'Daten.ini konnte nicht gelesen werden." & @CRLF & "Bitte überprüfen Sie, ob sich die Datei im Ordner Befindet.")
    Exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ;Splash
    SplashImageOn("", $splash, 320, 322, -1, -1, 1)
    Sleep(1500)
    SplashOff()
    ;<==

    [/autoit] [autoit][/autoit] [autoit]

    ;Main Gui
    GUICreate("Wer wird Millionär", 631, 378)
    GUICtrlCreatePic($bkgr, 0, 0, 631, 378)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUISetFont(15)
    $Frage = GUICtrlCreateEdit("", 50, 235, 390, 47, $ES_READONLY, 0) ;Feld für Frage
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUISetFont(12)
    $Antwort[1] = GUICtrlCreateLabel("", 63, 300, 155, 23) ;Feld für Antwort A
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $A = GUICtrlCreateLabel("", 30, 294, 195, 37) ;Soll auf Klick reagieren
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetState(-1, $GUI_ONTOP)
    $Antwort[2] = GUICtrlCreateLabel("", 63, 337, 155, 23) ;Feld für Antwort B
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $B = GUICtrlCreateLabel("", 30, 331, 195, 37) ;Soll auf Klick reagieren
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetState(-1, $GUI_ONTOP)
    $Antwort[3] = GUICtrlCreateLabel("", 295, 300, 155, 23) ;Feld für Antwort C
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $C = GUICtrlCreateLabel("", 262, 294, 195, 37) ;Soll auf Klick reagieren
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetState(-1, $GUI_ONTOP)
    $Antwort[4] = GUICtrlCreateLabel("", 295, 337, 155, 23) ;Feld für Antwort D
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $D = GUICtrlCreateLabel("", 262, 331, 195, 37) ;Soll auf Klick reagieren
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetState(-1, $GUI_ONTOP)
    GUISetFont(20)
    $Geld = GUICtrlCreateLabel("X", 505, $y)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

    [/autoit] [autoit][/autoit] [autoit]

    _Next()

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    ;Mainloop
    While 1
    Local $l
    $Msg = GUIGetMsg()
    Switch $Msg
    Case $GUI_EVENT_CLOSE
    $close = MsgBox(4, "Wirklich Beenden?", "Wollen sie wirklich aufhören?")
    Switch $close
    Case 6
    Exit
    EndSwitch
    Case $A
    $l = 1
    If $l = $str[5] Then
    _Geld()
    $y -= 20
    _Next()
    GUICtrlSetPos($Geld, 505, $y)
    Else
    MsgBox(0, "Falsch", "Antwort A ist leider falsch, die richtige Lösung wäre " & $e & " gewesen.")
    _NewGame()
    EndIf
    Case $B
    $l = 2
    If $l = $str[5] Then
    _Geld()
    $y -= 20
    _Next()
    GUICtrlSetPos($Geld, 505, $y)
    Else
    MsgBox(0, "Falsch", "Antwort B ist leider falsch, die richtige Lösung wäre " & $e & " gewesen.")
    _NewGame()
    EndIf
    Case $C
    $l = 3
    If $l = $str[5] Then
    _Geld()
    $y -= 20
    _Next()
    GUICtrlSetPos($Geld, 505, $y)
    Else
    MsgBox(0, "Falsch", "Antwort C ist leider falsch, die richtige Lösung wäre " & $e & " gewesen.")
    _NewGame()
    EndIf
    Case $D
    $l = 4
    If $l = $str[5] Then
    _Geld()
    $y -= 20
    _Next()
    GUICtrlSetPos($Geld, 505, $y)
    Else
    MsgBox(0, "Falsch", "Antwort D ist leider falsch, die richtige Lösung wäre " & $e & " gewesen.")
    _NewGame()
    EndIf
    EndSwitch
    WEnd
    ;<==

    [/autoit] [autoit][/autoit] [autoit]

    Func _Next()
    $question = Random(1, UBound($var) - 1, 1) ;Zufällige Frage

    [/autoit] [autoit][/autoit] [autoit]

    $str = StringSplit($var[$question][1], '-', 1) ;Antworten splitten
    ;~ If @error Then _Next()
    GUICtrlSetData($Frage, $var[$question][0]) ;Frage Nr. 1

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To 4
    GUICtrlSetData($Antwort[$i], $str[$i]) ;Antwortmöglichkeiten zu Frage Nr. 1
    Next

    [/autoit] [autoit][/autoit] [autoit]

    Switch $str[5]
    Case 1
    $e = "A"
    Case 2
    $e = "B"
    Case 3
    $e = "C"
    Case 4
    $e = "D"
    EndSwitch
    EndFunc ;==>_Next

    [/autoit] [autoit][/autoit] [autoit]

    Func _Geld()
    Switch $y
    Case 315
    $Euro = "100 Euro"
    Case 295
    $Euro = "200 Euro"
    Case 275
    $Euro = "200 Euro"
    Case 255
    $Euro = "500 Euro"
    Case 235
    $Euro = "1.000 Euro"
    Case 215
    $Euro = "2.000 Euro"
    Case 195
    $Euro = "4.000 Euro"
    Case 175
    $Euro = "8.000 Euro"
    Case 155
    $Euro = "16.000 Euro"
    Case 135
    $Euro = "32.000 Euro"
    Case 115
    $Euro = "64.000 Euro"
    Case 95
    $Euro = "125.000 Euro"
    Case 75
    $Euro = "250.000 Euro"
    Case 55
    $Euro = "500.000 Euro"
    Case Else
    MsgBox(0, "Richtig", "Glückwunsch, Sie haben 1 Milion Euro Gewonnen!!!!")
    _NewGame()
    EndSwitch
    MsgBox(0, "Richtig", "Glückwunsch, Sie haben " & $Euro & " bis jetzt.")
    EndFunc ;==>_Geld

    [/autoit] [autoit][/autoit] [autoit]

    Func _NewGame()
    GUICtrlSetData($Frage, "")
    $y = 315
    GUICtrlSetPos($Geld, 505, $y)
    For $i = 1 To 4
    GUICtrlSetData($Antwort[$i], "")
    Next
    $New = MsgBox(4, "Neues Spiel?", "Möchten sie ein neues Spiel beginnen?")
    Switch $New
    Case 6
    _Next()
    Case 7
    Exit
    EndSwitch
    EndFunc ;==>_NewGame

    [/autoit]

    Edit: Source ein wenig angepasst. Im Downloadlink aber nicht!!! Also Leute Copy & Paste ;)

    mfg SiLenCa

    Einmal editiert, zuletzt von SiLenCa (28. April 2009 um 20:06)