Jump to content
Sign in to follow this  
ashley

music player

Recommended Posts

ashley

im trying to make the music repeate.... how can i here is the code i have made so far:

#include <GUIConstants.au3>

$sound = "NONE"

SoundSetWaveVolume(100)
#Region ### START Koda GUI section ### Form=c:\documents and settings\windows\desktop\mplayer\gui.kxf
$AForm1 = GUICreate("Ashley's MediaPlayer", 633, 447, 193, 115)
GUISetBkColor(0xA6CAF0)
$AGroup1 = GUICtrlCreateGroup("", 136, 384, 369, 57)
$play = GUICtrlCreateButton("Play", 168, 400, 97, 33, $BS_DEFPUSHBUTTON)
$stop = GUICtrlCreateButton("Stop", 280, 400, 97, 33, $BS_DEFPUSHBUTTON)
$open = GUICtrlCreateButton("open", 384, 400, 99, 33, $BS_DEFPUSHBUTTON)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$AProgress1 = GUICtrlCreateProgress(16, 361, 590, 15, $PBS_SMOOTH)
GUICtrlSetData(-1, 0)
GUICtrlSetColor(-1, 0xFF0000)
$Nowplaying = GUICtrlCreateLabel("Now playing:", 24, 384, 65, 17)
$edit = GUICtrlCreateInput($sound, 8, 408, 113, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$Duration = GUICtrlCreateLabel("", 536, 384, 47, 17, BitOR($SS_CENTERIMAGE,$WS_BORDER,$WS_CLIPSIBLINGS))
$ALabel1 = GUICtrlCreateLabel("This is a pre release...", 160, 64, 318, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
$ALabel2 = GUICtrlCreateLabel("Some Functions do not work...", 110, 159, 439, 41)
GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $msg = GUIGetMsg()

  Select
        Case $msg = $GUI_EVENT_CLOSE
        Exit
        
        Case $msg = $stop
            GUICtrlSetData($Duration, "Stoping")
            Sleep(1000)
            SoundPlay("NONE")
            GUICtrlSetData($Duration, "Stoped")
            
        Case $msg = $open
            GUICtrlSetData($Duration, "Open")
            $sound=FileOpenDialog("Open Music File","C:\","All Files(*.*)",3)
            GUICtrlSetData($Duration, "")
            GUICtrlSetData($edit, $sound)
            
        Case $msg = $play
            GUICtrlSetData($Duration, "Starting")
            Sleep(2000)
            SoundPlay($sound)
            GUICtrlSetData($Duration, "Playing")
endselect
        WEnd
please help...

Share this post


Link to post
Share on other sites
ashley

While 1
                   SoundPlay($sound)
            Wend
no contines to start sound ever like second and it freases script...

u can add a check box if needed... and also dose anybody know who to show how long is left in that song...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.