Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* INFO
- Internet Radio-6 XML DropDownList Creator(RadioName) and location(URL)
- Written by: Najeeb Shah Khan (najeebshahkhan@gmail.com)
- Last Modified: 3-27-2023
- */
- ;#warn
- #NoEnv
- SendMode Input
- SetWorkingDir %A_ScriptDir%
- SetTitleMatchMode 2
- SetBatchLines, -1
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- FileCreateDir, %A_ScriptDir%\DATA
- FileInstall , NAJEEB-RADIO.ahk, %A_ScriptDir%\DATA\NAJEEB-RADIO.ahk, 1
- FileInstall , Milikymac.msstyles, %A_ScriptDir%\DATA\fanta.msstyles, 1
- FileInstall , USkin.dll, %A_ScriptDir%\DATA\USkin.dll, 1
- FileSetAttrib +HS, %A_ScriptDir%\DATA\NAJEEB-RADIO.ahk, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA\fanta.msstyles, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA\USkin.dll, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA, 2
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- SkinForm(Apply, A_ScriptDir . "\DATA\USkin.dll", A_ScriptDir . "\DATA\fanta.msstyles")
- OnExit, GetOut
- CoordMode, Mouse , Relative ;- GUI
- DetectHiddenWindows, On
- whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
- filename1=Najeeb Internet Radio-6 ( use ESC for SOUND ON/OFF )
- vlcx =%A_programfiles%\VideoLAN\VLC\vlc.exe
- title:=""
- e1x:=""
- e:=""
- ;ixex1:="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe "
- ixex1:="C:\Program Files\Mozilla Firefox\firefox.exe "
- HK1=Esc
- Hotkey,%hk1%,mute1,ON
- STREAMRIPPER=%A_scriptdir%\streamripper.exe
- loop,%streamripper%,1
- STRP=%A_LoopFileShortPath%
- R3S=%A_scriptDir%\STREAM
- ifnotexist,%R3S%
- FileCreateDir,%R3S%
- Gui,3:default
- Gui,3: -DPIScale
- Gui,3:Color, FFFFCC
- wa:=A_screenwidth
- ha:=A_screenHeight
- xx:=100
- ;- maybe change fontsize
- ;============ GUISIZEx DPIx 4Kx 3840*2160 is 100% ============
- if (wa=3840)
- Gui,3:Font,s12 cYellow,Lucida Console
- ;============ GUISIZEx DPIx FHD 1920*1080 is 100% ============
- if (wa=1920)
- Gui,3:Font,s12 cYellow,Lucida Console
- ;=============================================================
- transform,s,chr,32
- e5x=
- (Ltrim join|
- 50s ,http://opml.radiotime.com/Browse.ashx?id=g390
- 60s-1 ,http://opml.radiotime.com/Browse.ashx?id=g407
- 60s-2 ,http://opml.radiotime.com/Browse.ashx?offset=26&id=c100000633
- 60s-3 ,http://opml.radiotime.com/Browse.ashx?offset=52&id=c100000633
- 60s-4 ,http://opml.radiotime.com/Browse.ashx?offset=78&id=c100000633
- Indian FM ,https://onlineradiofm.in/
- %s%
- )
- x:=(wa*36)/xx,y:=(ha*.1)/xx,h:=(ha*17)/xx,w:=(wa*13)/xx
- Gui,3:Add,DDL,x%x% y%y% w%w% h%h% cBlack vUrlDDL gAA,%e5x%
- Guicontrolget,mydrop, pos,urlddl
- x:=(wa*.2)/xx,y:=(ha*.1)/xx,h:=(ha*2.4)/xx,w:=(wa*35)/xx
- Gui,3: Add, Edit, x%x% y%y% w%w% h%mydroph% vURL,
- x:=(wa*.2)/100,y:=(ha*3)/100,h:=(ha*40)/100,w:=(wa*50)/100
- Gui,3:Add, ListView,x%x% y%y% w%w% h%h% +hscroll BackgroundFFFF99 altsubmit vB1 gB2,Name|URL
- T1:=(wa*40)/100
- T2:=(wa*9 )/100
- LV_ModifyCol(1,T1)
- LV_ModifyCol(2,T2)
- GoSub,FLVB1
- x:=(wa*.2)/xx,y:=(ha*50)/xx,h:=(ha*2.5)/xx,w:=(wa*8)/xx
- Gui,3:add,Button,x%x% y%y% h%h% w%w% gInternetRadio,InternetRadio
- x:=(wa*9)/xx
- Gui,3:add,Button,x%x% y%y% h%h% w%w% gRadioBrowser ,RadioBrowser
- x:=(wa*18)/xx
- Gui,3:add,Button,x%x% y%y% h%h% w%w% gCloseVLC ,Close-Audio
- x:=(wa*.1)/xx,y:=(ha*53)/xx,h:=(ha*2.5)/xx,w:=(wa*50)/xx
- Gui,3:add,Edit,x%x% y%y% h%h% w%w% vED1
- y:=(ha*56)/xx
- Gui,3:add,Edit,x%x% y%y% h%h% w%w% vED2
- y:=(ha*59)/xx,w:=(wa*14)/xx
- Gui,3:add,Edit,x%x% y%y% h%h% w%w% vED3
- x:=(wa*15)/xx,w:=(wa*5)/xx
- Gui,3: Add, Progress,x%x% y%y% h%h% w%w% Disabled BackgroundRed
- Gui,3: Add, Text, xp yp wp hp BackgroundTrans 0x201 +Border gRecord,Record
- x:=(wa*22)/xx,w:=(wa*4)/xx
- Gui,3:add,Edit,x%x% y%y% h%h% w%w% right vED4 ; numbers i
- x:=(wa*28)/xx,
- Gui,3:Add,Text, x%x% y%y% , Search:
- x:=(wa*32)/xx,w:=(wa*10)/xx
- Gui,3:add,Edit, x%x% y%y% w%w% h%h% vSearchx gSearchA ; search
- ;---------
- x:=(wa*.2)/100,y:=(ha*.2)/100,h:=(ha*64)/100,w:=(wa*51)/100
- Gui,3:show,x%x% y%y% w%w% h%h%,%filename1%
- Guicontrol,3:,ED4,%i%
- GuiControl,3: Focus,searchx
- GuiControl,3: ChooseString,urlddl,50s
- settimer,aatimer,5000
- gosub,aatimer
- gosub,aa
- return
- ;============================================================
- aa:
- Gui,3: submit, nohide
- h1:=""
- h2:=""
- if urlDDL<>
- {
- StringSplit,h,urlddl, `,
- h1=%h1%
- if (h1="Indian FM")
- {
- LV_Delete()
- try
- run,%ixex1%%h2%
- catch
- run,%h2%
- Guicontrol,3:,url,%h2%
- return
- }
- Guicontrol,3:,url,%h2%
- filexml=%h2%
- gosub,readxml
- }
- return
- ;---------------------------
- searcha:
- Gui,3:ListView, B1
- GuiControlGet, Searchx
- GuiControl,3: -Redraw, B1
- LV_Delete()
- i:=0
- For Each, Name In LVArray
- {
- If (Searchx != "")
- {
- ;If (InStr(name.1, Searchx) = 1) ; for matching at the start
- If InStr(name.1, Searchx) ; for overall matching
- {
- LV_Add("",name.1, name.2)
- i++
- }
- }
- Else
- {
- LV_Add("", name.1,name.2)
- i++
- }
- }
- GuiControl,3: +Redraw, B1
- Guicontrol,3:,ED4,%i%
- GuiControl,3: Focus,searchx
- return
- ;-----------------------------
- mute1:
- soundset,+1,master,mute
- return
- ;-----------------------------
- InternetRadio:
- try
- run,%ixex1%https://www.internet-radio.com/search/?radio=fado
- catch
- run,https://www.internet-radio.com/search/?radio=fado
- return
- ;-----------------------------
- RadioBrowser:
- try
- run,%ixex1%http://www.radio-browser.info/gui/#!/search
- catch
- run,http://www.radio-browser.info/gui/#!/search
- return
- ;------------ record only if contains `: in url -----------------
- record:
- Guicontrolget,ed3
- stringtrimleft,edx,ed3,7
- if edx contains :
- {
- ;run,%COMSPEC% /K %strp% %ed3% -c -t -d "%R3S%"
- ifexist,%strp%
- run,%COMSPEC% /K %strp% %ed3% --xs_padding=5000:5000 -c -t -d "%R3S%"
- ;run,%strp% %ed3% -c -t -d "%R3S%"
- }
- return
- ;----------------------------
- FLVB1:
- Gui, 3:ListView, B1
- LV_Delete()
- LVArray := {}
- I:=0
- Loop,parse,e,`n,`r
- {
- x:=a_loopfield
- if x=
- continue
- stringmid,xp1,x,1,1
- if (xp1=";") ;- don't read beginning with ";"
- continue
- c1=
- c2=
- stringsplit,C,x,`;
- c1=%c1%
- c2=%c2%
- LV_Add("",c1,c2)
- LVArray.Push({1:c1,2:c2})
- i++
- }
- ;LV_ModifyCol(1, "Logical SortAsc") ;- maybe sort column-1
- return
- ;----------------------------
- B2:
- Gui,3:ListView, B1
- GuiControlGet,B1
- RN:=LV_GetNext("C")
- RF:=LV_GetNext("F")
- GC:=LV_GetCount()
- if A_GuiEvent = Normal
- {
- LV_GetText(C1,A_EventInfo,1)
- LV_GetText(C2,A_EventInfo,2)
- ifexist,%vlcx%
- {
- try
- {
- ;Process, Exist, vlc.exe
- ;If ErrorLevel
- ; process,close,vlc.exe
- ;run,%vlcx% --one-instance --qt-start-minimized %c2%,,hide,
- run,%vlcx% --one-instance %c2%,,min,
- Guicontrol,3:,url,%c2%
- Guicontrol,3:,ed2,
- }
- catch
- msgbox, 262208,ERROR ,CHECK PATH %vlcx%
- }
- Guicontrol,3:,ED1, %C1%
- Guicontrol,3:,ED2,
- Guicontrol,3:,ED3, %C2%
- settimer,aatimer,ON
- gosub,aatimer
- }
- return
- ;----------------------------
- aatimer:
- WinGetTitle, Title, VLC media player ahk_exe vlc.exe
- ;WinGetTitle, Title,ahk_exe vlc.exe
- ;WinGetTitle, Title, VLC media player
- ;Process, Exist,vlc.exe
- ;WinGetTitle, title, ahk_pid %Errorlevel% ;- QtrayIconMessageWindow
- title=%title%
- stringreplace,title,title,VLC media player,,
- Guicontrol,3:,ED2,%title%
- return
- ;----------------------------
- closevlc:
- Process, Exist, vlc.exe
- If ErrorLevel
- {
- process,close,vlc.exe
- Guicontrol,3:,ED1,
- Guicontrol,3:,ED2,
- settimer,aatimer,off
- }
- return
- ;----------------------------
- 3Guiclose:
- settimer,aatimer,OFF
- Process, Exist, vlc.exe
- If ErrorLevel
- {
- msgbox, 262435,Radio-Close,Want you close also Audio ?
- ifmsgbox,NO
- exitapp
- ifmsgbox,Cancel
- return
- else
- {
- process,close,vlc.exe
- exitapp
- }
- }
- else
- exitapp
- return
- ;----------------------------
- ;=============================== END SCRIPT ===================
- readxml:
- whr.Open("GET",h2, true)
- whr.Send()
- whr.WaitForResponse()
- e1 := whr.ResponseText
- transform,r,chr,34 ;- "
- transform,s,chr,32
- transform,k,chr,59
- e:=""
- ;-- add these first to the list
- e=
- (
- MY-MP3;D:\VIDEOS\MP3.m3u
- LATA-MANGESHKAR;https://stream.zeno.fm/87xam8pf7tzuv
- KISHORE-KUMAR;https://stream-29.zeno.fm/0ghtfp8ztm0uv?zs=bY_YMkyZTfaDxM_0V6n4NQ
- MOHMMED-RAFI;https://stream-22.zeno.fm/2xx62x8ztm0uv?zs=H0kYgOvASsybRex146D3FA
- HITS-OF-BOLLYWOOD;https://stream-14.zeno.fm/a2gyqzwpwfeuv?zs=FZPPkfUPT1-FLq1lNTnc2A
- MERA-FM 107.4;https://samaapew107-itelservices.radioca.st/stream/1/
- FM-91 PAK MUSIC;http://cc.vmakerhost.com:8147/steam/1/
- ALL80s;http://listen.radionomy.com/all80s.m3u
- 80sPlanet;http://eu2.servemp3.com:10010
- RADIO PAKISTAN-TORONTO;https://s3.radio.co/s3b10a57ef/listen
- FM-100 PAKISTAN;http://162.244.80.118:3058/;stream.mp3
- PAK-FIMLI;http://74.91.125.187:8214/stream
- 106.2FM JUST MUSIC;https://live.wostreaming.net/direct/humfm-fm1062mp3-ibc1
- WORLD PAKISTAN;http://radio.itelservices.net:8612/;
- KARACHI 96;http://s3.voscast.com:8450/;
- Heart FM 100.7;http://media-ice.musicradio.com/HeartWestMidsMP3.m3u
- FM 101.4 Mirpur;http://210.56.24.230:8030/;
- Radio Pakistan Lahore;http://203.124.35.147:8086/relay
- Kompis FM;http://eu2.fastcast4u.com:4196/stream
- Buzz FM;http://fusion.shoutca.st:8112/stream
- Pakistani Chat Rooms;https://radio.chatroomradio.com/listen/goldchatfm/radio.mp3
- Dunya News;https://imob.dunyanews.tv/live/rddaudrgn.sdp/playlist.m3u8
- Awamichat live;https://ec1.everestcast.host/awamichat
- BBC Radio 1;http://www.bbc.co.uk/radio1/wm_asx/aod/radio1.asx
- BBC Radio 2;http://www.bbc.co.uk/radio/listen/live/r2.asx
- BBC Radio 4;http://bbc.co.uk/radio/listen/live/r4.asx
- BBC Radio 5;http://radio1.rtve.stream.flumotion.com/rtve/radio5.mp3.m3u
- BBC 6 Music;http://bbc.co.uk/radio/listen/live/r6.asx
- Radio London;http://wmlive.bbc.co.uk/wms/england/lrlondon
- Radio New York Live;http://www.myradiohd.com/radionylive/__WM__HD.asx
- ch_News DRS4;http://stream.srg-ssr.ch/drs4news/mp3_128.m3u
- de_NEWS DLF;https://www.deutschlandradio.de/streaming/dlf.m3u
- us_Oldies Retro;http://167.86.107.72:8090
- us_50 ABC 50s;http://144.217.253.136:8582
- us_50 DreamBoat;http://146.71.124.10:8100
- us_50 UK 1950s;http://91.121.134.23:8648
- us_50 HD Radio;http://167.114.64.181:8360
- us_Country HPR-1;http://188.165.192.5:8374
- eu_Folk Europe;http://79.111.14.76:9187/
- eu_Folk;http://79.111.119.111:9227/
- eu_Classic;http://79.120.39.202:9193/
- eu_Classic Harp;http://79.120.39.202:9201/
- pt_Portugal Fado Radio Caprice-Fado;http://79.111.14.76:9189
- pt_Portugal sounds of;http://91.121.78.191:8541
- jp_Oldies Japan;http://66.70.187.44:9069
- lt_World PMR LT;http://185.193.112.155:18638
- sv_Folk Sverige Svensk Folkmusic;http://82.94.205.73:8107
- ABC 50s (Fifties) (Canada) ; http://opml.radiotime.com/Tune.ashx?id=s165879
- Addictive 50s (Canada) ; http://opml.radiotime.com/Tune.ashx?id=s166793
- GotRadio The 50s (US) ; http://opml.radiotime.com/Tune.ashx?id=s65671
- radio PILE (France) ; http://opml.radiotime.com/Tune.ashx?id=s113337
- Rockabilly Radio (UK) ; http://opml.radiotime.com/Tune.ashx?id=s51143
- 1A Oldies (Germany) ; http://opml.radiotime.com/Tune.ashx?id=s307969
- La Tremenda Corte Radio (Trespatines) (Dominican Republic) ; http://opml.radiotime.com/Tune.ashx?id=s268168
- RCS Network Story (Campania, Italy) ; http://opml.radiotime.com/Tune.ashx?id=s276071
- Trespatines Radio (Dominican Republic) ; http://opml.radiotime.com/Tune.ashx?id=s281938
- Doowop Radio (US) ; http://opml.radiotime.com/Tune.ashx?id=s228873
- ON 50s (Germany) ; http://opml.radiotime.com/Tune.ashx?id=s307975
- Radio Tormenta (Morelia, Mexico) ; http://opml.radiotime.com/Tune.ashx?id=s181479
- MyHitMusic! JUKEBOX - GOLD (Germany) ; http://opml.radiotime.com/Tune.ashx?id=s284677
- Remember Then Radio (US) ; http://opml.radiotime.com/Tune.ashx?id=s184042
- ASANTEMAN RADIO (Kumasi, Ghana) ; http://opml.radiotime.com/Tune.ashx?id=s224923
- Puregold Oldies (US) ; http://opml.radiotime.com/Tune.ashx?id=s304517
- Radio télé Motivation Fm Gonaives-Haiti (Haiti) ; http://opml.radiotime.com/Tune.ashx?id=s287378
- Dusty Bag Oldies (US) ; http://opml.radiotime.com/Tune.ashx?id=s254551
- Cleansing 50s (US) ; http://opml.radiotime.com/Tune.ashx?id=s234015
- Starr (Accra, Ghana) ; http://opml.radiotime.com/Tune.ashx?id=s229680
- 0nlineradio 50s (US) ; http://opml.radiotime.com/Tune.ashx?id=s309730
- Stereo Oldies Radio (US) ; http://opml.radiotime.com/Tune.ashx?id=s172617
- The Belmonts Internet Radio (US) ; http://opml.radiotime.com/Tune.ashx?id=s162388
- Fun45s.com (US) ; http://opml.radiotime.com/Tune.ashx?id=s177735
- doowopradio4u (US) ; http://opml.radiotime.com/Tune.ashx?id=s99659
- ch_News DRS4;http://stream.srg-ssr.ch/drs4news/mp3_128.m3u
- de_NEWS DLF;https://www.deutschlandradio.de/streaming/dlf.m3u
- us_Oldies Retro;http://167.86.107.72:8090
- us_50 ABC 50s;http://144.217.253.136:8582
- us_50 DreamBoat;http://146.71.124.10:8100
- us_50 UK 1950s;http://91.121.134.23:8648
- us_50 HD Radio;http://167.114.64.181:8360
- us_Country HPR-1;http://188.165.192.5:8374
- eu_Folk Europe;http://79.111.14.76:9187/
- eu_Folk;http://79.111.119.111:9227/
- eu_Classic;http://79.120.39.202:9193/
- eu_Classic Harp;http://79.120.39.202:9201/
- pt_Portugal Fado Radio Caprice-Fado;http://79.111.14.76:9189
- pt_Portugal sounds of;http://91.121.78.191:8541
- jp_Oldies Japan;http://66.70.187.44:9069
- lt_World PMR LT;http://185.193.112.155:18638
- sv_Folk Sverige Svensk Folkmusic;http://82.94.205.73:8107
- )
- x:= r . s
- a=<outline type="audio"
- b=/>
- c1=text=" ;- radio name
- c2=url=" ;- radio url
- c3=image=" ;- radio image
- c4=playing_image=" ;- playing image ( change )
- loop,parse,e1,`n,`r
- {
- lr:= a_loopfield
- stringreplace,lr,lr,`;,,all
- stringreplace,lr,lr,',,all
- stringreplace,lr,lr,&,,all
- stringreplace,lr,lr,&apos,,all
- if lr contains %a%
- nr=1
- if lr not contains %a%
- nr=0
- if (nr=1)
- {
- stringreplace,lr,lr,%x%,$,all
- loop,parse,lr,$
- {
- y:=a_loopfield
- if y contains subtext=
- continue
- if y contains %c1%
- {
- stringreplace,y,y,%c1%,,all
- a1:= y . s . k . s
- }
- if y contains %c2%
- {
- stringreplace,y,y,%c2%,,all
- a2:= y
- }
- ;if y contains %c3% ;- picture
- ; {
- ; stringreplace,y,y,%c3%,,all
- ; a3:= y
- ; }
- if y contains %b%
- e .= a1 . a2 . "`r`n"
- }
- }
- }
- ;msgbox,%e%
- fileappend,%e%,STREAM\RADIO-CHANNELS.txt
- gosub,flvb1
- return
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- GetOut:
- GuiClose:
- Gui, Hide
- SkinForm(0)
- ExitApp
- return
- SkinForm(Param1 = "Apply", DLL = "", SkinName = ""){
- if(Param1 = Apply){
- DllCall("LoadLibrary", str, DLL)
- DllCall(DLL . "\USkinInit", Int,0, Int,0, AStr, SkinName)
- }else if(Param1 = 0){
- DllCall(DLL . "\USkinExit")
- }
- }
- ;=============================== END SCRIPT ===================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement