Harusal Posted December 26, 2008 Posted December 26, 2008 I am trying to make so when the user clicks a button a .mp3 is played? how would i play a .mp3? any help is greatly appreciated
Jono Posted December 26, 2008 Posted December 26, 2008 (edited) I think this is the Script you want Its the best I could find on AutoIt help. SoundPlay(@WindowsDir & "\media\tada.wav",1) Edited December 26, 2008 by Jono
Xav Posted December 26, 2008 Posted December 26, 2008 this is when your files is in the same folder of the script. "the mp3 playing is «Tada.wav» i guess with u jono . $SoundFile = @SCRIPTDIR & '\tada.wav' SoundPlay ( $SoundFile )
BrettF Posted December 26, 2008 Posted December 26, 2008 Check out Bass.dll in my signature. Example 1 from memory... Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
LeHuynhNam Posted December 26, 2008 Posted December 26, 2008 i think it's useful for u! #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Sound_clk = @TempDir & "\Sound_clk.wav" FileInstall("C:\Sound_clk.wav", $Sound_clk) $Form1 = GUICreate("Form1", 267, 165, 324, 300) $Button1 = GUICtrlCreateButton("Button1", 96, 64, 65, 33, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 SoundPlay($Sound_clk) MsgBox(64,"Test","Test text") EndSwitch WEnd
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now