• Also wenn ich das Script in nem
    Pfad ohne Leerzeichen habe läufts...
    :|
    Ach, aber die Musik stoppt schon nach ca. 10 Sekunden, muss das so ?
    Außerdem fehlen mir persönlich hier die Schwierigkeitsgerade ;)

    limette

    @fabs: Hast du die Dll in den 'dll'-Ordner gepackt ?

    There are only 10 types of people in the world:
    Those who understand binary - and those who don't.

  • Hm, die DLL war nach dem entpacken nicht im DLL-Ordner. Naja, jetzt gehts ;) Nur kann ich das auch nur in einem Pfad ohne Leerzeichen verwenden ^^

    Ansonsten hammer Skript Oscar. :)

    edit:
    Ja, die Musik stoppt bei mir irgendwie auch bevor der Progress fertig is... hm

  • Hi,
    Oscar : Script gefällt mir sehr gut :)
    Sehr schön ausgebaut, viele Funktionen, alles einstellbar ... Aber: in der Registrierungsfunktion von der DLL ist immer noch ein Bug, ich check irgendwie gerade auch nicht warum -.-
    Und du hätest das Archiv einfach splitten können, ich hab erst nicht kapiert, dass man die DLL noch rüberkopieren muss :)

    @fabs auch dein Script gefällt mir. Was mir jetzt negativ aufgefallen ist, dass bei dir die Dateien nicht mit Unterverzeichnis eingelesen werden, und man so immer nur mit 1 Album spielen kann.
    Außerdem ist halt noch der schon erwähnte Bug drin, der es unmöglich macht lange zu spielen.

    limette Graphisch ist dein Script vielleicht noch verbesserbar. DIe Bedienung ist gewöhnungsbedürftig und ich finde es blöd, dass man sich jedes Lied bis zum Ende anhören muss, um weiterzuspielen. Aber die Funktionsweise ist Gut, keine Bugs, ... :)


    Ich hatte leider nicht mehr genug Zeit um fertig zu werden, die funktioen waren alle fertig, aber die GUI hätte noh gefehlt.

    Einmal editiert, zuletzt von anno2008 (24. August 2008 um 14:34)

  • Was ?! "graphisch noch verbesserbar" ?!
    Das ist Top ! :cursing:
    ...
    </ironie>

    Nee, graphisch ist da wie gesagt garnix ^^
    Und die Bedienung - hm. Iwie bin ich nicht auf die Idee
    gekommen, für die Dateien ein Menu zu machen oO
    Das hätte alles vereinfacht... x)

    Aber mein Primärziel habe ich erreicht:

    Zitat

    keine Bugs, ... :)


    ;)

    mfg limette

    There are only 10 types of people in the world:
    Those who understand binary - and those who don't.

  • Naja, ich wollte den Bug eigentlich noch ausgleichen, indem er einfach ne andere Datei würfelt, bei der ein Array zurückkommt. Allerdings wurde das dann ne Endlosschleife, welche mir die Console zugemüllt hat... Hatte dann halt keine Zeit mehr.

    Habe mir auch mehrere UDFs angeschaut, die einzige die ging, habe ich jetzt drin. Eine andere von Xenobiologist lieferte nie ein Array zurück und die Ur-Version von Lazycat lieferte nur Hexwerte.
    Die, die Oscar verwendet hat, habe ich weder hier noch im englischen Forum gefunden :(

    Werds wohl noch verbessern müssen ;)

  • Du kannst ja auch bequem sein und einfach prüfen,

    If Not IsArray( .. ) Then $titel = 'unbekannt'

    o.ä., bin grad nicht in deinem Script ;)

    mfg limette

    There are only 10 types of people in the world:
    Those who understand binary - and those who don't.

  • Habs ja auch mit IsArray abgefragt, aber wollte dann ja dann nochmal neu würfeln. Auf die Idee mit Interpret als Unbekannt bin ich aber nicht gekommen 8|

  • Du kannst das ja so in der Art machen:
    (Pseudo-Code)

    For $i = 1 To 3
    $titel = _GetTitel()
    If IsArray( $titel ) Then ExitLoop
    Next
    If Not IsArray( $titel ) Then $titel = 'unbekannt'

    o.ä. ;)

    limette

    There are only 10 types of people in the world:
    Those who understand binary - and those who don't.

  • Ja mal sehen. Vllt übernehme ich auch eine von den UDFs die ihr genommen habt. Hab grade noch zwei andere Projekte ^^

    @ Waluev:
    Wie weit biste denn mit der Auswertung?

  • sry Leute wird heute nix...ich habs zeitlich nicht geschafft. Morgen bin ich ab um 3 zu Hause, da wert ich es aus, versprochen!!!

    Walle

    Flensburg ist wie Payback - wenn man 18 Punkte hat bekommt man ein Fahrrad.

  • Auswertung

    Zunächst einmal möchte ich mich wieder bei allen bedanken, die am Wettbewerb teilgenommen haben. Diesmal waren es zwar leider nur 3 Leute, die sich dieser Aufgabe stellten, aber hauptsache mehr als einer :) Nächstes mal gibts ja was sehr anspruchsvolles mit Daten und ich hoffe damit ein breiteres Spektrum anzusprechen.

     Jetzt aber der eigentlich wichtige Teil, die Auswertung der Einzelnen Arbeiten:

    fabs
    Bugs:

    • Programm beendet sich nach dem Spielen eines Liedes -> Array Problem
    • Unterordner

    MaxWinTrans.au3

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Icon=gfx\icon.ico
    #AutoIt3Wrapper_Outfile=..\..\..\QuizIt!_v1.exe
    #AutoIt3Wrapper_Res_Description=by fabs
    #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
    #AutoIt3Wrapper_Res_Language=1031
    #AutoIt3Wrapper_Run_Au3check=n
    #AutoIt3Wrapper_Tidy_Stop_OnError=n
    #AutoIt3Wrapper_Run_Obfuscator=y
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <ButtonConstants.au3>
    #include <File.au3>
    #include <Misc.au3>
    #include <Sound.au3>
    #NoTrayIcon

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

    DirCreate(@ScriptDir & "\gfx")
    FileInstall("gfx\img1.jpeg", "gfx\img1.jpeg")
    FileInstall("gfx\img2.jpeg", "gfx\img2.jpeg")
    FileInstall("gfx\img3.jpeg", "gfx\img3.jpeg")
    FileInstall("gfx\img4.jpeg", "gfx\img4.jpeg")
    FileInstall("gfx\img5.jpeg", "gfx\img5.jpeg")
    FileInstall("gfx\background.jpeg", "gfx\background.jpeg")
    FileInstall("gfx\logo.jpeg", "gfx\logo.jpeg")
    FileInstall("gfx\icon.ico", "gfx\icon.ico")

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

    Global $covercheck, $artist1, $artist2, $artist3, $title1, $title2, $title3
    Global $gamerun = False
    Global $open, $playtrack, $track1, $track2, $track3, $levelsleep
    Global Const $ver = "1.0"
    Global Const $title = "QuizIt! " & $ver
    Global Const $name = "QuizIt!"
    Global Const $dll = DllOpen("User32.dll")

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

    $splashgui = GUICreate("", 421, 211, @DesktopHeight - 515, 164, $WS_POPUP)
    $logo = GUICtrlCreatePic("gfx\logo.jpeg", 0, 0, 420, 210)

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

    GUICtrlCreateLabel("v. " & $ver, 176, 80, 87, 45)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 27, 400, 0, "Calisto MT")
    GUICtrlSetColor(-1, 0xFFFFFF)

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

    WinSetTrans($splashgui, "", 10)
    GUISetState(@SW_SHOW)

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

    For $trans = 10 To 240 Step +8
    WinSetTrans($splashgui, "", $trans)
    Sleep(3)
    Next

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

    Sleep(1600)

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

    For $trans = 240 To 0 Step -8
    WinSetTrans($splashgui, "", $trans)
    Sleep(3)
    Next

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

    GUIDelete($splashgui)

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

    Global $gui = GUICreate($title, 490, 330, @DesktopHeight - 550, 110)
    $background = GUICtrlCreatePic("gfx\background.jpeg", 0, 0, 490, 330)
    GUICtrlSetState($background, $GUI_DISABLE)

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

    $pathinput = GUICtrlCreateInput("", 8, 8, 393, 21)
    GUICtrlSetState($pathinput, $GUI_DISABLE)
    $browse = GUICtrlCreateButton("Durchsuchen", 402, 6, 81, 25, 0)

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

    GUICtrlCreateLabel("Fortschritt", 8, 48, 50, 17)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $soundprogress = GUICtrlCreateProgress(64, 40, 419, 25)

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

    GUICtrlCreateLabel("Punkte", 16, 72, 38, 17)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $scorelabel = GUICtrlCreateLabel("0", 64, 72, 160, 17)
    GUICtrlSetBkColor($scorelabel, $GUI_BKCOLOR_TRANSPARENT)
    Global $score = ControlGetText($gui, "", $scorelabel)

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

    Global $cover1 = GUICtrlCreatePic("gfx\img1.jpeg", 8, 104, 137, 161)
    Global $artistlabel1 = GUICtrlCreateLabel("Unbekannter Interpret", 8, 272, 137, 17)
    Global $titlelabel1 = GUICtrlCreateLabel("Unbekannter Titel", 8, 290, 139, 17)
    GUICtrlSetBkColor($artistlabel1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetBkColor($titlelabel1, $GUI_BKCOLOR_TRANSPARENT)

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

    Global $cover2 = GUICtrlCreatePic("gfx\img2.jpeg", 176, 104, 137, 161)
    Global $artistlabel2 = GUICtrlCreateLabel("Unbekannter Interpret", 176, 272, 137, 17)
    Global $titlelabel2 = GUICtrlCreateLabel("Unbekannter Titel", 176, 290, 139, 17)
    GUICtrlSetBkColor($artistlabel2, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetBkColor($titlelabel2, $GUI_BKCOLOR_TRANSPARENT)

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

    Global $cover3 = GUICtrlCreatePic("gfx\img3.jpeg", 344, 104, 137, 161)
    Global $artistlabel3 = GUICtrlCreateLabel("Unbekannter Interpret", 344, 272, 137, 17)
    Global $titlelabel3 = GUICtrlCreateLabel("Unbekannter Titel", 344, 290, 139, 17)
    GUICtrlSetBkColor($artistlabel3, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetBkColor($titlelabel3, $GUI_BKCOLOR_TRANSPARENT)

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

    $game = GUICtrlCreateMenu("Spiel")

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

    $play = GUICtrlCreateMenuItem("Neues Spiel starten", $game)

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

    $levelmenu = GUICtrlCreateMenu("Schwierigkeit", $game)
    $easy = GUICtrlCreateMenuItem("Einfach", $levelmenu)
    $middle = GUICtrlCreateMenuItem("Mittel", $levelmenu)
    $hard = GUICtrlCreateMenuItem("Schwer", $levelmenu)
    GUICtrlSetState($easy, $GUI_CHECKED)
    Global $level = "easy"
    Global $levelsleep = 750
    Global $levelmulti = 0

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

    GUICtrlCreateMenuItem("", $game)
    $quit = GUICtrlCreateMenuItem("Beenden" & @TAB & "Esc", $game)

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

    $info = GUICtrlCreateMenu("?")
    $about = GUICtrlCreateMenuItem("Info", $info)

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

    WinSetTrans($gui, "", 10)
    GUISetState(@SW_SHOW)

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

    For $trans = 10 To 240 Step +7
    WinSetTrans($gui, "", $trans)
    Sleep(2)
    Next

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

    $timer = TimerInit()
    While 1
    Global $nMsg = GUIGetMsg()
    Global $tMsg = TrayGetMsg()

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

    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _terminate()
    Case $easy
    Global $level = "easy"
    $levelsleep = 750
    GUICtrlSetState($easy, $GUI_CHECKED)
    GUICtrlSetState($middle, $GUI_UNCHECKED)
    GUICtrlSetState($hard, $GUI_UNCHECKED)
    Case $middle
    Global $level = "middle"
    $levelsleep = 500
    GUICtrlSetState($easy, $GUI_UNCHECKED)
    GUICtrlSetState($middle, $GUI_CHECKED)
    GUICtrlSetState($hard, $GUI_UNCHECKED)
    Case $hard
    Global $level = "hard"
    $levelsleep = 250
    GUICtrlSetState($easy, $GUI_UNCHECKED)
    GUICtrlSetState($middle, $GUI_UNCHECKED)
    GUICtrlSetState($hard, $GUI_CHECKED)
    Case $browse
    $path = FileSelectFolder("Bitte wählen Sie Ihren Musikordner aus:", "", 2)
    If @error = 1 Then ContinueLoop

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

    Global $files = _FileListToArray($path, "*.mp3", 1)
    If @error = 4 Then
    MsgBox(16, "Fehler", "Das angegebene Verzeichnis enthält keine Musikdateien")
    ContinueLoop
    ElseIf $files[0] < 3 Then
    MsgBox(16, "Fehler", "Es müssen mindestens 3 Musikdateien vorhanden sein")
    ContinueLoop
    Else
    GUICtrlSetData($pathinput, $path)
    ContinueLoop
    EndIf
    Case $about
    _aboutbox()
    Case $play
    If $gamerun = False Then
    _start()
    ElseIf $gamerun = True Then
    If IsDeclared("open") Then _SoundPause($open)
    $newgamebox = MsgBox(36, "Neues Spiel starten", "Möchten Sie wirklich ein neues Spiel starten?" & @CRLF & "Der aktuelle Fortschritt geht verloren")

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

    Do
    Sleep(10)
    Until $newgamebox = 6 Or $newgamebox = 7

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

    If $newgamebox = 6 Then
    Global $levelmulti = 0
    GUICtrlSetData($soundprogress, 0)
    Global $set = "zero"
    _setscore()
    _start()
    ElseIf $newgamebox = 7 Then
    If IsDeclared("open") Then _SoundResume($open)
    ContinueLoop
    EndIf
    EndIf
    Case $quit
    _terminate()
    Case $cover1
    If Not IsDeclared("covercheck") Or $covercheck = False Then
    ContinueLoop
    ElseIf IsDeclared("covercheck") And $covercheck = True Then
    _check()
    EndIf
    Case $cover2
    If Not IsDeclared("covercheck") Or $covercheck = False Then
    ContinueLoop
    ElseIf IsDeclared("covercheck") And $covercheck = True Then
    _check()
    EndIf
    Case $cover3
    If Not IsDeclared("covercheck") Or $covercheck = False Then
    ContinueLoop
    ElseIf IsDeclared("covercheck") And $covercheck = True Then
    _check()
    EndIf
    EndSwitch

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

    If $gamerun = True Then
    If $levelmulti = 100 Then
    $levelmulti = 0
    GUICtrlSetData($soundprogress, 0)
    If $level = "easy" Then
    $levelsleep = 750
    ElseIf $level = "middle" Then
    $levelsleep = 500
    ElseIf $level = "hard" Then
    $levelsleep = 250
    EndIf

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

    Global $set = "down"
    _setscore()
    _start()
    EndIf
    If TimerDiff($timer) > $levelsleep Then
    GUICtrlSetData($soundprogress, $levelmulti)
    $levelmulti += 5
    $timer = TimerInit()
    EndIf
    EndIf

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

    If _IsPressed("41", $dll) And WinActive($gui) Then
    Global $nMsg = $cover1
    ElseIf _IsPressed("42", $dll) And WinActive($gui) Then
    Global $nMsg = $cover2
    ElseIf _IsPressed("43", $dll) And WinActive($gui) Then
    Global $nMsg = $cover3
    EndIf
    Sleep(10)
    WEnd

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

    Func _start()
    $checkgui = _checkgui()
    If $checkgui = False Then Return
    Global $gamerun = True

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

    Global $random = "all"
    _random()

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

    Global $track1 = $files[$rTrack1]
    Global $track2 = $files[$rTrack2]
    Global $track3 = $files[$rTrack3]

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

    If $rPlaytrack = 1 Then
    Global $playtrack = $track1
    ElseIf $rPlaytrack = 2 Then
    Global $playtrack = $track2
    ElseIf $rPlaytrack = 3 Then
    Global $playtrack = $track3
    EndIf

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

    $track1tags = _MP3GetID3v1Tag($path & "\" & $track1)
    $track2tags = _MP3GetID3v1Tag($path & "\" & $track2)
    $track3tags = _MP3GetID3v1Tag($path & "\" & $track3)

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

    #comments-start
    $track1tags = _MP3GetID3v1Tag($path & "\" & $track1)
    If IsArray($track1tags) = 0 Then
    ConsoleWrite(@CRLF & "$track1tags is no array")
    Global $random = 1
    Do
    ConsoleWrite(@CRLF & "calling random 1 func")
    _random()
    $track1tags = _MP3GetID3v1Tag($path & "\" & $track1)
    ConsoleWrite(@CRLF & "tagging file")
    Until IsArray($track1tags) = 1
    ConsoleWrite(@CRLF & "$track1tags is array")
    EndIf

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

    $track2tags = _MP3GetID3v1Tag($path & "\" & $track2)
    If IsArray($track2tags) = 0 Then
    ConsoleWrite(@CRLF & "$track2tags is no array")
    Global $random = 2
    Do
    ConsoleWrite(@CRLF & "calling random 2 func")
    _random()
    $track2tags = _MP3GetID3v1Tag($path & "\" & $track2)
    ConsoleWrite(@CRLF & "tagging file")
    Until IsArray($track2tags) = 1
    ConsoleWrite(@CRLF & "$track2tags is array")
    EndIf

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

    $track3tags = _MP3GetID3v1Tag($path & "\" & $track3)
    If IsArray($track3tags) = 0 Then
    ConsoleWrite(@CRLF & "$track3tags is no array")
    Global $random = 3
    Do
    ConsoleWrite(@CRLF & "calling random 3 func")
    _random()
    $track3tags = _MP3GetID3v1Tag($path & "\" & $track3)
    ConsoleWrite(@CRLF & "tagging file")
    Until IsArray($track3tags) = 1
    ConsoleWrite(@CRLF & "$track3tags is array")
    EndIf
    #comments-end

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

    Global $artist1 = $track1tags[1] ;==> Subscript used with non-Array variable.:
    Global $artist2 = $track2tags[1] ;Global $artist1 = $track1tags[1]
    Global $artist3 = $track3tags[1] ;Global $artist1 = $track1tags^ ERROR

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

    Global $title1 = $track1tags[0]
    Global $title2 = $track2tags[0]
    Global $title3 = $track3tags[0]

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

    Select
    Case $artist1 = ""
    $artist1 = "Unbekannter Interpret"
    Case $artist2 = ""
    $artist2 = "Unbekannter Interpret"
    Case $artist3 = ""
    $artist3 = "Unbekannter Interpret"
    Case $title1 = ""
    $title1 = "Unbekannter Titel"
    Case $title2 = ""
    $title2 = "Unbekannter Titel"
    Case $title3 = ""
    $title3 = "Unbekannter Titel"
    EndSelect

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

    _settext()
    _play()
    EndFunc ;==>_start

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

    Func _checkgui()
    If GUICtrlRead($pathinput) = "" Then
    MsgBox(16, "Fehler", "Es wurde kein Musikordner ausgewählt")
    Return False
    Else
    Return True
    EndIf
    EndFunc ;==>_checkgui

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

    Func _random()
    If $random = 1 Then
    _random1()
    ElseIf $random = 2 Then
    _random2()
    ElseIf $random = 3 Then
    _random3()
    ElseIf $random = 4 Then
    _random4()
    ElseIf $random = "all" Then
    _random1()
    _random2()
    _random3()
    _random4()
    ;~ Return
    EndIf
    EndFunc ;==>_random

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

    Func _random1()
    Global $rTrack1 = Random(1, $files[0], 1)
    ConsoleWrite(@CRLF & "rTrack1: " & $rTrack1)
    ;~ Return
    EndFunc ;==>_random1

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

    Func _random2()
    Do
    Global $rTrack2 = Random(1, $files[0], 1)
    Until $rTrack2 <> $rTrack1
    ConsoleWrite(@CRLF & "rTrack2: " & $rTrack2)
    ;~ Return
    EndFunc ;==>_random2

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

    Func _random3()
    Do
    Global $rTrack3 = Random(1, $files[0], 1)
    Until $rTrack3 <> $rTrack2 And $rTrack3 <> $rTrack1
    ConsoleWrite(@CRLF & "rTrack3: " & $rTrack3)
    ;~ Return
    EndFunc ;==>_random3

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

    Func _random4()
    Global $rPlaytrack = Random(1, 3, 1)
    Return
    EndFunc ;==>_random4

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

    Func _settext()
    Select
    Case StringLen($artist1) > 23
    $trimlen = StringLen($artist1) - 23
    $tArtist1 = StringTrimRight($artist1, $trimlen)
    $artist1 = $tArtist1
    Case StringLen($artist2) > 23
    $trimlen = StringLen($artist2) - 23
    $tArtist2 = StringTrimRight($artist2, $trimlen)
    $artist2 = $tArtist2
    Case StringLen($artist3) > 23
    $trimlen = StringLen($artist3) - 23
    $tArtist3 = StringTrimRight($artist3, $trimlen)
    $artist3 = $tArtist3
    Case StringLen($title1) > 22
    $trimlen = StringLen($title1) - 22
    $tTitle1 = StringTrimRight($title1, $trimlen)
    $title1 = $tTitle1
    Case StringLen($title2) > 22
    $trimlen = StringLen($title2) - 22
    $tTitle2 = StringTrimRight($title2, $trimlen)
    $title2 = $tTitle2
    Case StringLen($title3) > 22
    $trimlen = StringLen($title3) - 22
    $tTitle3 = StringTrimRight($title3, $trimlen)
    $title3 = $tTitle3
    EndSelect

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

    GUICtrlSetData($artistlabel1, $artist1)
    GUICtrlSetData($artistlabel2, $artist2)
    GUICtrlSetData($artistlabel3, $artist3)

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

    GUICtrlSetData($titlelabel1, $title1)
    GUICtrlSetData($titlelabel2, $title2)
    GUICtrlSetData($titlelabel3, $title3)
    Global $nMsg = $cover1
    Global $covercheck = True
    EndFunc ;==>_settext

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

    Func _play()
    If IsDeclared("open") Then
    _SoundStop($open)
    _SoundClose($open)
    EndIf

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

    Global $open = _SoundOpen($path & "\" & $playtrack)

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

    $TrackLength = _SoundLength($open)

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

    $length = StringSplit($TrackLength, ":")

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

    $TrackHourLength = $length[1]
    $TrackMinLength = $length[2]
    $TrackSecLength = $length[3]

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

    $rSeekHour = Random(0, $TrackHourLength, 1) ;min 15s verbleibend @ easy
    $rSeekMin = Random(0, $TrackMinLength, 1) ;min 10s verbleibend @ middle
    $rSeekSec = Random(0, $TrackSecLength, 1) ;min 5s verbleibend @ hard

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

    _SoundPlay($open)
    _SoundSeek($open, $rSeekHour, $rSeekMin, $rSeekSec)
    _SoundPlay($open)
    EndFunc ;==>_play

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

    Func _check()
    Select
    Case $nMsg = $cover1 And $playtrack = $track1
    _success()
    Case $nMsg = $cover2 And $playtrack = $track2
    _success()
    Case $nMsg = $cover3 And $playtrack = $track3
    _success()
    Case Else
    _fail()
    EndSelect
    EndFunc ;==>_check

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

    Func _fail()
    If $nMsg = $cover1 Then
    GUICtrlSetImage($cover1, "gfx\img5.jpeg")
    Sleep(900)
    GUICtrlSetImage($cover1, "gfx\img1.jpeg")
    ElseIf $nMsg = $cover2 Then
    GUICtrlSetImage($cover2, "gfx\img5.jpeg")
    Sleep(900)
    GUICtrlSetImage($cover2, "gfx\img2.jpeg")
    ElseIf $nMsg = $cover3 Then
    GUICtrlSetImage($cover3, "gfx\img5.jpeg")
    Sleep(900)
    GUICtrlSetImage($cover3, "gfx\img3.jpeg")
    EndIf
    Global $set = "down"
    _setscore()
    EndFunc ;==>_fail

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

    Func _success()
    If $nMsg = $cover1 Then
    GUICtrlSetImage($cover1, "gfx\img4.jpeg")
    Sleep(900)
    GUICtrlSetImage($cover1, "gfx\img1.jpeg")
    ElseIf $nMsg = $cover2 Then
    GUICtrlSetImage($cover2, "gfx\img4.jpeg")
    Sleep(900)
    GUICtrlSetImage($cover2, "gfx\img2.jpeg")
    ElseIf $nMsg = $cover3 Then
    GUICtrlSetImage($cover3, "gfx\img4.jpeg")
    Sleep(900)
    GUICtrlSetImage($cover3, "gfx\img3.jpeg")
    EndIf

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

    Global $levelmulti = 0
    GUICtrlSetData($soundprogress, 0)
    Global $set = "up"
    _setscore()
    _start()
    EndFunc ;==>_success

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

    Func _setscore()
    If $set = "down" Then
    If $score <> 0 Then
    $score = $score - 10
    GUICtrlSetData($scorelabel, $score)
    EndIf
    ElseIf $set = "down" And $score = 0 Then
    $score = 0
    GUICtrlSetData($scorelabel, $score)
    ElseIf $set = "up" Then
    $score = $score + 10
    GUICtrlSetData($scorelabel, $score)
    ElseIf $set = "zero" Then
    $score = 0
    GUICtrlSetData($scorelabel, $score)
    EndIf
    Return
    EndFunc ;==>_setscore

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

    Func _aboutbox()
    MsgBox(64, "Über " & $title, "Copyright (C) 2008 by fabs für AutoIt.de (µit August)" & @CRLF & "fabs06@gmail.com")
    Return
    EndFunc ;==>_aboutbox

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

    Func _terminate()
    If IsDeclared("open") Then _SoundPause($open)
    $quitbox = MsgBox(36, $name & " beenden", "Möchten Sie " & $name & " wirklich beenden?" & @CRLF & "Der aktuelle Fortschritt geht verloren.", 0, $gui)

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

    Do
    Sleep(10)
    Until $quitbox = 6 Or $quitbox = 7

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

    If $quitbox = 6 Then
    For $trans = 255 To 0 Step -7
    WinSetTrans($gui, "", $trans)
    Sleep(2)
    Next

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

    DllClose($dll)

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

    If IsDeclared("open") Then
    _SoundStop($open)
    _SoundClose($open)
    EndIf
    Exit
    Else
    If IsDeclared("open") Then _SoundResume($open)
    Return
    EndIf
    EndFunc ;==>_terminate

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

    ;===============================================================================
    ; Function Name:_MP3GetID3v1Tag($sFile)
    ; Description: Retrive MP3 ID3Tag v1.0 & v1.1
    ; Parameter(s): $sFile = FileFullPath
    ; Requirement(s):Autoit v3.2.0
    ; Return Value(s):On Success - array with data:
    ; 0 - Title
    ; 1 - Artist
    ; 2 - Album
    ; 3 - Year
    ; 4 - Comment
    ; 5 - Track number
    ; 6 - Genre
    ; 7 - Tag version
    ; On Failure empty string and sets @ERROR:
    ; -1 - File not found
    ; 1 - TAG not found
    ; Version : 2.6.0
    ; Author(s): taz742 based on Lazycat's UDF _MP3GetTag()
    ;===============================================================================
    ;
    Func _MP3GetID3v1Tag($sFile)
    Local $ret = DllCall("kernel32.dll", "int", "CreateFile", _
    "str", $sFile, _
    "int", 0x80000000, _
    "int", 0, _
    "ptr", 0, _
    "int", 3, _
    "int", 0x80, _
    "ptr", 0), $error = 0

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

    If @error Or Not $ret[0] Then
    $error = -1
    Else
    Local $aID3v1
    Local $pTag = _FileReadToStruct("char[3];char[30];char[30];char[30];char[4];char[28];byte[2];byte", $ret[0], FileGetSize($sFile) - 128)
    ;TAG Header|Title|Artist|Album|Year|Comment|Track|Genre
    If Not (DllStructGetData($pTag, 1) == "TAG") Then
    $error = 1
    Else
    Dim $aID3v1[8]
    $aID3v1[0] = DllStructGetData($pTag, 2) ;Title
    $aID3v1[1] = DllStructGetData($pTag, 3) ;Artist
    $aID3v1[2] = DllStructGetData($pTag, 4) ;Album
    $aID3v1[3] = DllStructGetData($pTag, 5) ;Year
    If DllStructGetData($pTag, 7, 1) = 0 Then ;ID3Tag is v1.1 -> Track
    $aID3v1[4] = DllStructGetData($pTag, 6) ;Comment
    $aID3v1[5] = DllStructGetData($pTag, 7, 2) ;Track
    $aID3v1[7] = "1.1" ;version info
    Else ;ID3Tag is v1.0 -> Not Track
    $aID3v1[4] = DllStructGetData($pTag, 6) & String(BinaryToString(DllStructGetData($pTag, 7))) ;Comment
    $aID3v1[5] = "" ;Track is empty because not yet implanted in ID3v1.0
    $aID3v1[7] = "1.0" ;version info
    EndIf
    $aID3v1[6] = _MP3GetGenreByID(DllStructGetData($pTag, 8)) ;Genre
    EndIf
    EndIf
    DllCall("kernel32.dll", "int", "CloseHandle", "int", $ret[0])
    If Not $error Then Return $aID3v1
    SetError($error)
    Return ""
    EndFunc ;==>_MP3GetID3v1Tag

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

    Func _MP3GetGenreByID($iID)
    Local $asGenre = StringSplit("Blues,Classic Rock,Country,Dance,Disco,Funk,Grunge,Hip-Hop," & _
    "Jazz,Metal,New Age,Oldies,Other,Pop,R&B,Rap,Reggae,Rock,Techno,Industrial,Alternative," & _
    "Ska,Death Metal,Pranks,Soundtrack,Euro-Techno,Ambient,Trip-Hop,Vocal,Jazz+Funk,Fusion," & _
    "Trance,Classical,Instrumental,Acid,House,Game,Sound Clip,Gospel,Noise,Alternative Rock," & _
    "Bass,Soul,Punk,Space,Meditative,Instrumental Pop,Instrumental Rock,Ethnic,Gothic,Darkwave," & _
    "Techno-Industrial,Electronic,Pop-Folk,Eurodance,Dream,Southern Rock,Comedy,Cult,Gangsta," & _
    "Top 40,Christian Rap,Pop/Funk,Jungle,Native US,Cabaret,New Wave,Psychadelic,Rave,Showtunes," & _
    "Trailer,Lo-Fi,Tribal,Acid Punk,Acid Jazz,Polka,Retro,Musical,Rock & Roll,Hard Rock,Folk," & _
    "Folk-Rock,National Folk,Swing,Fast Fusion,Bebob,Latin,Revival,Celtic,Bluegrass,Avantgarde," & _
    "Gothic Rock,Progressive Rock,Psychedelic Rock,Symphonic Rock,Slow Rock,Big Band,Chorus," & _
    "Easy Listening,Acoustic,Humour,Speech,Chanson,Opera,Chamber Music,Sonata,Symphony,Booty Bass," & _
    "Primus,Porn Groove,Satire,Slow Jam,Club,Tango,Samba,Folklore,Ballad,Power Ballad,Rhytmic Soul," & _
    "Freestyle,Duet,Punk Rock,Drum Solo,Acapella,Euro-House,Dance Hall,Goa,Drum & Bass,Club-House," & _
    "Hardcore,Terror,Indie,BritPop,Negerpunk,Polsk Punk,Beat,Christian Gangsta,Heavy Metal,Black Metal," & _
    "Crossover,Contemporary C,Christian Rock,Merengue,Salsa,Thrash Metal,Anime,JPop,SynthPop", ",")
    If ($iID >= 0) And ($iID < 148) Then Return $asGenre[$iID + 1]
    Return ("")
    EndFunc ;==>_MP3GetGenreByID

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

    Func _FileReadToStruct($vStruct, $hFile, $nOffset)
    If Not DllStructGetSize($vStruct) Then $vStruct = DllStructCreate($vStruct)
    Local $nLen = DllStructGetSize($vStruct)
    Local $ret = DllCall("kernel32.dll", "int", "SetFilePointer", _
    "int", $hFile, _
    "int", $nOffset, _
    "int", 0, _
    "int", 0) ; FILE_BEGIN
    Local $pRead = DllStructCreate("dword")
    $ret = DllCall("kernel32.dll", "int", "ReadFile", _
    "int", $hFile, _
    "ptr", DllStructGetPtr($vStruct), _
    "int", $nLen, _
    "ptr", DllStructGetPtr($pRead), _
    "ptr", 0)
    If @error Then
    SetError(1)
    EndIf
    Local $nRead = DllStructGetData($pRead, 1)
    $pRead = 0
    SetExtended($nRead)
    If Not ($nRead = $nLen) Then SetError(2)
    Return $vStruct
    EndFunc ;==>_FileReadToStruct

    [/autoit]

    Leider wurde das Programm nach der Entscheidung für die Antwort immer sofort beendet bzw stürzte ab. Grafisch schöne Ansätze, die StartUp GUI fand ich toll :)

    limette:
    Bugs: /

    bild1.jpg

    Spoiler anzeigen
    [autoit]

    #include<WindowsConstants.au3>
    #include<Sound.au3>
    #include<Array.au3>
    #include<EditConstants.au3>
    #include<ComboConstants.au3>
    #include<GUIConstantsEx.au3>
    #include <Inet.au3>
    #include 'mysql.au3'
    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.2.12.1
    Author: limette

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

    Script Function:
    MusicQuiz

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

    #ce ----------------------------------------------------------------------------
    Opt( 'TrayIconDebug', 1 )
    Global $selected = '', $diff = 'medium', $oSound, $oPosH, $oPosM, $oPosS, $curscore, $gscore, $correct, $correctNr, $anzahl_fragen = 0, $correctName, $row = 0
    Global $h_ListView1
    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\nils.nobody\desktop\musicquiz\aform1.kxf
    $Form1_1 = GUICreate("MusicQuiz", 347, 351, 195, 110)
    GUISetOnEvent( $GUI_EVENT_CLOSE, '_exit' )
    $Group1 = GUICtrlCreateGroup("Media", 8, 8, 329, 117)
    $Combo1 = GUICtrlCreateCombo("", 16, 24, 209, 25, $CBS_DROPDOWNLIST)
    GUICtrlSetTip( -1, 'Auswahl an Listen' )
    $Button1 = GUICtrlCreateButton("OK", 240, 24, 73, 20, 0)
    GUICtrlSetTip( -1, 'Bestätigt die Auswahl der Liste' )
    GUICtrlSetOnEvent( -1, '_select' )
    $Button2 = GUICtrlCreateButton("Hinzufügen", 240, 96, 73, 20, 0)
    GUICtrlSetTip( -1, 'Fügt den gewählten Ordner als Liste hinzu' )
    GUICtrlSetOnEvent( -1, '_add' )
    $Input1 = GUICtrlCreateEdit(@ScriptDir & '\', 16, 72, 209, 42, BitOR( $ES_READONLY, $WS_VSCROLL, $ES_AUTOVSCROLL ))
    $Button3 = GUICtrlCreateButton(" ... ", 240, 72, 73, 20, 0)
    GUICtrlSetTip( -1, 'Durchsuchen Sie ihren PC nach Ordnern mit *.mp3-Dateien' )
    GUICtrlSetOnEvent( -1, '_durchsuchen' )
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Radio4 = GUICtrlCreateRadio("leicht", 180, 150, 40, 17)
    GUICtrlSetOnEvent( -1, '_radio' )
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Radio5 = GUICtrlCreateRadio("mittel", 230, 150, 40, 17)
    GUICtrlSetOnEvent( -1, '_radio' )
    $Radio6 = GUICtrlCreateRadio("schwer", 280, 150, 49, 17)
    GUICtrlSetOnEvent( -1, '_radio' )
    $Group2 = GUICtrlCreateGroup("Quiz", 8, 142, 329, 195)
    $Button4 = GUICtrlCreateButton("Start", 16, 168, 73, 20, 0)
    GUICtrlSetTip( -1, 'Startet das Quiz' )
    GUICtrlSetOnEvent( -1, '_start' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Radio1 = GUICtrlCreateRadio("Antwort A", 98, 168, 231, 25)
    GUICtrlSetTip( -1, 'Antwort A' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Radio2 = GUICtrlCreateRadio("Antwort B", 98, 200, 231, 25)
    GUICtrlSetTip( -1, 'Antwort B' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Radio3 = GUICtrlCreateRadio("Antwort C", 98, 232, 231, 25)
    GUICtrlSetTip( -1, 'Antwort C' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Button5 = GUICtrlCreateButton("Replay", 32, 192, 41, 33, 0)
    GUICtrlSetTip( -1, 'Wiederholt den Ausschnitt' )
    GUICtrlSetOnEvent( -1, '_replay' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Label1 = GUICtrlCreateLabel("Akt. Frage:", 16, 256, 229, 17)
    $Label2 = GUICtrlCreateLabel("Gesamtpunktzahl: ", 16, 297, 230, 17)
    $Label3 = GUICtrlCreateLabel( '', 16, 270, 300, 28 )
    $Button6 = GUICtrlCreateButton("Weiter", 248, 312, 81, 20, 0)
    GUICtrlSetTip( -1, 'Weiter zum nächsten Song' )
    GUICtrlSetOnEvent( -1, '_next' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Button_Highscore = GUICtrlCreateButton( 'Highscore', 159, 312, 81, 20, 0 )
    GUICtrlSetOnEvent( -1, '_highscore' )
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    If Not FileExists( @ScriptDir & '\save.ini' ) Then
    If MsgBox( 36, 'Info', 'Sie scheinen das Programm zum ersten Mal zu starten.' & @CRLF & 'Wünschen Sie eine kleine Einführung ?' ) = 6 Then
    WinWaitActive( 'MusicQuiz' )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button3 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Wählen Sie zunächst einen Ordner mit max. 2000 Musikstücken.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    While GUICtrlRead( $Input1 ) = @ScriptDir & '\'
    Sleep( 100 )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button3 )
    If IsArray( $win_coords ) And IsArray( $coords ) ThenToolTip( '<- Wählen Sie zunächst einen Ordner mit max. 2000 Musikstücken.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    WEnd
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button2 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Klicken Sie nun auf ''Hinzufügen'' um die Liste zu erstellen.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    Sleep( 10000 )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button1 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Wählen Sie danach die erstellte Liste aus und klicken Sie ''ok''.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    While BitAND( GUICtrlGetState( $Button4 ), $GUI_DISABLE ) = $GUI_DISABLE
    Sleep( 100 )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button1 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Wählen Sie danach die erstellte Liste aus und klicken Sie ''ok''.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    WEnd
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button4 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Zum starten klicken Sie auf ''Start''.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    Sleep( 5000 )
    ToolTip( '' )
    EndIf
    EndIf

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

    $read = IniReadSectionNames( @ScriptDir & '\save.ini' )
    If Not @error Then
    For $i = 1 To $read[0]
    GUICtrlSetData( $Combo1, $read[$i] )
    Next
    EndIf

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

    While 1
    Sleep(100)
    WEnd

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

    Func _next()
    Local $richtig = False
    If ( BitAND( GUICtrlRead( $Radio1 ), $GUI_CHECKED ) = $GUI_CHECKED And $correctNr = 1 ) Or ( BitAND( GUICtrlRead( $Radio2 ), $GUI_CHECKED ) = $GUI_CHECKED And $correctNr = 2 ) Or ( BitAND( GUICtrlRead( $Radio3 ), $GUI_CHECKED ) = $GUI_CHECKED And $correctNr = 3 ) Then $richtig = True
    If $richtig Then
    If $curscore >= 0 Then
    $gscore += $curscore + $row
    EndIf
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore )
    GUICtrlSetData( $Label3, 'richtige Antwort ! =)' )
    Else
    If $curscore < 0 Then
    $gscore += $curscore
    EndIf
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore )
    GuiCtrlSetData( $Label3, 'leider falsch =(' & @CRLF &'Richtig war:' & $correctName )
    EndIf
    If $curscore = 100 And $richtig Then
    $row += 1
    Else
    $row = 0
    EndIf
    $curscore = 100
    GUICtrlSetData( $Label1, 'Akt. Frage: ' & $curscore & ' +' & $row & ' Reihenbonus' )
    $anzahl_fragen += 1
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore & ' / ' & $anzahl_fragen*100 )
    _do()
    EndFunc

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

    Func _replay()
    If GUICtrlRead( $Button4 ) = 'Start' Then Return
    $curscore -= 10
    GUICtrlSetData( $Label1, 'Akt. Frage: ' & $curscore )
    _SoundSeek( $oSound, $oPosH, $oPosM, $oPosS )
    SoundSetWaveVolume ( 0 )
    _SoundPlay( $oSound )
    For $s = 1 To 100 Step 2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    If $diff = 'easy' Then
    Sleep( 10000 )
    ElseIf $diff = 'medium' Then
    Sleep( 4000 )
    Else
    Sleep( 500 )
    EndIf
    For $s = 100 To 1 Step -2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    _SoundStop( $oSound )
    SoundSetWaveVolume ( 100 )
    EndFunc

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

    Func _start()
    If BitAND( GUICtrlRead( $Radio4 ), $GUI_CHECKED ) = $GUI_CHECKED Then
    $diff = 'easy'
    ElseIf BitAND( GUICtrlRead( $Radio5 ), $GUI_CHECKED ) = $GUI_CHECKED Then
    $diff = 'medium'
    Else
    $diff = 'hard'
    EndIf
    GUICtrlSetData( $Button4, 'Restart' )
    $anzahl_fragen = 0
    $row = 0
    Global $gscore = 0, $curscore = 100
    GUICtrlSetData( $Label1, 'Akt. Frage: ' & $curscore )
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore & ' / ' & $anzahl_fragen*100 )
    _do()
    EndFunc

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

    Func _do()
    $mp3 = IniReadSection( @ScriptDir & '\save.ini', $selected )

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

    Local $rand[3]
    Local $t[3]

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

    Do
    $rand[0] = Random( 2, $mp3[0][0], 1 )
    $prop = _property( $mp3[$rand[0]][1] )
    If IsArray( $prop ) Then
    $t[0] = $prop[1] & ' - ' & $prop[0]
    Else
    $t[0] = $prop
    EndIf
    Until $mp3[$rand[0]][1] <> ''

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

    Do
    $rand[1] = Random( 2, $mp3[0][0], 1 )
    $prop = _property( $mp3[$rand[1]][1] )
    If IsArray( $prop ) Then
    $t[1] = $prop[1] & ' - ' & $prop[0]
    Else
    $t[1] = $prop
    EndIf
    Until $mp3[$rand[1]][1] <> '' And $mp3[$rand[1]][1] <> $mp3[$rand[0]][1] And $t[1] <> $t[0]

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

    Do
    $rand[2] = Random( 2, $mp3[0][0], 1 )
    $prop = _property( $mp3[$rand[2]][1] )
    If IsArray( $prop ) Then
    $t[2] = $prop[1] & ' - ' & $prop[0]
    Else
    $t[2] = $prop
    EndIf
    Until $mp3[$rand[2]][1] <> '' And $mp3[$rand[2]][1] <> $mp3[$rand[1]][1] And $mp3[$rand[2]][1] <> $mp3[$rand[0]][1] And $t[2] <> $t[1] And $t[2] <> $t[0]

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

    Global $correctNr = Random( 1, 3, 1 )
    Global $correct = $mp3[$rand[$correctNr-1]][1]

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

    Global $correctName = $t[$correctNr-1]

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

    GUICtrlSetData( $Radio1, $t[0] )
    GUICtrlSetData( $Radio2, $t[1] )
    GUICtrlSetData( $Radio3, $t[2] )
    GUICtrlSetTip( $Radio1, $t[0] )
    GUICtrlSetTip( $Radio2, $t[1] )
    GUICtrlSetTip( $Radio3, $t[2] )
    Sleep( 1000 )
    Global $oSound = _SoundOpen( $correct )
    $oLen = _SoundLength( $oSound, 2 )
    $oPos = Int( $oLen/2)
    $oPosHrest = Mod( $oPos, 60*60*1000 )
    Global $oPosH = ($oPos-$oPosHrest)/(60*60*1000)

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

    $oPosMrest = Mod( $oPosHrest, 60*1000 )
    Global $oPosM = ($oPosHrest-$oPosMrest)/(60*1000)

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

    $oPosSrest = Mod( $oPosMrest, 1000 )
    Global $oPosS = ($oPosMrest-$oPosSrest)/(1000)

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

    _SoundSeek( $oSound, $oPosH, $oPosM, $oPosS )
    SoundSetWaveVolume ( 0 )
    _SoundPlay( $oSound, 0 )
    For $s = 1 To 100 Step 2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    If $diff = 'easy' Then
    Sleep( 10000 )
    ElseIf $diff = 'medium' Then
    Sleep( 4000 )
    Else
    Sleep( 200 )
    EndIf
    For $s = 100 To 1 Step -2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    _SoundStop( $oSound )
    SoundSetWaveVolume ( 100 )
    EndFunc

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

    Func _select()
    Global $selected = GUICtrlRead( $Combo1 )
    If $selected = '' Then
    MsgBox( 0, 'Error', 'Keine Liste gewählt' )
    GUICtrlSetState( $Radio1, $GUI_DISABLE )
    GUICtrlSetState( $Radio2, $GUI_DISABLE )
    GUICtrlSetState( $Radio3, $GUI_DISABLE )
    GUICtrlSetState( $Button4, $GUI_DISABLE )
    GUICtrlSetState( $Button5, $GUI_DISABLE )
    GUICtrlSetState( $Button6, $GUI_DISABLE )
    Return
    EndIf
    GUICtrlSetData( $Group2, 'Quiz - ' & $selected )
    GUICtrlSetState( $Radio1, $GUI_ENABLE )
    GUICtrlSetState( $Radio2, $GUI_ENABLE )
    GUICtrlSetState( $Radio3, $GUI_ENABLE )
    GUICtrlSetState( $Button4, $GUI_ENABLE )
    GUICtrlSetState( $Button5, $GUI_ENABLE )
    GUICtrlSetState( $Button6, $GUI_ENABLE )
    EndFunc

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

    Func _add()
    $mfolder = GUICtrlRead( $Input1 )

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

    $get = _getmp3( $mfolder )
    ;~ _ArrayDisplay( $get )
    $len = UBound( $get )
    Local $empty = True

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

    For $i = 0 To UBound( $get ) -1
    If $get[$i] <> '' Then
    $empty = False
    Else
    $len -= 1
    EndIf
    Next
    If $empty Then
    MsgBox( 16, 'Error', 'Es wurden keine *.mp3 gefunden.' )
    Return
    ElseIf $len < 4 Then
    _ArrayDisplay( $get )
    MsgBox( 16, 'Error', 'Es wurden zu wenige *.mp3 gefunden.' )
    Return
    Else
    $name = InputBox( 'Liste speichern', 'Die soeben erstellte Liste besteht aus ' & $len & ' Musikstücken,' & @CRLF & 'Sie können ihr nun einen individuellen Namen geben.', 'NewList' )
    If $name = '' Then Return

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

    If FileExists( @ScriptDir & '\save.ini' ) Then
    $check = IniReadSectionNames( @ScriptDir & '\save.ini' )
    $oldname = $name
    $n = 0
    While 1
    $n += 1
    For $ch = 1 To $check[0]
    If $name = $check[$ch] Then
    $name = $oldname & '('& $n &')'
    ContinueLoop 2
    EndIf
    Next
    ExitLoop
    WEnd
    EndIf

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

    $y = 0
    $o = UBound( $get )
    For $x = 0 To UBound( $get ) -1
    ToolTip( Int( $x/$o*100 ) & ' %' )
    If $get[$x] <> '' Then
    IniWrite( @ScriptDir & '\save.ini', $name, $y, $get[$x] )
    $y += 1
    EndIf
    Next
    ToolTip( '' )
    MsgBox( 0, 'Success', 'Die Liste "' & $name & '" wurde gespeichert' )
    GUICtrlSetData( $Combo1, $name )
    EndIf
    EndFunc

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

    Func _getmp3($root)
    If StringRight( $root, 1 ) <> '\' Then $root &= '\'
    Local $array[1]
    Local $i = 0
    FileChangeDir( $root )
    $first = FileFindFirstFile( '*.*' )
    While 1
    $next = FileFindNextFile( $first )
    If @error Then ExitLoop
    If StringRight( $next, 4 ) = '.mp3' Then
    $array[$i] = $root & $next
    $i += 1
    ReDim $array[$i+1]
    Else
    If FileExists( $root & $next ) Then
    $open = FileOpen( $root & $next, 0 )
    If $open = -1 Then
    $ret = _getmp3($root & $next)
    FileChangeDir( $root )
    For $a = 0 To UBound( $ret ) -1
    $array[$i] = $ret[$a]
    $i += 1
    ReDim $array[$i+1]
    Next
    Else
    FileClose( $open )
    EndIf
    EndIf
    EndIf
    WEnd
    Return $array
    EndFunc

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

    Func _durchsuchen()
    $folder = FileSelectFolder( 'select folder with your media', '' )
    If StringRight( $folder, 1 ) <> '\' Then $folder &= '\'
    GUICtrlSetData( $Input1, $folder )
    EndFunc
    Func _exit()
    SoundSetWaveVolume ( 100 )
    Exit
    EndFunc

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

    Func _property($path)
    Local $ordner = StringLeft( $path, StringInStr( $path, '\', 0, -1 ) )
    Local $file = StringTrimLeft( $path, StringLen( $ordner ) )
    Local $shell = ObjCreate( 'shell.application' )
    Local $shellOrdner = $shell.NameSpace( $ordner )
    Local $shellOrdnerDatei = $shellOrdner.ParseName( $file )
    Local $return_props[2]
    For $index = 1 To 99
    $re_props_type = $shellOrdner.GetDetailsOf($shellOrdner.Items, $index )
    If $re_props_type = 'Title' Or $re_props_type = 'Titel' Then $return_props[0] = $shellOrdner.GetDetailsOf( $shellOrdnerDatei, $index )
    If $re_props_type = 'Interpret' Then $return_props[1] = $shellOrdner.GetDetailsOf( $shellOrdnerDatei, $index )
    Next
    If $return_props[0] = '' Then Return $file
    Return $return_props
    EndFunc

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

    Func _radio()
    Local $diff_compare
    Switch @GUI_CtrlId
    Case $Radio4
    $diff_compare = 'easy'
    Case $Radio5
    $diff_compare = 'medium'
    Case $Radio6
    $diff_compare = 'hard'
    EndSwitch
    If $diff <> $diff_compare And GUICtrlRead( $Button4 ) <> 'Start' Then
    ToolTip( 'Um die Einstellung zu übernehmen muss die Runde neu gestartet werden.' )
    Sleep( 2500 )
    ToolTip( '' )
    EndIf
    EndFunc

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

    #Region highscore - new. Läuft hier via php, - action.php im Anhang.
    Func _highscore()
    Opt( 'GUIOnEventMode', 0 )
    $h_Form1 = GUICreate("Highscores - MusicQuiz", 347, 455, 193, 115)
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $h_Input1 = GUICtrlCreateInput(@UserName, 8, 392, 105, 21)
    $h_Input2 = GUICtrlCreateInput($gscore & '/' & $anzahl_fragen*100, 120, 392, 105, 21, $ES_READONLY)
    $h_Input3 = GUICtrlCreateInput(Round( ($gscore/($anzahl_fragen*100)), 3 ), 232, 392, 105, 21, $ES_READONLY)
    $h_Button1 = GUICtrlCreateButton("Absenden", 8, 424, 105, 20, 0)
    $h_Button2 = GUICtrlCreateButton("Schließen", 232, 424, 105, 20, 0)
    $h_Button3 = GUICtrlCreateButton("Aktualisieren", 120, 424, 105, 20, 0)
    GUISetState(@SW_SHOW)
    $nMsg = $h_Button3
    While 1

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

    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case $h_Button1
    If GUICtrlRead( $h_Input1 ) = '' Then
    MsgBox( 48, 'Error', 'Du hast keinen Namen angegeben.' )
    ElseIf $anzahl_fragen = 0 Or $gscore = 0 Then
    MsgBox( 48, 'Error', 'Du hast noch keine Songs erraten.' )
    Else
    GUICtrlSetState( $h_Button1, $GUI_DISABLE )
    $playername = GUICtrlRead( $h_Input1 )
    $punkte = $gscore & '/' & $anzahl_fragen*100
    $date_ = @MDAY & '.' & @MON & '.' & @YEAR
    GUICtrlDelete( $h_ListView1 )
    Global $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    _INetGetSource( 'http://www.unzensiert.biz/php/action.php?do=insert&name=' & $playername & '&punkte=' & $punkte & '&schnitt=' & Round( $gscore / ($anzahl_fragen*100), 3 ) & '&date=' & $date_ )
    _refresh()
    EndIf
    Case $h_Button2
    ExitLoop
    Case $h_Button3
    GUICtrlDelete( $h_ListView1 )
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $ref = _refresh()
    EndSwitch
    $nMsg = GUIGetMsg()
    WEnd
    GUIDelete( $h_Form1 )
    Opt( 'GUIOnEventMode', 1 )
    EndFunc
    Func _refresh()
    Local $rank = 1
    $ref_get = _INetGetSource( 'http://www.unzensiert.biz/php/action.php?do=list' )
    $ref_split1 = StringSplit( $ref_get, '<>', 1 )
    For $i = 1 To $ref_split1[0]
    $ref_wr = $rank & '|' & StringRight( $ref_split1[$i], StringLen( $ref_split1[$i] ) - StringInStr( $ref_split1[$i], '|', 0, 1 ) )
    GUICtrlCreateListViewItem( $ref_wr, $h_ListView1 )
    $rank += 1
    Next
    EndFunc

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

    #Region highscore - old. Kann leider nicht vom installierten ODBC-Treiber ausgehen...
    Func _highscore_old()
    Opt( 'GUIOnEventMode', 0 )
    $h_Form1 = GUICreate("Highscores - MusicQuiz", 347, 455, 193, 115)
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $h_Input1 = GUICtrlCreateInput(@UserName, 8, 392, 105, 21)
    $h_Input2 = GUICtrlCreateInput($gscore & '/' & $anzahl_fragen*100, 120, 392, 105, 21, $ES_READONLY)
    $h_Input3 = GUICtrlCreateInput(Round( ($gscore/($anzahl_fragen*100)), 3 ), 232, 392, 105, 21, $ES_READONLY)
    $h_Button1 = GUICtrlCreateButton("Absenden", 8, 424, 105, 20, 0)
    $h_Button2 = GUICtrlCreateButton("Schließen", 232, 424, 105, 20, 0)
    $h_Button3 = GUICtrlCreateButton("Aktualisieren", 120, 424, 105, 20, 0)
    GUISetState(@SW_SHOW)
    $nMsg = $h_Button3
    While 1

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

    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case $h_Button1
    If GUICtrlRead( $h_Input1 ) = '' Then
    MsgBox( 48, 'Error', 'Du hast keinen Namen angegeben.' )
    ElseIf $anzahl_fragen = 0 Or $gscore = 0 Then
    MsgBox( 48, 'Error', 'Du hast noch garkeine Songs erraten.' )
    Else
    $playername = GUICtrlRead( $h_Input1 )
    $punkte = $gscore & '/' & $anzahl_fragen*100
    $date_ = @MDAY & '.' & @MON & '.' & @YEAR
    $connect = _MySQLConnect( 'unzensiert', '********', 'unzensiert', 'FRESHSQL.COM')
    If @error Then
    MsgBox( 16, 'Error', 'Verbindung fehlgeschlagen' )
    ExitLoop
    EndIf
    $h_qu4insert = 'INSERT INTO highscore (name,punkte,durchschnitt,date) VALUES ("' & $playername & '","' & GUICtrlRead( $h_Input2 ) & '","' & GUICtrlRead( $h_Input3 ) & '","' & $date_ & '")'
    $connect.execute( $h_qu4insert )
    $h_qu4id = 'SELECT id FROM highscore WHERE name="' & $playername & '" AND punkte="' & $punkte & '" AND date="' & $date_ & '"'
    $h_result = $connect.execute( $h_qu4id )
    $id = $h_result.Fields(0).value
    _MySqlEnd( $connect )
    GUICtrlDelete( $h_ListView1 )
    Global $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $ind = _direkt_mysql_akt($id)
    GUICtrlSetState( $ind, $GUI_FOCUS )

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

    EndIf
    Case $h_Button2
    ExitLoop
    Case $h_Button3
    GUICtrlDelete( $h_ListView1 )
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    _direkt_mysql_akt()
    EndSwitch
    $nMsg = GUIGetMsg()
    WEnd
    GUIDelete( $h_Form1 )
    Opt( 'GUIOnEventMode', 1 )
    EndFunc
    Func _direkt_mysql_akt($mark=-1)
    Local $listviewindex
    $connect = _MySQLConnect( 'unzensiert', '********', 'unzensiert', 'FRESHSQL.COM')
    If @error Then
    MsgBox( 16, 'Error', 'Verbindung zur Highscore-Liste fehlgeschlagen.~error:' & @error )
    Return
    Else
    $h_qu4list = 'SELECT * FROM highscore ORDER BY durchschnitt DESC'
    $h_result = $connect.execute( $h_qu4list )
    Local $h_ind = 1
    With $h_result
    While Not .EOF
    $b = GUICtrlCreateListViewItem( $h_ind & '|' & .Fields(1).value & '|' & .Fields(2).value & '|' & .Fields(3).value & '|' & .Fields(4).value, $h_ListView1 )
    If $mark <> -1 Then
    If $mark = .Fields(0).value Then
    $listviewindex = $b;$h_ind
    EndIf
    EndIf
    .MoveNext
    $h_ind += 1
    WEnd
    EndWith
    EndIf
    _MySqlEnd( $connect )
    Return $listviewindex
    EndFunc
    #EndRegion

    [/autoit]

    Nicht so optimal fand ich, dass man das Lied immer hören musste, auch wenn man sich schon entschieden hatte. Gut hingegen sind die Gedanken bezühlich der Realisierung eines Highscores.

    Oscar:
    Bugs: Leerzeichen im Pfad gehen nicht

    autoit.de/wcf/attachment/2851/

    Spoiler anzeigen
    [autoit]

    #include<WindowsConstants.au3>
    #include<Sound.au3>
    #include<Array.au3>
    #include<EditConstants.au3>
    #include<ComboConstants.au3>
    #include<GUIConstantsEx.au3>
    #include <Inet.au3>
    #include 'mysql.au3'
    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.2.12.1
    Author: limette

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

    Script Function:
    MusicQuiz

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

    #ce ----------------------------------------------------------------------------
    Opt( 'TrayIconDebug', 1 )
    Global $selected = '', $diff = 'medium', $oSound, $oPosH, $oPosM, $oPosS, $curscore, $gscore, $correct, $correctNr, $anzahl_fragen = 0, $correctName, $row = 0
    Global $h_ListView1
    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\nils.nobody\desktop\musicquiz\aform1.kxf
    $Form1_1 = GUICreate("MusicQuiz", 347, 351, 195, 110)
    GUISetOnEvent( $GUI_EVENT_CLOSE, '_exit' )
    $Group1 = GUICtrlCreateGroup("Media", 8, 8, 329, 117)
    $Combo1 = GUICtrlCreateCombo("", 16, 24, 209, 25, $CBS_DROPDOWNLIST)
    GUICtrlSetTip( -1, 'Auswahl an Listen' )
    $Button1 = GUICtrlCreateButton("OK", 240, 24, 73, 20, 0)
    GUICtrlSetTip( -1, 'Bestätigt die Auswahl der Liste' )
    GUICtrlSetOnEvent( -1, '_select' )
    $Button2 = GUICtrlCreateButton("Hinzufügen", 240, 96, 73, 20, 0)
    GUICtrlSetTip( -1, 'Fügt den gewählten Ordner als Liste hinzu' )
    GUICtrlSetOnEvent( -1, '_add' )
    $Input1 = GUICtrlCreateEdit(@ScriptDir & '\', 16, 72, 209, 42, BitOR( $ES_READONLY, $WS_VSCROLL, $ES_AUTOVSCROLL ))
    $Button3 = GUICtrlCreateButton(" ... ", 240, 72, 73, 20, 0)
    GUICtrlSetTip( -1, 'Durchsuchen Sie ihren PC nach Ordnern mit *.mp3-Dateien' )
    GUICtrlSetOnEvent( -1, '_durchsuchen' )
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Radio4 = GUICtrlCreateRadio("leicht", 180, 150, 40, 17)
    GUICtrlSetOnEvent( -1, '_radio' )
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Radio5 = GUICtrlCreateRadio("mittel", 230, 150, 40, 17)
    GUICtrlSetOnEvent( -1, '_radio' )
    $Radio6 = GUICtrlCreateRadio("schwer", 280, 150, 49, 17)
    GUICtrlSetOnEvent( -1, '_radio' )
    $Group2 = GUICtrlCreateGroup("Quiz", 8, 142, 329, 195)
    $Button4 = GUICtrlCreateButton("Start", 16, 168, 73, 20, 0)
    GUICtrlSetTip( -1, 'Startet das Quiz' )
    GUICtrlSetOnEvent( -1, '_start' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Radio1 = GUICtrlCreateRadio("Antwort A", 98, 168, 231, 25)
    GUICtrlSetTip( -1, 'Antwort A' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Radio2 = GUICtrlCreateRadio("Antwort B", 98, 200, 231, 25)
    GUICtrlSetTip( -1, 'Antwort B' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Radio3 = GUICtrlCreateRadio("Antwort C", 98, 232, 231, 25)
    GUICtrlSetTip( -1, 'Antwort C' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Button5 = GUICtrlCreateButton("Replay", 32, 192, 41, 33, 0)
    GUICtrlSetTip( -1, 'Wiederholt den Ausschnitt' )
    GUICtrlSetOnEvent( -1, '_replay' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Label1 = GUICtrlCreateLabel("Akt. Frage:", 16, 256, 229, 17)
    $Label2 = GUICtrlCreateLabel("Gesamtpunktzahl: ", 16, 297, 230, 17)
    $Label3 = GUICtrlCreateLabel( '', 16, 270, 300, 28 )
    $Button6 = GUICtrlCreateButton("Weiter", 248, 312, 81, 20, 0)
    GUICtrlSetTip( -1, 'Weiter zum nächsten Song' )
    GUICtrlSetOnEvent( -1, '_next' )
    GUICtrlSetState( -1, $GUI_DISABLE )
    $Button_Highscore = GUICtrlCreateButton( 'Highscore', 159, 312, 81, 20, 0 )
    GUICtrlSetOnEvent( -1, '_highscore' )
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    If Not FileExists( @ScriptDir & '\save.ini' ) Then
    If MsgBox( 36, 'Info', 'Sie scheinen das Programm zum ersten Mal zu starten.' & @CRLF & 'Wünschen Sie eine kleine Einführung ?' ) = 6 Then
    WinWaitActive( 'MusicQuiz' )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button3 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Wählen Sie zunächst einen Ordner mit max. 2000 Musikstücken.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    While GUICtrlRead( $Input1 ) = @ScriptDir & '\'
    Sleep( 100 )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button3 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Wählen Sie zunächst einen Ordner mit max. 2000 Musikstücken.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    WEnd
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button2 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Klicken Sie nun auf ''Hinzufügen'' um die Liste zu erstellen.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    Sleep( 10000 )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button1 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Wählen Sie danach die erstellte Liste aus und klicken Sie ''ok''.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    While BitAND( GUICtrlGetState( $Button4 ), $GUI_DISABLE ) = $GUI_DISABLE
    Sleep( 100 )
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button1 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Wählen Sie danach die erstellte Liste aus und klicken Sie ''ok''.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    WEnd
    $win_coords = WinGetPos( 'MusicQuiz', '' )
    $coords = ControlGetPos( 'MusicQuiz', '', $Button4 )
    If IsArray( $win_coords ) And IsArray( $coords ) Then ToolTip( '<- Zum starten klicken Sie auf ''Start''.', $win_coords[0]+$coords[0]+73, $win_coords[1]+$coords[1]+30 )
    Sleep( 5000 )
    ToolTip( '' )
    EndIf
    EndIf

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

    $read = IniReadSectionNames( @ScriptDir & '\save.ini' )
    If Not @error Then
    For $i = 1 To $read[0]
    GUICtrlSetData( $Combo1, $read[$i] )
    Next
    EndIf

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

    While 1
    Sleep(100)
    WEnd

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

    Func _next()
    Local $richtig = False
    If ( BitAND( GUICtrlRead( $Radio1 ), $GUI_CHECKED ) = $GUI_CHECKED And $correctNr = 1 ) Or ( BitAND( GUICtrlRead( $Radio2 ), $GUI_CHECKED ) = $GUI_CHECKED And $correctNr = 2 ) Or ( BitAND( GUICtrlRead( $Radio3 ), $GUI_CHECKED ) = $GUI_CHECKED And $correctNr = 3 ) Then $richtig = True
    If $richtig Then
    If $curscore >= 0 Then
    $gscore += $curscore + $row
    EndIf
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore )
    GUICtrlSetData( $Label3, 'richtige Antwort ! =)' )
    Else
    If $curscore < 0 Then
    $gscore += $curscore
    EndIf
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore )
    GuiCtrlSetData( $Label3, 'leider falsch =(' & @CRLF &'Richtig war: ' & $correctName )
    EndIf
    If $curscore = 100 And $richtig Then
    $row += 1
    Else
    $row = 0
    EndIf
    $curscore = 100
    GUICtrlSetData( $Label1, 'Akt. Frage: ' & $curscore & ' +' & $row & ' Reihenbonus' )
    $anzahl_fragen += 1
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore & ' / ' & $anzahl_fragen*100 )
    _do()
    EndFunc

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

    Func _replay()
    If GUICtrlRead( $Button4 ) = 'Start' Then Return
    $curscore -= 10
    GUICtrlSetData( $Label1, 'Akt. Frage: ' & $curscore )
    _SoundSeek( $oSound, $oPosH, $oPosM, $oPosS )
    SoundSetWaveVolume ( 0 )
    _SoundPlay( $oSound )
    For $s = 1 To 100 Step 2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    If $diff = 'easy' Then
    Sleep( 10000 )
    ElseIf $diff = 'medium' Then
    Sleep( 4000 )
    Else
    Sleep( 500 )
    EndIf
    For $s = 100 To 1 Step -2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    _SoundStop( $oSound )
    SoundSetWaveVolume ( 100 )
    EndFunc

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

    Func _start()
    If BitAND( GUICtrlRead( $Radio4 ), $GUI_CHECKED ) = $GUI_CHECKED Then
    $diff = 'easy'
    ElseIf BitAND( GUICtrlRead( $Radio5 ), $GUI_CHECKED ) = $GUI_CHECKED Then
    $diff = 'medium'
    Else
    $diff = 'hard'
    EndIf
    GUICtrlSetData( $Button4, 'Restart' )
    $anzahl_fragen = 0
    $row = 0
    Global $gscore = 0, $curscore = 100
    GUICtrlSetData( $Label1, 'Akt. Frage: ' & $curscore )
    GUICtrlSetData( $Label2, 'Gesamtpunktzahl: ' & $gscore & ' / ' & $anzahl_fragen*100 )
    _do()
    EndFunc

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

    Func _do()
    $mp3 = IniReadSection( @ScriptDir & '\save.ini', $selected )

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


    Local $rand[3]
    Local $t[3]

    Do
    $rand[0] = Random( 2, $mp3[0][0], 1 )
    $prop = _property( $mp3[$rand[0]][1] )
    If IsArray( $prop ) Then
    $t[0] = $prop[1] & ' - ' & $prop[0]
    Else
    $t[0] = $prop
    EndIf
    Until $mp3[$rand[0]][1] <> ''

    Do
    $rand[1] = Random( 2, $mp3[0][0], 1 )
    $prop = _property( $mp3[$rand[1]][1] )
    If IsArray( $prop ) Then
    $t[1] = $prop[1] & ' - ' & $prop[0]
    Else
    $t[1] = $prop
    EndIf
    Until $mp3[$rand[1]][1] <> '' And $mp3[$rand[1]][1] <> $mp3[$rand[0]][1] And $t[1] <> $t[0]

    Do
    $rand[2] = Random( 2, $mp3[0][0], 1 )
    $prop = _property( $mp3[$rand[2]][1] )
    If IsArray( $prop ) Then
    $t[2] = $prop[1] & ' - ' & $prop[0]
    Else
    $t[2] = $prop
    EndIf
    Until $mp3[$rand[2]][1] <> '' And $mp3[$rand[2]][1] <> $mp3[$rand[1]][1] And $mp3[$rand[2]][1] <> $mp3[$rand[0]][1] And $t[2] <> $t[1] And $t[2] <> $t[0]

    Global $correctNr = Random( 1, 3, 1 )
    Global $correct = $mp3[$rand[$correctNr-1]][1]

    Global $correctName = $t[$correctNr-1]

    GUICtrlSetData( $Radio1, $t[0] )
    GUICtrlSetData( $Radio2, $t[1] )
    GUICtrlSetData( $Radio3, $t[2] )
    GUICtrlSetTip( $Radio1, $t[0] )
    GUICtrlSetTip( $Radio2, $t[1] )
    GUICtrlSetTip( $Radio3, $t[2] )
    Sleep( 1000 )
    Global $oSound = _SoundOpen( $correct )
    $oLen = _SoundLength( $oSound, 2 )
    $oPos = Int( $oLen/2)
    $oPosHrest = Mod( $oPos, 60*60*1000 )
    Global $oPosH = ($oPos-$oPosHrest)/(60*60*1000)

    $oPosMrest = Mod( $oPosHrest, 60*1000 )
    Global $oPosM = ($oPosHrest-$oPosMrest)/(60*1000)

    $oPosSrest = Mod( $oPosMrest, 1000 )
    Global $oPosS = ($oPosMrest-$oPosSrest)/(1000)


    _SoundSeek( $oSound, $oPosH, $oPosM, $oPosS )
    SoundSetWaveVolume ( 0 )
    _SoundPlay( $oSound, 0 )
    For $s = 1 To 100 Step 2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    If $diff = 'easy' Then
    Sleep( 10000 )
    ElseIf $diff = 'medium' Then
    Sleep( 4000 )
    Else
    Sleep( 200 )
    EndIf
    For $s = 100 To 1 Step -2
    SoundSetWaveVolume ( $s )
    Sleep( 20 )
    Next
    _SoundStop( $oSound )
    SoundSetWaveVolume ( 100 )
    EndFunc

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

    Func _select()
    Global $selected = GUICtrlRead( $Combo1 )
    If $selected = '' Then
    MsgBox( 0, 'Error', 'Keine Liste gewählt' )
    GUICtrlSetState( $Radio1, $GUI_DISABLE )
    GUICtrlSetState( $Radio2, $GUI_DISABLE )
    GUICtrlSetState( $Radio3, $GUI_DISABLE )
    GUICtrlSetState( $Button4, $GUI_DISABLE )
    GUICtrlSetState( $Button5, $GUI_DISABLE )
    GUICtrlSetState( $Button6, $GUI_DISABLE )
    Return
    EndIf
    GUICtrlSetData( $Group2, 'Quiz - ' & $selected )
    GUICtrlSetState( $Radio1, $GUI_ENABLE )
    GUICtrlSetState( $Radio2, $GUI_ENABLE )
    GUICtrlSetState( $Radio3, $GUI_ENABLE )
    GUICtrlSetState( $Button4, $GUI_ENABLE )
    GUICtrlSetState( $Button5, $GUI_ENABLE )
    GUICtrlSetState( $Button6, $GUI_ENABLE )
    EndFunc

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

    Func _add()
    $mfolder = GUICtrlRead( $Input1 )

    $get = _getmp3( $mfolder )
    ;~ _ArrayDisplay( $get )
    $len = UBound( $get )
    Local $empty = True

    For $i = 0 To UBound( $get ) -1
    If $get[$i] <> '' Then
    $empty = False
    Else
    $len -= 1
    EndIf
    Next
    If $empty Then
    MsgBox( 16, 'Error', 'Es wurden keine *.mp3 gefunden.' )
    Return
    ElseIf $len < 4 Then
    _ArrayDisplay( $get )
    MsgBox( 16, 'Error', 'Es wurden zu wenige *.mp3 gefunden.' )
    Return
    Else
    $name = InputBox( 'Liste speichern', 'Die soeben erstellte Liste besteht aus ' & $len & ' Musikstücken,' & @CRLF & 'Sie können ihr nun einen individuellen Namen geben.', 'NewList' )
    If $name = '' Then Return

    If FileExists( @ScriptDir & '\save.ini' ) Then
    $check = IniReadSectionNames( @ScriptDir & '\save.ini' )
    $oldname = $name
    $n = 0
    While 1
    $n += 1
    For $ch = 1 To $check[0]
    If $name = $check[$ch] Then
    $name = $oldname & '('& $n &')'
    ContinueLoop 2
    EndIf
    Next
    ExitLoop
    WEnd
    EndIf

    $y = 0
    $o = UBound( $get )
    For $x = 0 To UBound( $get ) -1
    ToolTip( Int( $x/$o*100 ) & ' %' )
    If $get[$x] <> '' Then
    IniWrite( @ScriptDir & '\save.ini', $name, $y, $get[$x] )
    $y += 1
    EndIf
    Next
    ToolTip( '' )
    MsgBox( 0, 'Success', 'Die Liste "' & $name & '" wurde gespeichert' )
    GUICtrlSetData( $Combo1, $name )
    EndIf
    EndFunc

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

    Func _getmp3($root)
    If StringRight( $root, 1 ) <> '\' Then $root &= '\'
    Local $array[1]
    Local $i = 0
    FileChangeDir( $root )
    $first = FileFindFirstFile( '*.*' )
    While 1
    $next = FileFindNextFile( $first )
    If @error Then ExitLoop
    If StringRight( $next, 4 ) = '.mp3' Then
    $array[$i] = $root & $next
    $i += 1
    ReDim $array[$i+1]
    Else
    If FileExists( $root & $next ) Then
    $open = FileOpen( $root & $next, 0 )
    If $open = -1 Then
    $ret = _getmp3($root & $next)
    FileChangeDir( $root )
    For $a = 0 To UBound( $ret ) -1
    $array[$i] = $ret[$a]
    $i += 1
    ReDim $array[$i+1]
    Next
    Else
    FileClose( $open )
    EndIf
    EndIf
    EndIf
    WEnd
    Return $array
    EndFunc

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

    Func _durchsuchen()
    $folder = FileSelectFolder( 'select folder with your media', '' )
    If StringRight( $folder, 1 ) <> '\' Then $folder &= '\'
    GUICtrlSetData( $Input1, $folder )
    EndFunc
    Func _exit()
    SoundSetWaveVolume ( 100 )
    Exit
    EndFunc

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

    Func _property($path)
    Local $ordner = StringLeft( $path, StringInStr( $path, '\', 0, -1 ) )
    Local $file = StringTrimLeft( $path, StringLen( $ordner ) )
    Local $shell = ObjCreate( 'shell.application' )
    Local $shellOrdner = $shell.NameSpace( $ordner )
    Local $shellOrdnerDatei = $shellOrdner.ParseName( $file )
    Local $return_props[2]
    For $index = 1 To 99
    $re_props_type = $shellOrdner.GetDetailsOf($shellOrdner.Items, $index )
    If $re_props_type = 'Title' Or $re_props_type = 'Titel' Then $return_props[0] = $shellOrdner.GetDetailsOf( $shellOrdnerDatei, $index )
    If $re_props_type = 'Interpret' Then $return_props[1] = $shellOrdner.GetDetailsOf( $shellOrdnerDatei, $index )
    Next
    If $return_props[0] = '' Then Return $file
    Return $return_props
    EndFunc

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

    Func _radio()
    Local $diff_compare
    Switch @GUI_CtrlId
    Case $Radio4
    $diff_compare = 'easy'
    Case $Radio5
    $diff_compare = 'medium'
    Case $Radio6
    $diff_compare = 'hard'
    EndSwitch
    If $diff <> $diff_compare And GUICtrlRead( $Button4 ) <> 'Start' Then
    ToolTip( 'Um die Einstellung zu übernehmen muss die Runde neu gestartet werden.' )
    Sleep( 2500 )
    ToolTip( '' )
    EndIf
    EndFunc

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

    #Region highscore - new. Läuft hier via php, - action.php im Anhang.
    Func _highscore()
    Opt( 'GUIOnEventMode', 0 )
    $h_Form1 = GUICreate("Highscores - MusicQuiz", 347, 455, 193, 115)
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $h_Input1 = GUICtrlCreateInput(@UserName, 8, 392, 105, 21)
    $h_Input2 = GUICtrlCreateInput($gscore & '/' & $anzahl_fragen*100, 120, 392, 105, 21, $ES_READONLY)
    $h_Input3 = GUICtrlCreateInput(Round( ($gscore/($anzahl_fragen*100)), 3 ), 232, 392, 105, 21, $ES_READONLY)
    $h_Button1 = GUICtrlCreateButton("Absenden", 8, 424, 105, 20, 0)
    $h_Button2 = GUICtrlCreateButton("Schließen", 232, 424, 105, 20, 0)
    $h_Button3 = GUICtrlCreateButton("Aktualisieren", 120, 424, 105, 20, 0)
    GUISetState(@SW_SHOW)
    $nMsg = $h_Button3
    While 1

    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case $h_Button1
    If GUICtrlRead( $h_Input1 ) = '' Then
    MsgBox( 48, 'Error', 'Du hast keinen Namen angegeben.' )
    ElseIf $anzahl_fragen = 0 Or $gscore = 0 Then
    MsgBox( 48, 'Error', 'Du hast noch keine Songs erraten.' )
    Else
    GUICtrlSetState( $h_Button1, $GUI_DISABLE )
    $playername = GUICtrlRead( $h_Input1 )
    $punkte = $gscore & '/' & $anzahl_fragen*100
    $date_ = @MDAY & '.' & @MON & '.' & @YEAR
    GUICtrlDelete( $h_ListView1 )
    Global $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    _INetGetSource( 'http://www.unzensiert.biz/php/action.php?do=insert&name=' & $playername & '&punkte=' & $punkte & '&schnitt=' & Round( $gscore / ($anzahl_fragen*100), 3 ) & '&date=' & $date_ )
    _refresh()
    EndIf
    Case $h_Button2
    ExitLoop
    Case $h_Button3
    GUICtrlDelete( $h_ListView1 )
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $ref = _refresh()
    EndSwitch
    $nMsg = GUIGetMsg()
    WEnd
    GUIDelete( $h_Form1 )
    Opt( 'GUIOnEventMode', 1 )
    EndFunc
    Func _refresh()
    Local $rank = 1
    $ref_get = _INetGetSource( 'http://www.unzensiert.biz/php/action.php?do=list' )
    $ref_split1 = StringSplit( $ref_get, '<>', 1 )
    For $i = 1 To $ref_split1[0]
    $ref_wr = $rank & '|' & StringRight( $ref_split1[$i], StringLen( $ref_split1[$i] ) - StringInStr( $ref_split1[$i], '|', 0, 1 ) )
    GUICtrlCreateListViewItem( $ref_wr, $h_ListView1 )
    $rank += 1
    Next
    EndFunc

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

    #Region highscore - old. Kann leider nicht vom installierten ODBC-Treiber ausgehen...
    Func _highscore_old()
    Opt( 'GUIOnEventMode', 0 )
    $h_Form1 = GUICreate("Highscores - MusicQuiz", 347, 455, 193, 115)
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $h_Input1 = GUICtrlCreateInput(@UserName, 8, 392, 105, 21)
    $h_Input2 = GUICtrlCreateInput($gscore & '/' & $anzahl_fragen*100, 120, 392, 105, 21, $ES_READONLY)
    $h_Input3 = GUICtrlCreateInput(Round( ($gscore/($anzahl_fragen*100)), 3 ), 232, 392, 105, 21, $ES_READONLY)
    $h_Button1 = GUICtrlCreateButton("Absenden", 8, 424, 105, 20, 0)
    $h_Button2 = GUICtrlCreateButton("Schließen", 232, 424, 105, 20, 0)
    $h_Button3 = GUICtrlCreateButton("Aktualisieren", 120, 424, 105, 20, 0)
    GUISetState(@SW_SHOW)
    $nMsg = $h_Button3
    While 1

    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case $h_Button1
    If GUICtrlRead( $h_Input1 ) = '' Then
    MsgBox( 48, 'Error', 'Du hast keinen Namen angegeben.' )
    ElseIf $anzahl_fragen = 0 Or $gscore = 0 Then
    MsgBox( 48, 'Error', 'Du hast noch garkeine Songs erraten.' )
    Else
    $playername = GUICtrlRead( $h_Input1 )
    $punkte = $gscore & '/' & $anzahl_fragen*100
    $date_ = @MDAY & '.' & @MON & '.' & @YEAR
    $connect = _MySQLConnect( 'unzensiert', '********', 'unzensiert', 'FRESHSQL.COM')
    If @error Then
    MsgBox( 16, 'Error', 'Verbindung fehlgeschlagen' )
    ExitLoop
    EndIf
    $h_qu4insert = 'INSERT INTO highscore (name,punkte,durchschnitt,date) VALUES ("' & $playername & '","' & GUICtrlRead( $h_Input2 ) & '","' & GUICtrlRead( $h_Input3 ) & '","' & $date_ & '")'
    $connect.execute( $h_qu4insert )
    $h_qu4id = 'SELECT id FROM highscore WHERE name="' & $playername & '" AND punkte="' & $punkte & '" AND date="' & $date_ & '"'
    $h_result = $connect.execute( $h_qu4id )
    $id = $h_result.Fields(0).value
    _MySqlEnd( $connect )
    GUICtrlDelete( $h_ListView1 )
    Global $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    $ind = _direkt_mysql_akt($id)
    GUICtrlSetState( $ind, $GUI_FOCUS )

    EndIf
    Case $h_Button2
    ExitLoop
    Case $h_Button3
    GUICtrlDelete( $h_ListView1 )
    $h_ListView1 = GUICtrlCreateListView("Rang|Name|Punkte|Durchschnitt|Datum", 8, 16, 329, 361)
    _direkt_mysql_akt()
    EndSwitch
    $nMsg = GUIGetMsg()
    WEnd
    GUIDelete( $h_Form1 )
    Opt( 'GUIOnEventMode', 1 )
    EndFunc
    Func _direkt_mysql_akt($mark=-1)
    Local $listviewindex
    $connect = _MySQLConnect( 'unzensiert', '********', 'unzensiert', 'FRESHSQL.COM')
    If @error Then
    MsgBox( 16, 'Error', 'Verbindung zur Highscore-Liste fehlgeschlagen.~error:' & @error )
    Return
    Else
    $h_qu4list = 'SELECT * FROM highscore ORDER BY durchschnitt DESC'
    $h_result = $connect.execute( $h_qu4list )
    Local $h_ind = 1
    With $h_result
    While Not .EOF
    $b = GUICtrlCreateListViewItem( $h_ind & '|' & .Fields(1).value & '|' & .Fields(2).value & '|' & .Fields(3).value & '|' & .Fields(4).value, $h_ListView1 )
    If $mark <> -1 Then
    If $mark = .Fields(0).value Then
    $listviewindex = $b;$h_ind
    EndIf
    EndIf
    .MoveNext
    $h_ind += 1
    WEnd
    EndWith
    EndIf
    _MySqlEnd( $connect )
    Return $listviewindex
    EndFunc
    #EndRegion

    [/autoit]

    Sehr schöne Realisierung. Aufgabe sehr ausführlich und mit vielen originellen Details. Die realisierung der Playlist und das Design sind sehr gelungen.


    Gewinner im August ist:
    Oscar
    Grund dafür ist die ausführliche Bearbeitung der Aufgabe. Grafisch überzeugend und auch funktionell. Ein Programm welches man wirklich gut, einfach mal zwischendurch, nutzen kann. Die Probleme mit dem Leerzeichen im Pfad find ich nicht so tragisch denn Hauptsache ist ja das das Programm an sich funktioniert.

    Danke an alle Andere - butte nicht enttäuscht sein und aufgeben, vlt. klappts das nächste mal
    Walle

    Flensburg ist wie Payback - wenn man 18 Punkte hat bekommt man ein Fahrrad.

    2 Mal editiert, zuletzt von Waluev (29. August 2008 um 15:05)

  • Herzlichen Glückwunsch Oscar :) (Warum bloß hab ich mir das gedacht :D ) Auch Danke an Waluev für die Auswertung und die kreative Aufgabe.

  • Zitat

    Gewinner im Juli ist:
    Oscar


    Juli ? ;)

    Erstmal Herzlichen Glückwunsch, Oscar ! =)

    limette

    Note: Persönliches Ziel erreicht - einziges Prog ohne Bugs. *yes!*

    There are only 10 types of people in the world:
    Those who understand binary - and those who don't.