Jump to content

Having A Problem..


Recommended Posts

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
Link to comment
Share on other sites

  • Developers

;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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...