Sign in to follow this  
Followers 0
Xtremee

How to play .mp3 file

13 posts in this topic

Hi all,

This is my first topic in this forum and i don't have much experience with Auto It.

i wanna to play .mp3 file with Auto It like playing .wav file with Auto It

I try the code

SoundPlay("D:\MP3's\Shakira_Bamboo.mp3")
but this not work !

i also googled till i reach to this forum and i read some topics about MP3 player and i try it. It is good but this not wat i wanna ( i do not wanna GUI ) i wanna just hidden play

Any idea will be excellent

BTW i use Auto It v3

Regards,

Xtremee

Share this post


Link to post
Share on other sites



Convert the mp3 to a wav :D

Share this post


Link to post
Share on other sites

This is not a general support forum!

SoundSetVolume or how it is called....

Use that function


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

If this is a 1 line script, then set the 2nd optional parameter to 1 so it will wait.

SoundPlay("D:\MP3's\Shakira_Bamboo.mp3", 1)

Without the wait parameter, you would need to keep your script alive with Sleep() or something similar to keep the script running while the song is playing.

MP3 should be fine so long as a compliant MP3 codec registered for use.

Edited by MHz

Share this post


Link to post
Share on other sites

@gamepin126,

1st thanx for ur help

Convert the mp3 to a wav

:D

I don't it's a solution. also i wanna to use .mp3 file due to its small size and .wav is tooooooo large.

---------------------------------------------------------------------------------------------------------------------------

@Daniel W.,

1st thnax for ur reply

This is not a general support forum!

yes, i know that. I'm looking for help! :D

SoundSetVolume or how it is called....

Use that function

SoundSetVolume -------> U know that it use for adjusting the sound level.

Wat is the specific Function that u mean ...

---------------------------------------------------------------------------------------------------------------------------

@MHz,

1st thnax for ur reply

Without the wait parameter, you would need to keep your script alive with Sleep() or something similar to keep the script running while the song is playing.

i try ur code but it alos don't work for me

MP3 should be fine so long as a compliant MP3 codec registered for use.

What r u mean by that !! :wacko:

---------------------------------------------------------------------------------------------------------------------------

Regards,

Xtremee

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

What r u mean by that !! :D

Some codecs are not correctly registered with Windows as a compliant codec. You should see the MP3 codec listed in the Audio Codecs window. The Fraunhofer MP3 codec if installed and registered should do the task if is seen in the properties window.

A MP3 file plays fine on my PC with using SoundPlay.

SoundPlay('D:\My Downloads\Music\Khia - Lick My Neck (Clean).mp3', 1)

Edit:

Ensure you turn up the volume knob...

Edited by MHz

Share this post


Link to post
Share on other sites

there are some media players here, they have the best code for this, look for um


*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

Share this post


Link to post
Share on other sites

Codes aren't tested.

Solution 1\3:

SoundPlay("D:\MP3's\Shakira_Bamboo.mp3")
MsgBox(0,"Click me","Click OK when sound finish")
oÝ÷ Ù*%ºØ¨m=Ûv®¶­s`¤÷BgV÷CµG&ÖVçTÖöFRgV÷C²Ã¢b33c¶WCÕG&7&VFTFVÒgV÷C´WBgV÷C²¥6÷VæEÆgV÷C´C¢b3#´Õ2b33·2b3#µ6&ô&Ö&öòæ×2gV÷C²¥vÆR¢b33c¶×6rÒG&vWD×6r¤bb33c¶×6rÒb33c¶WBFVâW@¥vVæ

When music finish click on AutoIt tray icon and then click Exit.

Solution 3\3:

MP3\WAV player (see signature)

If that solutions aren't good, I don't know what you want.

i542


I can do signature me.

Share this post


Link to post
Share on other sites

Some codecs are not correctly registered with Windows as a compliant codec. You should see the MP3 codec listed in the Audio Codecs window. The Fraunhofer MP3 codec if installed and registered should do the task if is seen in the properties window.

Good Morning! I hope it's okay to resurrect this old thread; original poster never posted back re MP3 codec issue so don't know how/if this resolved the issue. I, too, can't play MP3s directly like before and haven't figured out what changed. (p.s., I can't switch over to having my MP3 player take over the playing job here as it's needed elsewhere at the time this script is invoked. Don't want to convert it to WAV either as it's too large and would make for a huge and redundant WAV.)

How does one go about registering an MP3 codec so that AutoIt will work? I'm not sure about the mentioned "Audio Codec window" ... (?) Are we talking about the properties box of the "mpegin.dll" perhaps? (mpegin.dll comes up in error box when AI told to SoundPlay MP3s.) MP3s play just fine on my computer with my MP3 player and various converters have lame.dll's so don't know which MP3-related DLL needs registering. I don't think I have the Fraunhofer one but I may have it in a codec pack I have.

Pls advise and thanks once again for group's indulgence re old post. Anyone having AutoIt/MP3 issues may also find this post in a search and may also not necessarily know how to fix this.

Cheers. :)

Share this post


Link to post
Share on other sites

Diana (Cda),

You need to sharpen up those searching skills! There are many more recent threads dealing with this problem - such as this one or this one, which both contain some advice on how you might solve the problem. ;)

What is the file that is giving you problems and have you updated to the latest release v3.3.8.0? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

I guess the search within the still-new forum interface is still eluding me. I never had problems all these years with all the other interface changes, but this one just doesn't bring up the same number of results for me and I don't know why.

At any rate, thanks for the links. :) I'll look into this.

Share this post


Link to post
Share on other sites

Nope, no joy there, whatsoever.

I'm attaching a screenshot of the error box that comes up. Hopefully that helps.

post-2289-0-24340600-1326074829_thumb.pn

I'm on WinXP and I use AutoIt v3.2.13.13***

Thanks.

Di. :)

*** I know, I know, probably very old now. I slowed down leaping to upgrade all the time since every time there's a new AI it breaks a whole host of my very large collection of active scripts, never mind the ones I also use less frequently. They just stop working. Sometimes I'm able to make the adjustments to the scripts but not always. Some of my older ones just don't work anymore and I can't afford that. So I upgrade only _very_ rarely. Perhaps that's another reason why this doesn't work. I also might have changed versions and the SoundPlay broke at that point. Hmmm, just don't know.

Share this post


Link to post
Share on other sites

Diana (Cda),

Sorry to be blunt, but are you seriously expecting help and support for a Beta release from more than 3 years ago? :)

I understand the problem you face, but why not compile the scripts you have with your outdated version so that you have functioning exes? Then you could update to v3.3.8.0 and all your new scripts would benefit from the multiple advances that have been made since Dec 2008 - and you could slowly update the other scripts until you are completely up to date. :D

As to the mp3 problem, if the suggestions in the links I proposed do not work then I am out of ideas. Every now and again someone posts about this and no-one else can reproduce the problem. So it must be something in your machine rather than AutoIt per se. Sorry not to be of more help. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

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  
Followers 0