Jump to content

Recommended Posts

Posted (edited)

hello all,

i want autoit to play mp3 when a use clicks a button. i dont want the file opening in windows maedia player or any thing like that i want it to play though autoit.

the reson i want to do this is for uni i got to build a program for disabled people to help user's to them speek throw my program.

here my idear.

#include <GUIConstantsEx.au3>


    GUICreate("") ; will create a dialog box that when displayed is centered

    $button = GUICtrlCreateButton("Hello", 10, 10, 120, 20)
    $button2 = GUICtrlCreateButton("BYE", 10, 40, 120, 20)
    GUICtrlSetState($button, $GUI_CHECKED)

    GUISetState()

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $button
                ;play MP3 file Hello.

            Case $msg = $button2
                ;play MP3 file Bye.
        EndSelect
    WEnd

hop you guy can help

thanks

Edited by madmorgan

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
×
×
  • Create New...