xdmisterx |
|
| Versione aggiornata: CODICE #NoTrayIcon #include <GuiConstants.au3> #include <IE.au3>
;creazione oggetti $obj=ObjCreate("shell.explorer.2")
;GUICreate GUICreate("The mix rock-live",635,360) $guiobj=GUICtrlCreateObj($obj,0,0,635,280) $aggiorna=GUICtrlCreateButton("Aggiorna",0,290,635,40) $menu=GUICtrlCreateMenu("In esecuzione: "& musica("http://nowplaying.loudcity.net/now_playing/show/0ccdcf00-28e1-012b-f1eb-f278e03f6eb7")) $them=GUICtrlCreateMenuItem("The Mix Rock.com",$menu) $live=GUICtrlCreateMenuItem("Radio",$menu) $obj.navigate("http://loudcity.com/stations/themixrock/files/show/themixrockplayer.html")
GUISetState() While 1 If @SEC=00 Then GUICtrlSetData($menu,"In esecuzione => "& musica("http://nowplaying.loudcity.net/now_playing/show/0ccdcf00-28e1-012b-f1eb-f278e03f6eb7")) EndIf $msg=GUIGetMsg() Switch $msg Case $gui_event_close Exit Case $aggiorna $obj.navigate("http://loudcity.com/stations/themixrock/files/show/themixrockplayer.html") GUICtrlSetData($menu,"In esecuzione => "& musica("http://nowplaying.loudcity.net/now_playing/show/0ccdcf00-28e1-012b-f1eb-f278e03f6eb7")) Case $them _IECreate("www.themixrock.com") Case $live _IECreate("http://loudcity.com/stations/themixrock/files/show/themixrockplayer.html") EndSwitch WEnd Func musica($sito) $ie=_IECreate($sito,"",0) $source=_IEDocReadHTML($ie) If Not FileExists(@ScriptDir &"\source.txt") Then _FileCreate(@ScriptDir &"\source.txt") $file=FileOpen(@ScriptDir &"\source.txt",2) FileWrite($file,$source) FileClose($file) $srcl=StringTrimLeft($source,821) $srcr=StringTrimRight($srcl,40) ProcessClose("iexplore.exe") Return $srcr EndFunc adesso ti dice anche che canzone stai ascoltando. probabilmente ci metterà un pò ad avviarsi per via che il server è lentuccio ciao
|
| |