praktischer Musikplayer

  • So,
    jetzt stell ich auch mal mein erstes Programm vor:
    Es ist ein Musikplay,er bei dem man entweder zu Beginn eine neue Playlist erstellt oder eine alte (falls vorhanden) lädt.
    Daraufhin kann man den Player über den Button "start player" starten.
    Danach kommt einer MsgBox mit den Hotkeys für das Programm.
    Drückt Alt+P für play und es geht los.

    Spoiler anzeigen

    Alt+P = Play, Alt+S = Stop, Alt+N = Next Song , Alt+B = Song Back, Alt+V = Volume und Alt+E = Ende.


    Der Vortiel ist: Der Musikplayer kann nur über Hotkeys gesteuert werden, das heißt ihr habt kein lästiges Umschalten, wenn ihr einen Titel anhalten wollt oder
    versucht den nächsten Titel zu starten. Es läuft alles per Tastendruck!
    Vielen Dank an der Stelle noch an Ideas2Code, der mir hier: [ gelöst ] Ini-Write funktioniert nicht? weitergeholfen hat.
    So im Anhang befinden sich die Dateien!
    Nach dem Download und Entpacken müsst ihr die Player.exe starten!
    Viel Spaß damit!


    Script:
    1. (Nimmt Playlist auf)

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>

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

    $count = 1
    $file = @WindowsDir
    $countr = 1
    $i = 0
    $f = 0
    Dim $read[500]

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

    $form = GUICreate("RemiXXer by stay und raven", 625, 443, 193, 125)
    $list = GUICtrlCreateList("", 40, 96, 377, 188)
    $load = GUICtrlCreateButton("Neuen Song laden", 440, 112, 129, 41, 0)
    $label1 = GUICtrlCreateLabel("RemiXXer", 72, 0, 304, 84)
    GUICtrlSetFont(-1, 70, 400, 0, "MS Sans Serif")
    $delete = GUICtrlCreateButton("Liste löschen", 440, 168, 129, 41, 0)
    $run = GUICtrlCreateButton("Start Player!", 440, 224, 129, 41, 0)
    $exit = GUICtrlCreateButton("Exit", 440, 368, 129, 41, 0)
    $loadoldlist = GUICtrlCreateButton("Alte Liste laden", 100, 368, 129, 41, 0)
    GUISetState(@SW_SHOW)

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

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    ex()

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

    Case $delete
    delete()

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

    Case $load
    load()

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

    Case $exit
    ex()

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

    Case $run
    run("playcatcher.exe")
    Exit

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

    Case $loadoldlist
    loadold()

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

    EndSwitch
    WEnd

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

    Func load()
    if FileExists("playlist.ini") Then
    FileDelete("playlist.ini")
    EndIf
    $file = FileOpenDialog("Titel hinzufügen", $file, "Sounddateien (*.mp3;*.wma;*.wav)")
    IniWrite(@ScriptDir & "\playlist.ini", "Playlist", $count, $file)
    GUIctrlsetdata($list, $file)

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

    $count = $count + 1

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

    EndFunc

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

    Func loadold()
    While 1
    $i = $i + 1 ; für auslesearray
    $f = $f + 1 ;
    $read[$i] = IniRead("playlist.ini", "Playlist", $f, "")
    if $read[$i] = "" Then
    ExitLoop
    Else
    GUICtrlSetData($list, $read[$i])
    EndIf
    WEnd

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

    EndFunc

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

    Func delete()
    GUICtrlSetData($list, "")
    FileDelete("playlist.ini")
    EndFunc

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

    Func ex()
    MsgBox(0, "Auf Wiedersehen!", "Auf Wiedersehen, bis zum nächsten Mal! By stayawayknight")
    Exit

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

    EndFunc

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

    2. (Das wo das abspielt):

    Spoiler anzeigen
    [autoit]

    #include <Sound.au3>

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

    HotkeySet("!{p}", "play")
    HotKeySet("!{s}", "stop")
    HotKeySet("!{n}", "nexts")
    HotKeySet("!{e}", "ende")
    HotKeySet("!{b}", "back")
    HotKeySet("!{v}", "volume")
    HotKeySet("!{z}", "zufall")

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

    $a = 0 ; bewirkt die untilschleife und bricht play1 ab, wenn next kommt
    $count = 1 ; zählt songs

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

    $vol = 75

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

    Msgbox(0, "Start", "Folgende Hotkeys sind wichtig: Alt+P = Play, Alt+S = Stop, Alt+N = Next Song , Alt+B = Song Back, Alt+V = Volume und Alt+E = Ende.")

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

    Func play()

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

    Do

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

    $file = IniRead("playlist.ini", "Playlist", $count, "")
    $lengh = _SoundLength ($file, 2)
    SoundPlay($file)
    ToolTip("Play")
    Sleep(2000)
    ToolTip("")
    Sleep($lengh)
    $count = $count + 1

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

    Until $a = 1

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

    EndFunc

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

    Func ende()
    Tooltip("Ende, wird beendet ...")
    Sleep(2000)
    Exit

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

    EndFunc

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

    Func volume()

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

    $vol = Inputbox("Lautstärke", "Gib die gewünschte Lautstärke (1-100) ein! Momentan: " & $vol)
    SoundSetWaveVolume($vol)

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

    EndFunc

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

    Func stop()
    Run("playcatcher.exe")
    Exit
    EndFunc

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

    Func nexts()
    $a = 1
    $count = $count + 1
    ToolTip("Next")
    Sleep(2000)
    play()
    $a = 0
    EndFunc

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

    Func back()
    $a = 1
    $count = $count - 1
    ToolTip("Back")
    Sleep(2000)
    play()
    $a = 0
    EndFunc

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

    While 1
    WEnd

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

    Kann man auch in ein Script setzen, sollte so aber eig. den Vorteil habe das man den 2.Teil (das Abspielen) auch gleich machen kann, ohne durchs Menü zu müssen.


    Script jetzt auch in der Downloaddatei eingefügt

  • die schlechte seite daran ist leider:
    wenn man am proggen/schreiben ist labert der einen voll mit dem drucken (also fürn drucker)
    sonst ganz okay =)

    Ja, deswegen ist es ja Alt+P und nicht Strg+P.

    Zitat

    jup richtig praktisch ist es dann wenn man sich die hotkeys selbst einstellen kann

    Ja,danke für den Tipp ich arbeite dran :)

  • Ich glaube Schnitzel meinte das das ja jeder kann, der AutoIt kann.
    Aber eine andere Einstellungsmöglichkeit kann nicht verkehrt sein ^^

    mfg Ubuntu

  • im script gibts keine funktion für "zufall"!
    Edit\\ habe die ma eingebaut:

    Spoiler anzeigen
    [autoit]

    #include <Sound.au3>
    #Include <File.au3>

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

    HotkeySet("!{p}", "play")
    HotKeySet("!{s}", "stop")
    HotKeySet("!{n}", "nexts")
    HotKeySet("!{e}", "ende")
    HotKeySet("!{b}", "back")
    HotKeySet("!{v}", "volume")
    HotKeySet("!{z}", "zufall")

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

    $a = 0 ; bewirkt die untilschleife und bricht play1 ab, wenn next kommt
    $count = 1 ; zählt songs

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

    $vol = 75

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

    Msgbox(0, "Start", "Folgende Hotkeys sind wichtig: Alt+P = Play, Alt+S = Stop, Alt+N = Next Song , Alt+B = Song Back, Alt+V = Volume und Alt+E = Ende , Alt+Z = Zufall")

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

    Func play()
    Do
    $file = IniRead("playlist.ini", "Playlist", $count, "")
    $lengh = _SoundLength ($file, 2)
    SoundPlay($file)
    ToolTip("Play")
    Sleep(2000)
    ToolTip("")
    Sleep($lengh)
    $count = $count + 1
    Until $a = 1
    EndFunc
    Func ende()
    Tooltip("Ende, wird beendet ...")
    Sleep(2000)
    Exit
    EndFunc
    Func volume()
    $vol = Inputbox("Lautstärke", "Gib die gewünschte Lautstärke (1-100) ein! Momentan: " & $vol)
    SoundSetWaveVolume($vol)
    EndFunc
    Func stop()
    Run("playcatcher.exe")
    Exit
    EndFunc
    Func nexts()
    $a = 1
    $count = $count + 1
    ToolTip("Next")
    Sleep(2000)
    play()
    $a = 0
    EndFunc
    Func back()
    $a = 1
    $count = $count - 1
    ToolTip("Back")
    Sleep(2000)
    play()
    $a = 0
    EndFunc
    While 1
    Sleep(20)
    WEnd

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

    Func zufall ()
    Do
    $file = IniRead("playlist.ini", "Playlist", Random( 1, _FileCountLines("playlist.ini"),1) , "")
    $lengh = _SoundLength ($file, 2)
    SoundPlay($file)
    ToolTip("Play")
    Sleep(2000)
    ToolTip("")
    Sleep($lengh)
    $count = $count + 1
    Until $a = 1
    EndFunc

    [/autoit]

    Einmal editiert, zuletzt von Alizame (3. Mai 2010 um 18:55)

  • Ich glaube Schnitzel meinte das das ja jeder kann, der AutoIt kann.

    Ja, ich bin auch noch Anfänger... wollte einfach mal meine Idee vorstellen, mir ist klar das das nix besonderes ist :)

    Um ehrlich zu sein, ich hab Random versucht, aber nicht wirklich hinbekommen...

    [autoit]

    Random( 1, _FileCountLines("playlist.ini"),1) , "")

    [/autoit]

    bah, dieser Befehl "_FileCountLines" hat mir immer gefehlt, ich habs immer per Variable versucht, die bei jeder hinzugefügten Zeile mit 1 addiert wird und in eine Ini gespeichert wird...
    Daran bin ich gescheitert weil das nicht wirklich funtkioniert hat... Danke dir auf jeden Fall !! Hast mir sehr geholfen!

  • So... hab dann das mit der Einstellungsmöglichkeit fertig... speichert die gewünschten Hotkeys in einer ini ab und ruft diese beim Programmstart automatisch ab.
    Die Einstellungshotkey lässt sich nicht verändern, da man die sonst nimmer findet wenn man alles verändert...

    Vielen Dank dabei an Alizame, der die Zufallsfunktion geschrieben hat und auch vielen Dank an Schnitzel, der mir eine Frage wegen Variabeln in Hotkeys beantwortet hat.

    So das ist der Wiedergabelistenersteller:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    $count = 1
    $file = @WindowsDir
    $countr = 1
    $i = 0
    $f = 0
    Dim $read[500]

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

    $form = GUICreate("RemiXXer by stay", 625, 443, 193, 125)
    $list = GUICtrlCreateList("", 40, 96, 377, 188)
    $load = GUICtrlCreateButton("Neuen Song laden", 440, 112, 129, 41, 0)
    $label1 = GUICtrlCreateLabel("RemiXXer", 72, 0, 304, 84)
    GUICtrlSetFont(-1, 70, 400, 0, "MS Sans Serif")
    $delete = GUICtrlCreateButton("Liste löschen", 440, 168, 129, 41, 0)
    $run = GUICtrlCreateButton("Start Player!", 440, 224, 129, 41, 0)
    $exit = GUICtrlCreateButton("Exit", 440, 368, 129, 41, 0)
    $loadoldlist = GUICtrlCreateButton("Alte Liste laden", 100, 368, 129, 41, 0)
    GUISetState(@SW_SHOW)

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

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    ex()

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

    Case $delete
    delete()

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

    Case $load
    load()

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

    Case $exit
    ex()

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

    Case $run
    run("playcatcher.exe")
    Exit

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

    Case $loadoldlist
    loadold()

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

    EndSwitch
    WEnd

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

    Func load()
    if FileExists("playlist.ini") Then
    FileDelete("playlist.ini")
    EndIf
    $file = FileOpenDialog("Titel hinzufügen", $file, "Sounddateien (*.mp3;*.wma;*.wav)")
    IniWrite(@ScriptDir & "\playlist.ini", "Playlist", $count, $file)
    GUIctrlsetdata($list, $file)

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

    $count = $count + 1

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

    EndFunc

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

    Func loadold()
    While 1
    $i = $i + 1 ; für auslesearray
    $f = $f + 1 ;
    $read[$i] = IniRead("playlist.ini", "Playlist", $f, "")
    if $read[$i] = "" Then
    ExitLoop
    Else
    GUICtrlSetData($list, $read[$i])
    EndIf
    WEnd

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

    EndFunc

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

    Func delete()
    GUICtrlSetData($list, "")
    FileDelete("playlist.ini")
    EndFunc

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

    Func ex()
    MsgBox(0, "Auf Wiedersehen!", "Auf Wiedersehen, bis zum nächsten Mal! By stayawayknight")
    Exit

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

    EndFunc
    ;Benötigt playcatcher.exe!

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

    Und das der Player:

    Spoiler anzeigen
    [autoit]

    #include <Sound.au3>
    #include <GUIConstants.au3>

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

    $playk = "p"
    $stopk = "s"
    $nextk = "n"
    $endk = "e"
    $backk = "b"
    $volumek = "v"
    $zufallk = "z"

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

    if Not FileExists("hotkeys.remix") Then
    IniWrite("hotkeys.remix", "Hotkeys", "play", $playk)
    IniWrite("hotkeys.remix", "Hotkeys", "stop", $stopk)
    IniWrite("hotkeys.remix", "Hotkeys", "next", $nextk)
    IniWrite("hotkeys.remix", "Hotkeys", "end", $endk)
    IniWrite("hotkeys.remix", "Hotkeys", "back", $backk)
    IniWrite("hotkeys.remix", "Hotkeys", "volume", $volumek)
    IniWrite("hotkeys.remix", "Hotkeys", "zufall", $zufallk)

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

    Else

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

    $playk = IniRead("hotkeys.remix", "Hotkeys", "play", "")
    $stopk = IniRead("hotkeys.remix", "Hotkeys", "stop", "")
    $nextk = IniRead("hotkeys.remix", "Hotkeys", "next", "")
    $endk = IniRead("hotkeys.remix", "Hotkeys", "end", "")
    $backk = IniRead("hotkeys.remix", "Hotkeys", "back", "")
    $volumek = IniRead("hotkeys.remix", "Hotkeys", "volume", "")
    $zufallk = IniRead("hotkeys.remix", "Hotkeys", "zufall", "")

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

    EndIf

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

    HotkeySet("!{" & $playk & "}", "play")
    HotKeySet("!{" & $stopk & "}", "stop")
    HotKeySet("!{" & $nextk & "}", "nexts")
    HotKeySet("!{" & $endk & "}", "ende")
    HotKeySet("!{" & $backk & "}", "back")
    HotKeySet("!{" & $volumek & "}", "volume")
    HotKeySet("!{" & $zufallk & "}", "zufall")
    HotkeySet("!{w}", "settings")

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

    $settingwindow = GUICreate("Einstellungen", 625, 416, 193, 125)
    $play = GUICtrlCreateInput("", 160, 24, 137, 21)
    $stop = GUICtrlCreateInput("", 160, 64, 137, 21)
    $next = GUICtrlCreateInput("", 160, 104, 137, 21)
    $ende = GUICtrlCreateInput("", 160, 141, 137, 21)
    $back = GUICtrlCreateInput("", 160, 182, 137, 21)
    $volume = GUICtrlCreateInput("", 160, 221, 137, 21)
    $zufall = GUICtrlCreateInput("", 160, 257, 137, 21)
    $Label1 = GUICtrlCreateLabel("Playtaste: alt +", 56, 24, 80, 17)
    $Label2 = GUICtrlCreateLabel("Stoptaste: alt +", 56, 65, 80, 17)
    $Label3 = GUICtrlCreateLabel("Nexttaste: alt +", 56, 105, 80, 17)
    $Label4 = GUICtrlCreateLabel("Endetaste: alt +", 56, 142, 80, 17)
    $Label5 = GUICtrlCreateLabel("Backtaste: alt +", 56, 184, 80, 17)
    $Label6 = GUICtrlCreateLabel("Vol. -taste: alt +", 56, 218, 80, 17)
    $Label7 = GUICtrlCreateLabel("Zufallstaste: alt +", 56, 254, 80, 17)
    $Label8 = GUICtrlCreateLabel($playk & " (momentan)", 344, 24, 80, 17)
    $Label9 = GUICtrlCreateLabel($stopk & " (momentan)", 344, 70, 80, 17)
    $Label10 = GUICtrlCreateLabel($nextk & " (momentan)", 344, 107, 80, 17)
    $Label11 = GUICtrlCreateLabel($endk & " (momentan)", 344, 149, 80, 17)
    $Label12 = GUICtrlCreateLabel($backk & " (momentan)", 344, 183, 80, 17)
    $Label13 = GUICtrlCreateLabel($volumek & " (momentan)", 344, 223, 80, 17)
    $Label14 = GUICtrlCreateLabel($zufallk & " (momentan)", 344, 258, 80, 17)
    $okbutton = GUICtrlCreateButton("Speichern", 257, 345, 129, 41, 0)
    GUISetState(@SW_Hide)

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

    $a = 0 ; bewirkt die untilschleife und bricht play1 ab, wenn next kommt
    $count = 1 ; zählt songs

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

    $vol = 75

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

    Msgbox(0, "Start", "Folgende Hotkeys sind wichtig: Alt+" & $playk & " = Play, Alt+" & $stopk & " = Stop, Alt+" & $nextk & " = Next Song , Alt+" & $backk & " = Song Back, Alt+" & $volumek & " = Volume, Alt+" & $zufallk & " = Zufallsmodus, Alt+W = Einstellungsmenü und Alt+" & $endk & " = Ende.")

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

    Func play()

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

    Do

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

    $file = IniRead("playlist.ini", "Playlist", $count, "")
    $lengh = _SoundLength ($file, 2)
    SoundPlay($file)
    ToolTip("Play")
    Sleep(2000)
    ToolTip("")
    Sleep($lengh)
    $count = $count + 1

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

    Until $a = 1

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

    EndFunc

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

    Func ende()
    Tooltip("Ende, wird beendet ...")
    Sleep(2000)
    Exit

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

    EndFunc

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

    Func volume()

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

    $vol = Inputbox("Lautstärke", "Gib die gewünschte Lautstärke (1-100) ein! Momentan: " & $vol)
    SoundSetWaveVolume($vol)

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

    EndFunc

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

    Func stop()
    Run("playcatcher.exe")
    Exit
    EndFunc

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

    Func nexts()
    $a = 1
    $count = $count + 1
    ToolTip("Next")
    Sleep(2000)
    play()
    $a = 0
    EndFunc

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

    Func back()
    $a = 1
    $count = $count - 1
    ToolTip("Back")
    Sleep(2000)
    play()
    $a = 0
    EndFunc

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

    Func zufall ()
    Do
    $file = IniRead("playlist.ini", "Playlist", Random( 1, _FileCountLines("playlist.ini"),1) , "")
    $lengh = _SoundLength ($file, 2)
    SoundPlay($file)
    ToolTip("Play")
    Sleep(2000)
    ToolTip("")
    Sleep($lengh)
    $count = $count + 1
    Until $a = 1
    EndFunc

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

    Func settings()
    GUISetState(@SW_SHOW)

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

    While 1

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

    $msg = GuiGetMsg()
    Select
    Case $msg = $okbutton

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

    $playk = GUICtrlRead($play)
    $stopk = GUICtrlRead($stop)
    $nextk = GUICtrlRead($next)
    $endk = GUICtrlRead($ende)
    $backk = GUICtrlRead($back)
    $volumek = GUICtrlRead($volume)
    $zufallk = GUICtrlRead($zufall)

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

    IniWrite("hotkeys.remix", "Hotkeys", "play", $playk)
    IniWrite("hotkeys.remix", "Hotkeys", "stop", $stopk)
    IniWrite("hotkeys.remix", "Hotkeys", "next", $nextk)
    IniWrite("hotkeys.remix", "Hotkeys", "end", $endk)
    IniWrite("hotkeys.remix", "Hotkeys", "back", $backk)
    IniWrite("hotkeys.remix", "Hotkeys", "volume", $volumek)
    IniWrite("hotkeys.remix", "Hotkeys", "zufall", $zufallk)

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

    ToolTip("Gespeichert, aktuellisiere ... ")
    Sleep(2000)

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

    Run("playcatcher.exe")
    Exit

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

    EndSelect
    WEnd
    EndFunc

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

    While 1
    WEnd

    [/autoit]

    Viel Spaß damit, für Kritik immer offen :)

  • Ja,danke für den Tipp ich arbeite dran :)

    Ich glaube Schnitzel meinte das das ja jeder kann, der AutoIt kann.
    Aber eine andere Einstellungsmöglichkeit kann nicht verkehrt sein ^^

    Zitat

    Ja, ich bin auch noch Anfänger... wollte einfach mal meine Idee vorstellen, mir ist klar das das nix besonderes ist :)

    Ich meinte das nicht auf dein Programm sondern auf die Hotkeys bezogen.
    Dein Programm kann sicher nicht jeder nachmachen ^^

    mfg Ubuntu