Jump to content
Sign in to follow this  
Bounda

Having A Problem..

Recommended Posts

Bounda

im making an AutoAmp Player to play music using Autoit but problem is i cant get the song to stop.. heres the code cna ne1 help

;AutoAmp Player
;Plays Music
;Many things To Be Added
; --Bounda--
;--------------------------
#include <GUIConstants.au3>

GUICreate("AutoAmp Player", 300, 100)
$Play = GUICtrlCreateButton("Play", 10, 10)
$Stop = GUICtrlCreateButton("Stop", 50, 10)
GUISetState()

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $Play
        ButtonPressed()
        EndSelect
WEnd

Func ButtonPressed()
        $song = InputBox("Song", "Please insert the name of the song with .mp3")
        SoundPlay($song& ".mp3")
            Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $Stop
        Exit
        EndSelect
    EndFunc

Share this post


Link to post
Share on other sites
Jos

;AutoAmp Player
;Plays Music
;Many things To Be Added
; --Bounda--
;--------------------------
#include <GUIConstants.au3>
GUICreate("AutoAmp Player", 300, 100)
$Play = GUICtrlCreateButton("Play", 10, 10)
$Stop = GUICtrlCreateButton("Stop", 50, 10)
GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $Play
            ButtonPressed()
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $Stop
            Exit
    EndSelect
WEnd
Func ButtonPressed()
    $song = InputBox("Song", "Please insert the name of the song with .mp3")
    SoundPlay($song & ".mp3")
EndFunc  ;==>ButtonPressed


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
seandisanti

is there also a way to pause?

almost definitely. who's making this program again?

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  

×