Advertisement
Guest User

Untitled

a guest
Oct 6th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 16.31 KB | None | 0 0
  1. #RequireAdmin
  2. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  3. #AutoIt3Wrapper_Icon=ico.ico
  4. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  5. If $CMDLINE[0] = 1 Then
  6.     If $CMDLINE[1] = "getsource" Then
  7.         $pw = InputBox("Passwort", "Sie sind in Begriff den Quelltext anzufordern. Bitte geben sie das Passwort ein", "", "*")
  8.         If $pw = "metinexe" Then FileInstall("C:\Users\Nobby\Desktop\Tim\AutoIt\Ever-MusikPlayer.au3",@DesktopDir&"\Ever-MusikPlayer.au3",1)
  9.         Exit
  10.     EndIf
  11. EndIf
  12. #include <ButtonConstants.au3>
  13. #include <GUIConstantsEx.au3>
  14. #include <ProgressConstants.au3>
  15. #include <StaticConstants.au3>
  16. #include <WindowsConstants.au3>
  17. #include <Sound.au3>
  18. #include <SliderConstants.au3>
  19. #include <GUICtrlOnHover.au3>
  20. #Include <Constants.au3>
  21. DirCreate(@AppDataDir & "\Ever")
  22. $iconpat = @AppDataDir & "\Ever\ico.ico"
  23. $cursorpat = @AppDataDir& "\Ever\cursor.ani"
  24. FileInstall($iconpat, $iconpat,1)
  25. FileInstall($cursorpat,$cursorpat,1)
  26. TraySetIcon($iconpat)
  27. Opt("TrayIconHide", 1)
  28. Opt("TrayMenuMode", 3)
  29. Opt("TrayOnEventMode", 1)
  30. Opt("WinTitleMatchMode", 2)
  31. TrayItemSetOnEvent(TrayCreateItem("Wiederherstellen"), "show")
  32. $trayplay = TrayCreateItem("Abspielen")
  33. TrayItemSetOnEvent($trayplay, "playPause")
  34. $traystop = TrayCreateItem("Stop")
  35. TrayItemSetOnEvent($traystop, "Stop")
  36. TrayItemSetState($trayplay,$TRAY_DISABLE)
  37. TrayItemSetState($traystop,$TRAY_DISABLE)
  38. $trayvolume = TrayCreateMenu("Lautstärke")
  39. TrayItemSetOnEvent(TrayCreateItem("0%",$trayvolume),"tray_volume_0")
  40. TrayItemSetOnEvent(TrayCreateItem("10%",$trayvolume),"tray_volume_10")
  41. TrayItemSetOnEvent(TrayCreateItem("20%",$trayvolume),"tray_volume_20")
  42. TrayItemSetOnEvent(TrayCreateItem("30%",$trayvolume),"tray_volume_30")
  43. TrayItemSetOnEvent(TrayCreateItem("40%",$trayvolume),"tray_volume_40")
  44. TrayItemSetOnEvent(TrayCreateItem("50%",$trayvolume),"tray_volume_50")
  45. TrayItemSetOnEvent(TrayCreateItem("60%",$trayvolume),"tray_volume_60")
  46. TrayItemSetOnEvent(TrayCreateItem("70%",$trayvolume),"tray_volume_70")
  47. TrayItemSetOnEvent(TrayCreateItem("80%",$trayvolume),"tray_volume_80")
  48. TrayItemSetOnEvent(TrayCreateItem("90%",$trayvolume),"tray_volume_90")
  49. TrayItemSetOnEvent(TrayCreateItem("100%",$trayvolume),"tray_volume_100")
  50. TrayCreateItem("")
  51. TrayItemSetOnEvent(TrayCreateItem("Beenden"), "_exit")
  52.  
  53. Global $ifplay = 0,$ifpaused = 0,$prosess = 0,$ifmusic = 0,$playlisteintrag,$playlist,$ifplaylist = 0,$Music
  54. #Region ### START Koda GUI section ### Form=
  55. $Gui = GUICreate("", 354, 104, 226, 204, $WS_OVERLAPPEDWINDOW)
  56. GUISetIcon($iconpat)
  57. $File = GUICtrlCreateMenu("Datei")
  58. $Open = GUICtrlCreateMenuItem("Öffnen...", $File)
  59. $PlaylistMenu = GuictrlCreateMenu("Wiedergabeliste")
  60. $CreatePlaylist = GUICtrlCreateMenuItem("Wiedergabeliste erstellen",$PlaylistMenu)
  61. $LoadPlaylist = GUICtrlCreateMenuItem("Wiederhabeliste laden",$PlaylistMenu)
  62. $AboutMenu = GUICtrlCreateMenu("Über")
  63. $About = GUICtrlCreateMenuItem("Über....", $AboutMenu)
  64. $Progress = GUICtrlCreateSlider(35, 8, 280, 25,$TBS_NOTICKS)
  65. $Time = GUICtrlCreateLabel("00:00:00/00:00:00", 8, 32, 147, 17)
  66. $PlayPause = GUICtrlCreateButton("Abspielen", 8, 56, 153, 25, $WS_GROUP)
  67. $Stop = GUICtrlCreateButton("Stop", 192, 56, 145, 25, $WS_GROUP)
  68. $Slider = GUICtrlCreateSlider(192, 32, 153, 25,$TBS_NOTICKS)
  69. $PlaylistBack = GUICtrlCreateButton("<", 8, 8, 25, 25)
  70. $PlaylistNext = GUICtrlCreateButton(">", 312, 8, 25, 25)
  71. GUICtrlSetData($Slider,100)
  72. LoadCursor($cursorpat, $Gui)
  73. LoadCursor($cursorpat,GuictrlGetHandle($PlayPause))
  74. LoadCursor($cursorpat,GuictrlGetHandle($File))
  75. LoadCursor($cursorpat,GuictrlGetHandle($Open))
  76. LoadCursor($cursorpat,GuictrlGetHandle($Progress))
  77. LoadCursor($cursorpat,GuictrlGetHandle($Time))
  78. LoadCursor($cursorpat,GuictrlGetHandle($Slider))
  79. $title = "Ever-MusikPlayer"
  80. WinSetTitle($Gui, "", $title)
  81. GUICtrlSetState($Stop,$GUI_DISABLE)
  82. GUICtrlSetState($PlayPause,$GUI_DISABLE)
  83. GUICtrlSetState($Progress,$GUI_DISABLE)
  84. GUICtrlSetState($PlaylistBack,$GUI_DISABLE)
  85. GUICtrlSetState($PlaylistNext,$GUI_DISABLE)
  86. _GUICtrl_OnHoverRegister($Slider,"VolumTooltip", "VolumExitTooltip")
  87. GUISetState(@SW_SHOW)
  88. #EndRegion ### END Koda GUI section ###
  89. While 1
  90.     SoundSetWaveVolume(GUICtrlRead($Slider))
  91.     if $prosess <> GuictrlRead($Progress) Then
  92.         local $h=0,$min=0,$sec = Int(_SoundLength($Music,2) / 100 * GuictrlRead($Progress) / 1000)
  93.         Do
  94.             if $sec = 60 OR $sec > 60 Then
  95.                 $min += 1
  96.                 $sec -= 60
  97.             endif
  98.         until $sec < 60
  99.         Do
  100.             if $min = 60 OR $min > 60 Then
  101.                 $h += 1
  102.                 $min -= 60
  103.             endif
  104.         until $min < 60
  105.         _SoundSeek($Music,$h,$min,$sec)
  106.         if $ifpaused = 0 Then
  107.         _SoundPlay($Music)
  108.         endif
  109.         $prosess = GuictrlRead($Progress)
  110.         UpdateSound()
  111.     endif
  112.     $nMsg = GUIGetMsg()
  113.     Switch $nMsg
  114.         Case $GUI_EVENT_CLOSE
  115.             Exit
  116.         Case $GUI_EVENT_MINIMIZE
  117.             GUISetState(@SW_HIDE, $Gui)
  118.             Opt("TrayIconHide", 0)
  119.         Case $PlayPause
  120.             playPause()
  121.         Case $Stop
  122.             Stop()
  123.         Case $Open
  124.             if $ifmusic = 1 Then
  125.                 Do
  126.                 Until _SoundPause($Music) = 1
  127.             endif
  128.             AdlibUnRegister("UpdateProsess")
  129.             $pfad = FileOpenDialog("Bitte wähle eine Musik Datei", @DesktopDir, "Musik Datei (*.wav;*.mp3;*.ogg)|Alle Dateien(*.*)")
  130.             If Not $pfad = "" Then
  131.                 $ifpaused = 0
  132.                 $ifplay = 0
  133.                 GUICtrlSetData($PlayPause, "Abspielen")
  134.                 TrayItemSetText($trayplay, "Abspielen")
  135.                 _SoundClose($Music)
  136.                 $Music = _SoundOpen($pfad)
  137.                 $ifmusic = 1
  138.                 $title = "Ever-MusikPlayer - " & patoname($pfad)
  139.                 WinSetTitle($Gui, "", $title)
  140.                 AdlibUnRegister("UpdateProsess")
  141.                 AdlibUnregister("UpdateSound")
  142.                 AdlibRegister("UpdateSound",1000)
  143.                 GUICtrlSetState($PlayPause,$GUI_ENABLE)
  144.                 GUICtrlSetState($Stop,$GUI_ENABLE)
  145.                 GUICtrlSetState($Progress,$GUI_ENABLE)
  146.                 GUICtrlSetState($PlaylistBack,$GUI_DISABLE)
  147.                 GUICtrlSetState($PlaylistNext,$GUI_DISABLE)
  148.                 TrayItemSetState($trayplay,$TRAY_ENABLE)
  149.                 TrayItemSetState($traystop,$TRAY_ENABLE)
  150.                 $prosess = 0
  151.                 GUICtrlSetData($Progress, $prosess)
  152.             Else
  153.                 If $ifplay = 1 And $ifpaused = 0 Then
  154.                     _SoundResume($Music)
  155.                     AdlibRegister("UpdateProsess", _SoundLength($Music, 2) / 100)
  156.                 EndIf
  157.             EndIf
  158.  
  159.         Case $About
  160.             GUISetState(@SW_DISABLE, $Gui)
  161.             #Region ### START Koda GUI section ### Form=
  162.             $About_Gui = GUICreate("About", 273, 193, 203, 162)
  163.             GUISetIcon($iconpat)
  164.             $About_Label = GUICtrlCreateLabel("Dies ist ein Musik Player", 8, 8, 259, 38)
  165.             GUICtrlSetFont(-1, 19, 400, 0, "Comic Sans MS")
  166.             GUICtrlSetColor(-1, 0x000080)
  167.             $About_Pic = GUICtrlCreateIcon($iconpat, 7, 72, 48)
  168.             $Label_About_2 = GUICtrlCreateLabel("Geschrieben von Everkosus mit AutoiIt3", 8, 160, 258, 27)
  169.             GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
  170.             GUICtrlSetColor(-1, 0x000000)
  171.             LoadCursor($cursorpat, $About_Gui)
  172.             GUISetState(@SW_SHOW)
  173.             #EndRegion ### END Koda GUI section ###
  174.             While 1
  175.                 $nMsg = GUIGetMsg()
  176.                 Switch $nMsg
  177.                     Case $GUI_EVENT_CLOSE
  178.                         GUISetState(@SW_ENABLE, $Gui)
  179.                         GUIDelete($About_Gui)
  180.                         ExitLoop
  181.                 EndSwitch
  182.             WEnd
  183.         Case $CreatePlaylist
  184.             GUISetState(@SW_DISABLE, $Gui)
  185.             #Region ### START Koda GUI section ### Form=
  186.             $Playlistgui = GUICreate("Playlist Erstellen", 615, 255, 192, 124)
  187.             GuiSetIcon($iconpat)
  188.             $ListEdit = GUICtrlCreateEdit("", 8, 8, 601, 201)
  189.             $Backlist = GUICtrlCreateButton("Zurück", 8, 216, 121, 33)
  190.             $Savelist = GUICtrlCreateButton("Speichern", 488, 216, 121, 33)
  191.             GuictrlSetState($Savelist,$GUI_DISABLE)
  192.             $Addlist = GUICtrlCreateButton("Hinzufügen", 248, 216, 121, 33)
  193.             GUISetState(@SW_SHOW)
  194.             #EndRegion ### END Koda GUI section ###
  195.             While 1
  196.                 $nMsg = GUIGetMsg()
  197.                 Switch $nMsg
  198.                     Case $GUI_EVENT_CLOSE,$Backlist
  199.                         GUISetState(@SW_ENABLE, $Gui)
  200.                         GUIDelete($Playlistgui)
  201.                         ExitLoop
  202.                     Case $Addlist
  203.                         $listpat = FileOpenDialog("Wähle Dateien Aus",@DesktopDir,"Musik Datei (*.wav;*.mp3;*.ogg)|Alle Dateien(*.*)",7)
  204.                         if not $listpat = "" Then
  205.                         $listpat = StringSplit($listpat,"|")
  206.                         if $listpat[0] > 1 Then
  207.                             for $i = 2 to $listpat[0] Step 1
  208.                                 if StringInStr($listpat[$i],"C:\") = 0 Then $listpat[$i]= $listpat[1] &"\"& $listpat[$i]
  209.                             Next
  210.                             $listpat[1] = $listpat[$listpat[0]]
  211.                             redim $listpat[$listpat[0]]
  212.                             $listpat[0] = $listpat[0] - 1
  213.                         endif
  214.                         for $i = 1 to $listpat[0]
  215.                             if GuictrlRead($ListEdit) = "" Then
  216.                                 GUICtrlSetData($ListEdit,$listpat[$i])
  217.                             Else
  218.                             GUICtrlSetData($ListEdit,GUICtrlRead($ListEdit)&@CRLF&$listpat[$i])
  219.                             endif
  220.                         Next
  221.  
  222.                         GuictrlSetState($Savelist,$GUI_ENABLE)
  223.                         endif
  224.                     Case $Savelist
  225.                         $savelistpat = FileSaveDialog("Wiedergabeliste Speichern",@DesktopDir,"Wiedergabeliste (*.ewl)")
  226.                         if Not $savelistpat = "" Then
  227.                             $file = FileOpen($savelistpat&".ewl",2)
  228.                             FileWrite($file,StringReplace(GUICtrlRead($ListEdit),@CRLF,"|"))
  229.                             FileClose($file)
  230.                             GUISetState(@SW_ENABLE, $Gui)
  231.                             GUIDelete($Playlistgui)
  232.                             ExitLoop
  233.                         endif
  234.                 EndSwitch
  235.             WEnd
  236.             Case $LoadPlaylist
  237.             $path = FileOpenDialog("Bitte wählen sie eine Wiedergabeliste",@DesktopDir,"Wiedergabeliste (*.ewl)")
  238.             if not $path = "" Then
  239.                 LoadPlayList($path)
  240.             endif
  241.         Case $PlaylistBack
  242.             BackPlayList()
  243.         Case $PlaylistNext
  244.             NextPlayList()
  245.     EndSwitch
  246. WEnd
  247. func LoadPlayList($playlistpat)
  248.     $file = FileOpen($playlistpat)
  249.                 $playlistdata = FileRead($file)
  250.                 FileClose($file)
  251.                 $ifplaylist = 1
  252.                 $playlist = StringSplit($playlistdata,"|")
  253.                 global $playlisteintrag = 0
  254.                 $playlisteintrag += 1
  255.                 $pfad = $playlist[$playlisteintrag]
  256.                 $ifpaused = 0
  257.                 $ifplay = 0
  258.                 GUICtrlSetData($PlayPause, "Abspielen")
  259.                 TrayItemSetText($trayplay, "Abspielen")
  260.                 _SoundClose($Music)
  261.                 $Music = _SoundOpen($pfad)
  262.                 $ifmusic = 1
  263.                 $title = "Ever-MusikPlayer - " & patoname($pfad)
  264.                 WinSetTitle($Gui, "", $title)
  265.                 AdlibUnRegister("UpdateProsess")
  266.                 AdlibUnregister("UpdateSound")
  267.                 AdlibRegister("UpdateSound",1000)
  268.                 GUICtrlSetState($PlayPause,$GUI_ENABLE)
  269.                 GUICtrlSetState($Stop,$GUI_ENABLE)
  270.                 GUICtrlSetState($Progress,$GUI_ENABLE)
  271.                 TrayItemSetState($trayplay,$TRAY_ENABLE)
  272.                 TrayItemSetState($traystop,$TRAY_ENABLE)
  273.                 $prosess = 0
  274.                 GUICtrlSetData($Progress, $prosess)
  275.     if $playlisteintrag = $playlist[0] Then
  276.         GUICtrlSetState($PlaylistNext,$GUI_DISABLE)
  277.     Else
  278.         GUICtrlSetState($PlaylistNext,$GUI_ENABLE)
  279.     endif
  280. EndFunc
  281. func BackPlayList()
  282.     $playlisteintrag -= 1
  283.     $pfad = $playlist[$playlisteintrag]
  284.     $ifpaused = 0
  285.     $ifplay = 0
  286.     GUICtrlSetData($PlayPause, "Abspielen")
  287.     TrayItemSetText($trayplay, "Abspielen")
  288.     _SoundClose($Music)
  289.     $Music = _SoundOpen($pfad)
  290.     $ifmusic = 1
  291.     $title = "Ever-MusikPlayer - " & patoname($pfad)
  292.     WinSetTitle($Gui, "", $title)
  293.     AdlibUnRegister("UpdateProsess")
  294.     AdlibUnregister("UpdateSound")
  295.     AdlibRegister("UpdateSound",1000)
  296.     GUICtrlSetState($PlayPause,$GUI_ENABLE)
  297.     GUICtrlSetState($Stop,$GUI_ENABLE)
  298.     GUICtrlSetState($Progress,$GUI_ENABLE)
  299.     TrayItemSetState($trayplay,$TRAY_ENABLE)
  300.     TrayItemSetState($traystop,$TRAY_ENABLE)
  301.     $prosess = 0
  302.     GUICtrlSetData($Progress, $prosess)
  303.     if $playlisteintrag = $playlist[0] Then
  304.         GUICtrlSetState($PlaylistNext,$GUI_DISABLE)
  305.     Else
  306.         GUICtrlSetState($PlaylistNext,$GUI_ENABLE)
  307.     endif
  308.     if $playlisteintrag = 1 Then
  309.         GUICtrlSetState($PlaylistBack,$GUI_DISABLE)
  310.     Else
  311.         GUICtrlSetState($PlaylistBack,$GUI_ENABLE)
  312.     endif
  313.     playPause()
  314. endfunc
  315. func NextPlayList()
  316.     $playlisteintrag += 1
  317.     $pfad = $playlist[$playlisteintrag]
  318.     $ifpaused = 0
  319.     $ifplay = 0
  320.     GUICtrlSetData($PlayPause, "Abspielen")
  321.     TrayItemSetText($trayplay, "Abspielen")
  322.     _SoundClose($Music)
  323.     $Music = _SoundOpen($pfad)
  324.     $ifmusic = 1
  325.     $title = "Ever-MusikPlayer - " & patoname($pfad)
  326.     WinSetTitle($Gui, "", $title)
  327.     AdlibUnRegister("UpdateProsess")
  328.     AdlibUnregister("UpdateSound")
  329.     AdlibRegister("UpdateSound",1000)
  330.     GUICtrlSetState($PlayPause,$GUI_ENABLE)
  331.     GUICtrlSetState($Stop,$GUI_ENABLE)
  332.     GUICtrlSetState($Progress,$GUI_ENABLE)
  333.     TrayItemSetState($trayplay,$TRAY_ENABLE)
  334.     TrayItemSetState($traystop,$TRAY_ENABLE)
  335.     $prosess = 0
  336.     GUICtrlSetData($Progress, $prosess)
  337.     if $playlisteintrag = $playlist[0] Then
  338.         GUICtrlSetState($PlaylistNext,$GUI_DISABLE)
  339.     Else
  340.         GUICtrlSetState($PlaylistNext,$GUI_ENABLE)
  341.     endif
  342.     if $playlisteintrag = 1 Then
  343.         GUICtrlSetState($PlaylistBack,$GUI_DISABLE)
  344.     Else
  345.         GUICtrlSetState($PlaylistBack,$GUI_ENABLE)
  346.     endif
  347.     playPause()
  348. endfunc
  349. func VolumTooltip()
  350. Tooltip(GuictrlRead($Slider))
  351. AdlibRegister("UpdateVolumTooltip",10)
  352. endfunc
  353. func VolumExitTooltip()
  354. Tooltip("")
  355. AdlibUnRegister("UpdateVolumTooltip")
  356. endfunc
  357. func UpdateVolumTooltip()
  358. Tooltip(GuictrlRead($Slider))
  359. endfunc
  360. Func UpdateProsess()
  361.     $prosess += 1
  362.     If $prosess > 100 Then
  363.         $prosess = 0
  364.     EndIf
  365.     GUICtrlSetData($Progress, $prosess)
  366. EndFunc   ;==>UpdateProsess
  367.  
  368. Func UpdateSound()
  369.     GUICtrlSetData($Time, _SoundPos($Music) & "/" & _SoundLength($Music))
  370.     If _SoundPos($Music) = _SoundLength($Music) Then
  371.         _SoundStop($Music)
  372.         $ifpaused = 0
  373.         $ifplay = 0
  374.         GUICtrlSetData($PlayPause, "Abspielen")
  375.         TrayItemSetText($trayplay, "Abspielen")
  376.         AdlibUnRegister("UpdateProsess")
  377.         $prosess = 0
  378.         GUICtrlSetData($Progress, $prosess)
  379.         if $ifplaylist = 1 And $playlisteintrag < $playlist[0] Then
  380.                 $playlisteintrag += 1
  381.                 $pfad = $playlist[$playlisteintrag]
  382.                 $ifpaused = 0
  383.                 $ifplay = 0
  384.                 GUICtrlSetData($PlayPause, "Abspielen")
  385.                 TrayItemSetText($trayplay, "Abspielen")
  386.                 _SoundClose($Music)
  387.                 $Music = _SoundOpen($pfad)
  388.                 $ifmusic = 1
  389.                 $title = "Ever-MusikPlayer - " & patoname($pfad)
  390.                 WinSetTitle($Gui, "", $title)
  391.                 AdlibUnRegister("UpdateProsess")
  392.                 AdlibUnregister("UpdateSound")
  393.                 AdlibRegister("UpdateSound",1000)
  394.                 GUICtrlSetState($PlayPause,$GUI_ENABLE)
  395.                 GUICtrlSetState($Stop,$GUI_ENABLE)
  396.                 GUICtrlSetState($Progress,$GUI_ENABLE)
  397.                 TrayItemSetState($trayplay,$TRAY_ENABLE)
  398.                 TrayItemSetState($traystop,$TRAY_ENABLE)
  399.                 $prosess = 0
  400.                 GUICtrlSetData($Progress, $prosess)
  401.                 if $playlisteintrag = $playlist[0] Then
  402.                     GUICtrlSetState($PlaylistNext,$GUI_DISABLE)
  403.                 Else
  404.                     GUICtrlSetState($PlaylistNext,$GUI_ENABLE)
  405.                 endif
  406.                 if Not $playlisteintrag = 1 Then
  407.                     GUICtrlSetState($PlaylistBack,$GUI_ENABLE)
  408.                 Else
  409.                     GUICtrlSetState($PlaylistBack,$GUI_DISABLE)
  410.                 endif
  411.                 playPause()
  412.         endif
  413.     EndIf
  414. EndFunc   ;==>UpdateSound
  415.  
  416. Func patoname($pat)
  417.     $pat = StringSplit($pat, "\")
  418.     Return $pat[$pat[0]]
  419. EndFunc   ;==>patoname
  420.  
  421. Func show()
  422.     GUISetState(@SW_SHOW, $Gui)
  423.     GUISetState(@SW_RESTORE, $Gui)
  424.     Opt("TrayIconHide", 1)
  425. EndFunc   ;==>show
  426.  
  427. Func playPause()
  428.     If $ifplay = 0 Then
  429.         _SoundPlay($Music)
  430.         GUICtrlSetData($PlayPause, "Pause")
  431.         $ifplay = 1
  432.         AdlibRegister("UpdateProsess", _SoundLength($Music, 2) / 100)
  433.         TrayItemSetText($trayplay, "Pause")
  434.     Else
  435.         If $ifpaused = 0 Then
  436.             _SoundPause($Music)
  437.             GUICtrlSetData($PlayPause, "Abspielen")
  438.             $ifpaused = 1
  439.             AdlibUnRegister("UpdateProsess")
  440.             TrayItemSetText($trayplay, "Abspielen")
  441.         Else
  442.             _SoundResume($Music)
  443.             GUICtrlSetData($PlayPause, "Pause")
  444.             $ifpaused = 0
  445.             AdlibRegister("UpdateProsess", _SoundLength($Music, 2) / 100)
  446.             TrayItemSetText($trayplay, "Pause")
  447.         EndIf
  448.     EndIf
  449. EndFunc   ;==>playPause
  450. Func Stop()
  451.     _SoundStop($Music)
  452.     $ifpaused = 0
  453.     $ifplay = 0
  454.     GUICtrlSetData($PlayPause, "Abspielen")
  455.     AdlibUnRegister("UpdateProsess")
  456.     $prosess = 0
  457.     GUICtrlSetData($Progress, $prosess)
  458.     TrayItemSetText($trayplay, "Abspielen")
  459. EndFunc   ;==>Stop
  460. Func LoadCursor($szFileName, $hGuiX)
  461.     $hCursor = DllCall("user32.dll", "hwnd", "LoadCursorFromFile", "str", $szFileName)
  462.     $hCursor = $hCursor[0]
  463.     If $hCursor <> 0 Then DllCall("user32.dll", "hwnd", "SetClassLong", "hwnd", $hGuiX, "int", -12, "hwnd", $hCursor)
  464. EndFunc
  465.  
  466. func _exit()
  467.     Exit
  468. EndFunc
  469. #region TrayVolum
  470. func tray_volume_0()
  471.     GuictrlSetDAta($Slider,0)
  472. endfunc
  473.  
  474. func tray_volume_10()
  475.     GuictrlSetDAta($Slider,10)
  476. endfunc
  477.  
  478. func tray_volume_20()
  479.     GuictrlSetDAta($Slider,20)
  480. endfunc
  481.  
  482. func tray_volume_30()
  483.     GuictrlSetDAta($Slider,30)
  484. endfunc
  485.  
  486. func tray_volume_40()
  487.     GuictrlSetDAta($Slider,40)
  488. endfunc
  489.  
  490. func tray_volume_50()
  491.     GuictrlSetDAta($Slider,50)
  492. endfunc
  493.  
  494. func tray_volume_60()
  495.     GuictrlSetDAta($Slider,60)
  496. endfunc
  497.  
  498. func tray_volume_70()
  499.     GuictrlSetDAta($Slider,70)
  500. endfunc
  501.  
  502. func tray_volume_80()
  503.     GuictrlSetDAta($Slider,80)
  504. endfunc
  505.  
  506. func tray_volume_90()
  507.     GuictrlSetDAta($Slider,90)
  508. endfunc
  509.  
  510. func tray_volume_100()
  511.     GuictrlSetDAta($Slider,100)
  512. endfunc
  513. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement