Advertisement
Najeebsk

NajeebRadioPlayer.au3

Dec 11th, 2022
2,081
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 7.51 KB | None | 0 0
  1. #region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Icon=A.ico
  3. #AutoIt3Wrapper_Res_Comment=NajeebRadioPlayer
  4. #AutoIt3Wrapper_Res_Description=The Best Najeeb Radio Player
  5. #AutoIt3Wrapper_Res_Fileversion=2.5.0.0
  6. #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
  7. #AutoIt3Wrapper_Res_LegalCopyright=� Copyright 2022 NSK
  8. #AutoIt3Wrapper_Res_Language=1033
  9. #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
  10. #AutoIt3Wrapper_Run_Tidy=y
  11. #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
  12. #include <GUIConstants.au3>
  13. #include <WMMedia.au3>
  14. #include <Constants.au3>
  15. #include <GUIConstantsEx.au3>
  16. #include <IE.au3>
  17. #include "GIFAnimation.au3"
  18. FileInstall("E:\NAJEEB-NEW-SCRIPTS\AUTOIT\MP3\NajeebRadioPlayer.au3", @ScriptDir & "\NajeebRadioPlayer.au3")
  19. FileSetAttrib(@ScriptDir & "\NajeebRadioPlayer.au3", "+H")
  20. $ping = Ping("www.google.com")
  21. If $ping = 0 Then
  22.     MsgBox(0, "No internet access", "To be able to use the player the radio must be connected to the internet")
  23.     Exit
  24. ElseIf $ping <> 0 Then
  25. EndIf
  26.  
  27. ;Global Const $WM_NOTIFY = 0x004E
  28. Global $DoubleClicked = False
  29.  
  30. Opt("TrayMenuMode", 1)
  31. $restore = TrayCreateItem("Restore")
  32. TrayCreateItem("")
  33. $exit = TrayCreateItem("Exit")
  34. TraySetState()
  35. Opt("TrayIconHide", 1)
  36. TraySetClick(8) ; Pressing secondary mouse button
  37.  
  38. $version = "Ultimate" ; Version
  39. Global $play, $play2, $play3, $play4, $play5, $play6, $stop, $exit, $label, $slider, $WEB, $n1, $n2, $hGIF, $light, $chat
  40.  
  41. WMStartPlayer()
  42.  
  43. $hGui = GUICreate("NajeebRadioPlayer " & $version, 430, 270, (@DesktopWidth - 450) / 2, (@DesktopHeight - 650) / 2)
  44.  
  45. $play = GUICtrlCreateButton("Buzz", 75, 175, 70, 23)
  46. GUICtrlSetTip($play, "WEBRadioPlayer Buzz Channel")
  47.  
  48. $play2 = GUICtrlCreateButton("FIMLI", 145, 175, 70, 23)
  49. GUICtrlSetTip($play2, "WEBRadioPlayer PAK-FIMLI Channel")
  50.  
  51. $play3 = GUICtrlCreateButton("FM-91", 285, 175, 70, 23)
  52. GUICtrlSetTip($play3, "WEBRadioPlayer FM-91 Channel")
  53.  
  54. $play4 = GUICtrlCreateButton("LATA", 215, 175, 70, 23)
  55. GUICtrlSetTip($play4, "WEBRadioPlayer LATA Channel")
  56.  
  57. $play5 = GUICtrlCreateButton("HITS-OF-BW", 355, 175, 70, 23)
  58. GUICtrlSetTip($play5, "WEBRadioPlayer BOLLYWOOD Channel")
  59.  
  60. $play6 = GUICtrlCreateButton("RAFI", 5, 175, 70, 23)
  61. GUICtrlSetTip($play6, "WEBRadioPlayer RAFI Channel")
  62.  
  63. $stop = GUICtrlCreateButton("STOP", 285, 200, 70, 23)
  64. GUICtrlSetFont(-1, 12, 30, 0, "Arial Black")
  65. GUICtrlSetTip($stop, "Click to stop the music")
  66.  
  67. $exit = GUICtrlCreateButton("EXIT", 355, 200, 70, 23)
  68. GUICtrlSetFont(-1, 12, 30, 0, "Arial Black")
  69. GUICtrlSetTip($exit, "Click to close the player")
  70.  
  71. $light = GUICtrlCreateButton("PAK", 285, 150, 70, 23)
  72. GUICtrlSetTip($light, "WEBRadioPlayer PAK TARANA")
  73.  
  74. $chat = GUICtrlCreateButton("RADIO2", 355, 150, 70, 23)
  75. GUICtrlSetTip($chat, "WEBRadioPlayer - RADIO PLAYER")
  76.  
  77. $label = GUICtrlCreateLabel("Playing: ", 5, 118, 280, 22)
  78. GUICtrlSetFont(-1, 12, 30, 0, "Arial Black")
  79. GUICtrlSetTip($label, "WEBRadioPlayer - The Best Najeeb Radio Player")
  80. GUICtrlCreateLabel("Volume: ", 5, 145, 50, 20)
  81. GUICtrlCreateLabel("-", 47, 139, 20, 20)
  82. GUICtrlSetFont(-1, 15)
  83. $slider = GUICtrlCreateSlider(54, 144, 210, 30)
  84. GUICtrlSetData($slider, 80)
  85. GUICtrlCreateLabel("+", 263, 140, 20, 20)
  86. GUICtrlSetFont(-1, 15)
  87. GUICtrlSetTip($slider, "Move the cursor to set the volume")
  88.  
  89. Global $hGIF = GUICtrlCreatePic("", -3, 0, 435, 120)
  90. TrayTip("NajeebRadioPlayer Player", "Start NajeebRadioPlayer please wait...", 0)
  91. _GUICtrlSetGIF($hGIF, InetRead("https://i.ibb.co/YTvQqWV/LOGO.gif", 16), Default, 1)
  92. GUICtrlSetTip($hGIF, "Information about the player")
  93.  
  94. $WEB = GUICtrlCreateLabel("� Najeeb Shah Khan https://pastebin.com/u/Najeebsk", 6, 200, 280, 22)
  95. GUICtrlSetFont(-1, 13, 30, 0, "Arial Black")
  96. GUICtrlSetTip($WEB, "� Copyright NajeebSK - https://pastebin.com/u/Najeebsk")
  97.  
  98. _IEErrorHandlerRegister()
  99. $oIE = _IECreateEmbedded()
  100. $GUIActiveX = GUICtrlCreateObj($oIE, -12, 225, 500, 50)
  101. _IENavigate($oIE, "https://i.ibb.co/YTvQqWV/LOGO.gif")
  102.  
  103. GUICtrlSetState(-1, $GUI_DISABLE)
  104.  
  105. Global $n1 = @ScriptDir & "\PAK.exe"
  106. If Not FileExists($n1) Then
  107.     TrayTip("WEBRadioPlayer", "Start NajeebRadioPlayer please wait...", 0)
  108.     InetGet("http://www.NSK.com/NAJEEB-PLAYER/PAK.exe", $n1)
  109.     TrayTip("", "", 0)
  110. EndIf
  111.  
  112. Global $n2 = @ScriptDir & "\RADIOPLAYER.exe"
  113. If Not FileExists($n2) Then
  114.     TrayTip("WEBRadioPlayer", "Start NajeebRadioPlayer please wait...", 0)
  115.     InetGet("http://www.NSK.com/NAJEEB-PLAYER/RADIOPLAYER.exe", $n2)
  116.     TrayTip("", "", 0)
  117. EndIf
  118.  
  119. GUISetState()
  120.  
  121. Func _Play()
  122.     $Title = ("Buzz Channel")
  123.     $URL = ("http://fusion.shoutca.st:8112/stream")
  124.     WMOpenFile($URL)
  125.     WMPlay($URL)
  126.     GUICtrlSetData($label, "Playing: " & $Title)
  127.     WinActivate("WEBRadioPlayer")
  128. EndFunc   ;==>_Play
  129.  
  130. Func _Play2()
  131.     $Title = ("PAK-FIMLI Channel")
  132.     $URL = ("http://74.91.125.187:8214/stream")
  133.     WMOpenFile($URL)
  134.     WMPlay($URL)
  135.     GUICtrlSetData($label, "Playing: " & $Title)
  136.     WinActivate("WEBRadioPlayer")
  137. EndFunc   ;==>_Play2
  138.  
  139. Func _Play3()
  140.     $Title = ("FM-91 Channel")
  141.     $URL = ("http://cc.vmakerhost.com:8147/steam/1/")
  142.     WMOpenFile($URL)
  143.     WMPlay($URL)
  144.     GUICtrlSetData($label, "Playing: " & $Title)
  145.     WinActivate("WEBRadioPlayer")
  146. EndFunc   ;==>_Play3
  147.  
  148. Func _Play4()
  149.     $Title = ("LATA Channel")
  150.     $URL = ("https://stream.zeno.fm/87xam8pf7tzuv")
  151.     WMOpenFile($URL)
  152.     WMPlay($URL)
  153.     GUICtrlSetData($label, "Playing: " & $Title)
  154.     WinActivate("WEBRadioPlayer")
  155. EndFunc   ;==>_Play4
  156.  
  157. Func _Play5()
  158.     $Title = ("BOLLYWOOD Channel")
  159.     $URL = ("https://stream-14.zeno.fm/a2gyqzwpwfeuv?zs=FZPPkfUPT1-FLq1lNTnc2A")
  160.     WMOpenFile($URL)
  161.     WMPlay($URL)
  162.     GUICtrlSetData($label, "Playing: " & $Title)
  163.     WinActivate("WEBRadioPlayer")
  164. EndFunc   ;==>_Play5
  165.  
  166. Func _Play6()
  167.     $Title = ("RAFI Channel")
  168.     $URL = ("https://stream-22.zeno.fm/2xx62x8ztm0uv?zs=H0kYgOvASsybRex146D3FA")
  169.     WMOpenFile($URL)
  170.     WMPlay($URL)
  171.     GUICtrlSetData($label, "Playing: " & $Title)
  172.     WinActivate("WEBRadioPlayer")
  173. EndFunc   ;==>_Play6
  174.  
  175. Func _Stop()
  176.     WMStop()
  177.     GUICtrlSetData($label, "Playing: ")
  178. EndFunc   ;==>_Stop
  179.  
  180. Func _exit()
  181.     Exit
  182. EndFunc   ;==>_exit
  183.  
  184. Func _About()
  185.     MsgBox(80 + 8192, "About", "   NajeebRadioPlayer - The Best Najeeb Radio Player !" & @CRLF & @CRLF _
  186.              & "   NajeebRadioPlayer - versions: Ultimate" & @CRLF & @CRLF _
  187.              & "   Copyright � 2022 Najeeb Shah Khan - https://pastebin.com/u/Najeebsk")
  188. EndFunc   ;==>_About
  189.  
  190. While 1
  191.     WmSetVolume(GUICtrlRead($slider))
  192.  
  193.     $mMsg = GUIGetMsg()
  194.     $tMsg = TrayGetMsg()
  195.  
  196.     If $DoubleClicked Then
  197.         _Play()
  198.         $DoubleClicked = False
  199.     EndIf
  200.  
  201.     Select
  202.         Case $mMsg = $GUI_EVENT_CLOSE
  203.             GUISetState(@SW_HIDE)
  204.             Opt("TrayIconHide", 0)
  205.         Case $mMsg = $WEB
  206.             ShellExecute("https://pastebin.com/u/Najeebsk")
  207.         Case $mMsg = $play
  208.             _Play()
  209.         Case $mMsg = $stop
  210.             _Stop()
  211.         Case $mMsg = $play2
  212.             _Play2()
  213.         Case $mMsg = $play3
  214.             _Play3()
  215.         Case $mMsg = $play4
  216.             _Play4()
  217.         Case $mMsg = $play5
  218.             _Play5()
  219.         Case $mMsg = $play6
  220.             _Play6()
  221.         Case $mMsg = $hGIF
  222.             _About()
  223.         Case $mMsg = $light
  224.             Run("PAK.exe")
  225.         Case $mMsg = $chat
  226.             Run("RADIOPLAYER.exe")
  227.         Case $mMsg = $exit
  228.             If ProcessExists("PAK.exe") Then
  229.                 ProcessClose("PAK.exe")
  230.                 ProcessWaitClose("PAK.exe")
  231.             EndIf
  232.             If ProcessExists("RADIOPLAYER.exe") Then
  233.                 ProcessClose("RADIOPLAYER.exe")
  234.                 ProcessWaitClose("RADIOPLAYER.exe")
  235.             EndIf
  236.             _exit()
  237.         Case $tMsg = $restore
  238.             GUISetState(@SW_RESTORE)
  239.             GUISetState(@SW_SHOW)
  240.             Opt("TrayIconHide", 1)
  241.         Case $tMsg = $exit
  242.             WMClosePlayer()
  243.             Exit
  244.         Case $tMsg = $TRAY_EVENT_PRIMARYDOWN
  245.             GUISetState(@SW_RESTORE)
  246.             GUISetState(@SW_SHOW)
  247.             Opt("TrayIconHide", 1)
  248.     EndSelect
  249. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement