[B][Autoit]Technobase.fm Player mit Track(list)

12/29/2009 22:28 iMer#1
Joa ich geb euch mal meinen kleinen Tb player ;)
Source:
Download: siehe anhang
€dit: kl. anmerkung
Ja es kann sien das es zu viele includes sind aber bin zu faul welche zu löschen ;)
12/30/2009 17:18 bassbanane#2
Sehr Nice ;) Biste zufällig der Typ der das auch bei autoit.de reingestellt hat? hab da letztens auch einen TB Player gesehn ;)
12/30/2009 17:20 iMer#3
Nop
durch den bin ich auf die Idee gekommen einen zu machen :D
12/30/2009 17:49 bassbanane#4
Aber auf jeden Fall sehr gut gemacht ;) Ich hab's ein wenig überarbitet mit einem "pause/resume" Hotkey ;) Hier das Skript
PHP Code:
#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ProgressConstants.au3>
#include <Security.au3>
#include <Memory.au3>
#include <UDFGlobalID.au3>
#include <GuiStatusBar.au3>
#include <GUIEdit.au3>
#include-once
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Constants.au3>
#include <GUIEdit.au3>
#include <GuiToolbar.au3>
#include <inet.au3>
#include <array.au3>
$x=0
HotKeySet
"!p""_stop")
$oWMP ObjCreate("WMPlayer.OCX")
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Technobase.fm Player by iMer"211126193125)
$play GUICtrlCreateButton("Play"8065250)
$stop GUICtrlCreateButton("Stop"72065250)
GUICtrlSetState($stop$GUI_DISABLE)
$track GUICtrlCreateLabel("Track:"8323517)
$trackname GUICtrlCreateLabel("loading..."483214625)
$tracklist GUICtrlCreateButton("Tracklist"136065250)
$status GUICtrlCreateLabel("Status:"8643717)
$stat GUICtrlCreateLabel("Getrennt"486414817)
$volume GUICtrlCreateSlider(88819037)
GUICtrlSetData($volume$oWMP.settings.volume())
GUISetState(@SW_SHOW)
$Form2 GUICreate("Tracklist"446365196290)
$list GUICtrlCreateLabel(""00445361)
GUISetState(@SW_HIDE)
#EndRegion ### END Koda GUI section ###


$track 0

While 1
    
If $track >= 500 Then
        $source 
_INetGetSource("http://www.technobase.fm/tracklist.php")
        
$sRegExp2 StringReplace($source"amp;""&")
        
$sRegExp StringRegExp($sRegExp2'border="\d" src=".+" alt=".+" title="(.+?)" />'3)
        
GUICtrlSetData($trackname$sRegExp[0])
        
$track 0
    
EndIf
    
$msg GUIGetMsg(1)
    
Select
        
Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $Form1
            
Exit
        Case 
$msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $Form2
            GUISetState
(@SW_HIDE$Form2)

        Case 
$msg[0] = $play
            $x
=1
            $oWMP
.URL 'http://listen.technobase.fm/tunein-dsl-asx'
            
GUICtrlSetData($stat"Connecting")
            
$oWMP.controls.play()
;~             Do
;~                 
Sleep(100)
;~             
Until $oWMP.playstate 7
            GUICtrlSetData
($stat"Buffering")
            
$oWMP.settings.volume 50
            GUICtrlSetState
($play$GUI_DISABLE)
            
GUICtrlSetState($stop$GUI_ENABLE)
            Do
                
Sleep(100)
            
Until $oWMP.playstate 3
            GUICtrlSetData
($stat"Listening")
        Case 
$msg[0] = $stop
            $x
=0
            $oWMP
.controls.stop()
            
GUICtrlSetData($stat"Disconnected")
            
GUICtrlSetState($stop$GUI_DISABLE)
            
GUICtrlSetState($play$GUI_ENABLE)
        Case 
$msg[0] = $tracklist
            GUICtrlSetData
($list$sRegExp[0])
            For 
$a 1 To 26 Step 1
                GUICtrlSetData
($listGUICtrlRead($list) & @CRLF $sRegExp[$a])
            
Next
            GUISetState
(@SW_SHOW$Form2)

    
EndSelect
    $oWMP
.settings.volume GUICtrlRead($volume)
    
$track $track 1
WEnd

func _stop
()
    if 
$x=1 then
    $oWMP
.controls.stop()
            
GUICtrlSetData($stat"Disconnected")
            
GUICtrlSetState($stop$GUI_DISABLE)
            
GUICtrlSetState($play$GUI_ENABLE)
            
$x=0
        
Else
            
$oWMP.URL 'http://listen.technobase.fm/tunein-dsl-asx'
            
GUICtrlSetData($stat"Connecting")
            
$oWMP.controls.play()
;~             Do
;~                 
Sleep(100)
;~             
Until $oWMP.playstate 7
            GUICtrlSetData
($stat"Buffering")
            
$oWMP.settings.volume 50
            GUICtrlSetState
($play$GUI_DISABLE)
            
GUICtrlSetState($stop$GUI_ENABLE)
            Do
                
Sleep(100)
            
Until $oWMP.playstate 3
            GUICtrlSetData
($stat"Listening")
            
$x=1
        
EndIf

        
EndFunc




;$source _INetGetSource("http://www.technobase.fm/tracklist.php")
;
$sRegExp2 StringReplace($source,"amp;","&")
;
$sRegExp StringRegExp($sRegExp2'border="\d" src=".+" alt=".+" title="(.+?)" />'3)
;For 
$a 0 to 48 Step 1
;    $label3[$a]=GUICtrlCreateLabel($sRegExp[$a], 20$a*20+50300)
;
Next 
01/05/2010 17:26 iMer#5
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ProgressConstants.au3>
#include <Security.au3>
#include <Memory.au3>
#include <UDFGlobalID.au3>
#include <GuiStatusBar.au3>
#include <GUIEdit.au3>
#include-once
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Constants.au3>
#include <GUIEdit.au3>
#include <GuiToolbar.au3>
#include <inet.au3>
#include <array.au3>
#include <File.au3>
$oWMP = ObjCreate("WMPlayer.OCX")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Technobase.fm Player by iMer", 211, 126, 193, 125)
$play = GUICtrlCreateButton("Play", 8, 0, 65, 25, 0)
$stop = GUICtrlCreateButton("Stop", 72, 0, 65, 25, 0)
GUICtrlSetState($stop, $GUI_DISABLE)
$track = GUICtrlCreateLabel("Track:", 8, 32, 35, 17)
$trackname = GUICtrlCreateLabel("loading...", 48, 32, 146, 25)
$tracklist = GUICtrlCreateButton("Tracklist", 136, 0, 65, 25, 0)
$status = GUICtrlCreateLabel("Status:", 8, 64, 37, 17)
$stat = GUICtrlCreateLabel("Getrennt", 48, 64, 148, 17)
$volume = GUICtrlCreateSlider(8, 88, 190, 37)
GUICtrlSetData($volume, $oWMP.settings.volume())
GUISetState(@SW_SHOW)
$Form2 = GUICreate("Tracklist", 446, 365, 196, 290)
$list = GUICtrlCreateLabel("", 0, 0, 445, 361)
GUISetState(@SW_HIDE)
#EndRegion ### END Koda GUI section ###


$track = 0
DirCreate("C:\temp")
While 1
If $track >= 5000 then
	$sourc = INetGet("http://www.technobase.fm/tracklist.php","C:\temp\technobase.txt",1,1) ;für hardbase und so einfach hardbase anstatt technobase reinschreiben!
	While @InetGetActive
		sleep (100)
	WEnd
	
$source = FileRead("C:\temp\technobase.txt")
If _FileCountLines("C:\temp\technobase.txt") <= 500	Then
	GUICtrlSetData($trackname,"Fehler beim übertragen")
	Else
$sRegExp2 = StringReplace($source,"amp;","&")
$sRegExp = StringRegExp($sRegExp2, 'border="\d" src=".+" alt=".+" title="(.+?)" />', 3)
GUICtrlSetData($trackname,$sRegExp[0])
$track = 0
FileDelete("C:\temp\technobase.txt")
EndIf
EndIf
$msg = GUIGetMsg(1)
Select
Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $Form1
Exit
Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $Form2
GUISetState(@SW_HIDE,$Form2)

Case $msg[0] = $play
$oWMP.URL = 'http://listen.technobase.fm/tunein-dsl-asx' ;für hardbase und so einfach hardbase anstatt technobase reinschreiben!
GUICtrlSetData($stat, "Connecting")
$oWMP.controls.play()
;~ Do
;~ Sleep(100)
;~ Until $oWMP.playstate = 7
GUICtrlSetData($stat, "Buffering")
$oWMP.settings.volume = 50
GUICtrlSetState($play, $GUI_DISABLE)
GUICtrlSetState($stop, $GUI_ENABLE)
Do
Sleep(100)
Until $oWMP.playstate = 3
GUICtrlSetData($stat, "Listening")
Case $msg[0] = $stop
$oWMP.controls.stop()
GUICtrlSetData($stat, "Disconnected")
GUICtrlSetState($stop, $GUI_DISABLE)
GUICtrlSetState($play, $GUI_ENABLE)
Case $msg[0] = $tracklist
GUICtrlSetData($list,$sRegExp[0])
For $a = 1 to 26 Step 1
GUICtrlSetData($list, GUICtrlRead($list)& @CRLF & $sRegExp[$a])
Next
GUISetState(@SW_SHOW,$Form2)

EndSelect
$oWMP.settings.volume = GUICtrlRead($volume)
$track=$track+1
WEnd
Func _get ()

EndFunc
neue Version addet die nich abkackt wenn HP von Technobase down ist ^^
01/05/2010 17:38 Elite*Ruler#6
ist recht nett, meiner meinung nach aber nur ne etwas
abgespeckte version von dem, der in autoit.de gepostet wurde.
( mal abgesehen dass der quellcode 100%leeched ist und dann
sachen rausgelöscht wurden^^).

Ich hab mir den von bassbanane mal angesehen :D
Den darunter konnte ich nicht da der quellcode meinem
compiler nach unvollständig war ( was ist @InetGetActive? )
Möglicherweiße fehlt mir einfach nur ne UDF.
Ist an sich aber auch nen gute lösung, da er klein und schnell ist :D
Problem wiei gesagt, dass er abkackt wenn seite offline ist
( ich konnte deinen, iMer leider nicht testen) Habe heute shcon
genug downgeloadet ;))

Eine frage noch: Warum hast du 3 verschiedene downloads in der liste?
Fass es doch einfach zusammen oder beschreib wenigens was darin enthalten ist, dann würde es
etwas übersichtlicher werden! ansonsten gute arbeiti =DD
01/11/2010 16:22 Styler125#7
Lol finds einfach nur geil ,dass mein TBplayer bis ins elitepvpers forum geschafft hat.

Ihr könnt übrigens auch Verbesserungsvorschläge machen dann hab ich wieder was zu tun ^^
02/04/2010 16:59 ClOuDy.#8
schalt den error ab, er soll einfach ab und zu versuchen die tracks zu bekommen und die anzeige dann zu aktualisieren. das is das wichtigste.

die trackliste sollte man lokal speichern können - evtl mit nem zeitstempel.
ein paar mehr sender (falls machbar) die einfach auswählbar sind wären nice.

hauptsache das ding kackt wegen dem fehler nimemr ab ^^
02/05/2010 05:15 Painless#9
n1 ty^^
02/14/2010 17:45 Scholzi#10
bastelst mir sowas für housetime.fm ? :D
02/16/2010 22:15 Der_Lahr#11
scholzi: des is net schwer du musst des script nur minimal abändern
03/25/2010 22:23 wop123#12
Als Technobase Fan ist dieses Script sehr gut :P Jetzt muss man nicht immer extra die Page öffnen und hat sogar noch ne Trackliste.
Zu dem Design äußere ich mich mal nicht xP
07/08/2010 21:40 zokkerkind08#13
hey ich hab sowas mal für die ganze we are one reihe gemacht mit GEILEM design (zumindest in vista+ )

würds nett finden wenn ihrs euch mal anguckt

[Only registered and activated users can see links. Click Here To Register...]
07/08/2010 22:36 kaiN_92#14
Quote:
Originally Posted by zokkerkind08 View Post
hey ich hab sowas mal für die ganze we are one reihe gemacht mit GEILEM design (zumindest in vista+ )

würds nett finden wenn ihrs euch mal anguckt

[Only registered and activated users can see links. Click Here To Register...]
Die Lautstärkereglung tut nich :(
07/09/2010 18:14 .Infinite#15
Also ich hab auch mal so ein Teil für alle Sender von We aRe oNe gecodet.... auch mit AutoIT. Und bei mir funktioniert die Trackanzeige einwandfrei ;)

[Only registered and activated users can see links. Click Here To Register...]