Jump to content

SotosTheGreat

Members
  • Posts

    3
  • Joined

  • Last visited

SotosTheGreat's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I have finally fixed it CODE#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GuiConstants.au3> #include <Sound.au3> global $pl1 = 0 global $media = 0 $g1 = GuiCreate("Mp3 Player v4", 335, 125,-1, -1) GUISetFont(10, "", "", "Times New Roman") TraySetState(2) ;; MAIN $play = GUICtrlCreateButton("Play", 5, 50, 50, 20) $stop = GUICtrlCreateButton("Stop", 5, 72, 50, 20) $select = GUICtrlCreateButton("Select", 5, 94, 50, 20) $pause = GUICtrlCreateButton("Pause", 5, 28, 50, 20) $e1 = GUICtrlCreateInput("", 100, 50, 200, 20, $ES_READONLY) $sl = GUICtrlCreateSlider(100, 100, 200) GUICtrlCreateLabel("Volume", 180, 80) GUICtrlCreateLabel("Selected Song", 160, 20) GUICtrlSetData($sl, 100) Func slider() SoundSetWaveVolume( GUICtrlRead( $sl ) ) EndFunc GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE SoundSetWaveVolume(100) ExitLoop Case $msg = $play _SoundPlay($Media) SoundSetWaveVolume(100) Case $msg = $stop _SoundStop($Media) Case $msg = $pause _SoundPause($Media) Case $msg = $select _SoundStop($Media) $File=FileOpenDialog("","","Media files (*.avi;*.mp3;*.wav;*.mpg)") $Media=_SoundOpen($File) $mid = $File while 1 $songstr = stringinstr($mid,"\") if $songstr = 0 then ExitLoop $mid = stringmid($mid,$songstr+1) wend $sk = $mid GUICtrlSetData($e1, $sk) Case $msg = $sl Call("slider") Case Else EndSelect WEnd Exit I also removed the tray Icon because I don't like it AND made some other changes *Created a slidebar for sound control *Added some labels *Created a pause button Hope you'll like it
  2. I changed a little the MP3 PLAYER * Added Sound Control * Removed the play delay * Fixed the edit box I didn't work a lot on it at all but I think it's a good improvement CODE#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GuiConstants.au3> #include <Sound.au3> global $pl1 = 0 $g1 = GuiCreate("Mp3 Player v4", 335, 125,-1, -1) GUISetFont(10, "", "", "vrinda") ;; MAIN $play = GUICtrlCreateButton("Play", 5, 50, 50, 20) $stop = GUICtrlCreateButton("Stop", 5, 72, 50, 20) $select = GUICtrlCreateButton("Select", 5, 94, 50, 20) $e1 = GUICtrlCreateInput("", 100, 50, 200, 20, $ES_READONLY,) $b1 = GUICtrlCreateButton("10", 100, 80) $b2 = GUICtrlCreateButton("25", 130, 80) $b3 = GUICtrlCreateButton("50", 160, 80) $b4 = GUICtrlCreateButton("100", 190, 80) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE SoundSetWaveVolume(100) ExitLoop Case $msg = $play SoundSetWaveVolume(0) GUICtrlRead($song) SoundPlay($song) SoundSetWaveVolume(100) Case $msg = $stop SoundSetWaveVolume(0) Case $msg = $select $song = FileOpenDialog("Play MP3/WAV sound",@MyDocumentsDir,"MP3 sound (*.mp3)|WAV sound (*.wav)|All files (*.*)",1 + 4) SoundSetWaveVolume(0) $mid = $song while 1 $songstr = stringinstr($mid,"\") if $songstr = 0 then ExitLoop $mid = stringmid($mid,$songstr+1) wend $sk = $mid GUICtrlSetData($e1, $sk) Case $msg = $b1 SoundSetWaveVolume(10) Case $msg = $b2 SoundSetWaveVolume(25) Case $msg = $b3 SoundSetWaveVolume(50) Case $msg = $b4 SoundSetWaveVolume(100) Case Else EndSelect WEnd Exit
  3. I changed a little the MP3 PLAYER * Added Sound Control
×
×
  • Create New...