Autoit Listen.pls Abspielen

  • Hi habe mal Ne Frage wie ich Die pls Datei Vom Meine Stream abspielen aber auch mit so Buttons wie PLAY Stop + - ja das war Kann mir jemmand Helfen ?


    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Sound.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 122, 59, 433, 426)
    $Button1 = GUICtrlCreateButton("Play", 8, 8, 33, 41, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("Stop", 48, 8, 33, 41, $WS_GROUP)
    $Button3 = GUICtrlCreateButton("+", 88, 8, 25, 17, $WS_GROUP)
    $Button4 = GUICtrlCreateButton("-", 88, 32, 25, 17, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    $sound = _SoundOpen("http://85.25.10.11:3012","Listen.pls")

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    _SoundPlay($sound, 1)
    Case $Button2
    _SoundStop($sound)
    Case $Button3

    EndSwitch
    WEnd

    [/autoit]

    Einmal editiert, zuletzt von Unterbilker (2. Juli 2009 um 12:18)

  • ich vermute mal das deins nich funktioniert aber ich habe schnell mal was zusammen gebastelt

    [autoit]


    #include <GUIConstants.au3>
    #include <Sound.au3>
    opt("guioneventmode",1)
    $Form1 = GUICreate("Little Player", 203, 141, 272, 285)
    $Button1 = GUICtrlCreateButton("Stop", 8, 104, 185, 33, 0)
    GUICtrlSetOnEvent(-1,"stop")
    $Button2 = GUICtrlCreateButton("Play", 8, 64, 185, 33, 0)
    guictrlsetonevent(-1,"Play")
    $Label1 = GUICtrlCreateLabel("Little Player by .....", 8, 8, 188, 49)
    guisetonevent($GUI_EVENT_CLOSE,"_exit")
    GUISetState(@SW_SHOW)

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

    While 1
    wend

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

    func play()
    $choosefile=fileopendialog("Choose a sound",@mydocumentsdir,"Musik(*.mp3)")
    global $sound=_soundopen($choosefile)
    global $play=_SoundPlay($sound)
    endfunc

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

    func stop()

    _soundstop($sound)
    EndFunc

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

    func _exit()
    _soundclose($sound)
    exit
    endfunc

    [/autoit]

    du kannst songs öffnen abspielen und stoppen
    ich arbeite mal weiter dran jetzt damit man noch pausieren kann und dann wieder weiterspielen lassen kann

  • so ist es noch besser mit pause und erneuter wiedergabe ...

    [autoit]


    #include <GUIConstants.au3>
    #include <Sound.au3>
    opt("guioneventmode",1)
    $Form1 = GUICreate("Little Player", 203, 141, 272, 285)
    $Button1 = GUICtrlCreateButton("Stop", 8, 104, 81, 33, 0)
    GUICtrlSetOnEvent(-1,"stop")
    $Button2 = GUICtrlCreateButton("Play", 8, 64, 81, 33, 0)
    guictrlsetonevent(-1,"Play")
    $Button3 = GUICtrlCreateButton("Pause", 112, 64, 81, 33, 0)
    guictrlsetonevent(-1,"Pause")
    $Button4 = GUICtrlCreateButton("Resume", 112, 104, 81, 33, 0)
    guictrlsetonevent(-1,"Resume")
    $Label1 = GUICtrlCreateLabel("Little Player by .....", 8, 8, 188, 49)
    guisetonevent($GUI_EVENT_CLOSE,"_exit")
    GUICtrlSetState($Button1, $GUI_DISABLE)
    GUICtrlSetState($Button3, $GUI_DISABLE)
    GUICtrlSetState($Button4, $GUI_DISABLE)

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

    GUISetState(@SW_SHOW)

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

    While 1
    wend

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

    func play()
    $choosefile=fileopendialog("Choose a sound","C:\Users\" & @username & "\Music","Musik(*.mp3)",1+4)
    global $sound=_soundopen($choosefile)
    global $play=_SoundPlay($sound)
    GUICtrlSetState($Button3, $GUI_Enable)
    GUICtrlSetState($Button1, $GUI_Enable)
    endfunc

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

    func stop()
    _soundstop($sound)
    GUICtrlSetState($Button3, $GUI_DISABLE)
    GUICtrlSetState($Button4, $GUI_DISABLE)
    GUICtrlSetState($Button1, $GUI_DISABLE)
    EndFunc

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

    func _exit()
    _soundclose($sound)
    exit
    endfunc

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

    func resume()
    _soundresume($sound)
    GUICtrlSetState($Button3, $GUI_enable)
    GUICtrlSetState($Button4, $GUI_DISABLE)
    EndFunc

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

    func pause()
    _SoundPause($sound)
    GUICtrlSetState($Button4, $GUI_Enable)
    GUICtrlSetState($Button3, $GUI_DISABLE)
    endfunc

    [/autoit][autoit][/autoit][autoit][/autoit]
  • hi danke weiss du auch wie ich das mache damit der schutcast abspielt ?

  • hi zusammen....
    wir müsste den der code sein wenn man da so ein Slider drin haben will der auch mit der musik geth .... sodass man vorspullen kann usw. :D