View Full Version : Launching windows CD Player?
bmopro
09-02-2003, 05:16 PM
I've searched the forum, and can't find any answers. Curious if anyone can help...
How do I (or can I) Launch windows cd player and have it start playing the audio tracks on my cd?
Thanks for the help.
brian
RobertB
09-02-2003, 08:25 PM
I am hardly the code guy around here...but, my experience is that you have to include a specific player if you want a specific player to play your sound files. Most computer assign a 'program' to open certain types of files. I.e. Music Match opens my audio files...
Corey
09-02-2003, 08:29 PM
Using the FILE > OPEN action will cause a file to get opened in it's default viewer, just point it to the file, i.e. MP3 or M3U or any other type...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
element78
09-02-2003, 09:38 PM
If you want a less bulky version of Media Player to open, you can instead launch:
c:\program files\windows media player\mplayer2.exe /play %SrcDrv%
that will play CD music (not mp3's), starting from track 1 on the drive that the CD with your AMS app is currently in.
Corey
09-02-2003, 10:42 PM
Cool tip Adam...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
element78
09-03-2003, 08:55 AM
/ubbthreads/images/icons/smile.gif
bmopro
09-03-2003, 08:10 PM
So would you use the file/execute action? and type in c:\program files\windows media player\mplayer2.exe /play %SrcDrv% under the "File to execute" Parameter.
And do you type anything in the "Command Line Argument"
and "Working directory" parameters?
Thanks,
brian
Corey
09-03-2003, 08:15 PM
Neither of those apply in this case.
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
bmopro
09-03-2003, 08:21 PM
Corey,
The project that I'm working on has audio tracks(cd), and multimedia content. When the initial menu pops up, the first choice the user has is a button that says, "Listen to cd". What do I do in this buttons actions to have it start playing the audio portion of the cd in the default media player?
thanks for your much needed help! :-)
brian
bmopro
09-03-2003, 11:44 PM
I tried figuring out a way of maybe just lauching the systems cd player,(assuming most everyone has it installed in windows)
here's what I thought of...
Have the button opening the file...
%SystemRoot%\System32\cdplayer.exe
But when I try and work it, I get the error message "File not Found". Am I on the right track...
brian
Corey
09-03-2003, 11:46 PM
Not sure, I always integrat emy audio right into my projects, usually as MP3. I wouldn't use CD Audio nor .wav to distribute personally but that's just my tastes... I'm an MP3 fan, here's an example of using a web object to create an MP3 jukebox for examplehttp://www.indigorose.com/ubbthreads/showflat.php?Cat=&Board=UBB2&Number=24335&page=0&v iew=collapsed&sb=5&o=0&fpart=&vc=
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
bmopro
09-04-2003, 03:42 AM
Finally figured it out!
Most windows cdplayer.exe file are stored in the sytem32 folder in the windows directory. A simple action of...
%WinDir%\System32\cdplayer.exe
launches the windows cd player letting the user start the audio portion of the cd.
Seems to work fine!
brian
Corey
09-04-2003, 03:48 AM
Cool... /ubbthreads/images/icons/smile.gif
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
Brett
09-04-2003, 07:35 AM
Better yet, use "%SysDir%\cdplayer.exe". This will ensure that the path to the system folder is correct on all Windows versions.
A little ditty, 'bout controlling the cd-rom
a DLL I made to help you along.
Download Sample and DLL (http://www.warmuskerken.com/ams/cdplayer.zip)
BTW, be careful trying to use cdplayer.exe. There is no such file on my system (XP Pro).
I should have posted the available functions:
CDPLAY
CDSTOP
CDPAUSE
CDPREVIUOSTRACK
CDNEXTTRACK
CDEJECT
CDINSERT
CDINIT - Restarts at the begininning
bmopro
09-04-2003, 07:10 PM
You guys rock!
Thanks for all your help! I figure that if it does'nt find the cdplayer.exe, I'll just have a pop up window that tells them to launch their own player.
Thanks again
brian
Your call. If you use the DLL, you won't have to rely on any other app except your own.
bmopro
09-05-2003, 03:00 PM
Worm,
A question kinda along the same line...
If you use a flash file, does the user have to have a flash player installed on their computer? or does ams play it on it's own? I like using swf files, but i thought people might not like the idea of having to istall a program on thier computers just to have to watch my cd presentation. so ive been using avi files instead.
thanks for your input!
btw that cd player (dll) you posted, exactly what i needed! Thanks again!
brian
John-oh
09-05-2003, 03:15 PM
bmopro
Yes, the user will need flash player installed.
You can check in Projects > requirements.
Or you can set alternatives in the flash object ( not to show at all or show a staic object).
You could also include a page / object to install flash and have it on the CD.
I agree most people don't like installing additional software.
Cheers
John-Oh is right, the user would need the FLASH player to see the swf files. However, somewhere I read that Flash is installed on +90% of all machines.
bmopro
09-05-2003, 06:19 PM
Worm,
With the cd-rom dll you posted, is this possible...
You hit play, a text object comes up with the song title.
You let the cd play(without hitting next or Prev) when track 2 starts, is there a way ams can see this and change the text object so the song title for that track is showing?
Thanks
brian
Sorry, not as it is now. Somehow from AMS you'd have to be able to Poll the DLL for the changes. This could be done with Corey's flash timer. The thing is, I'm not sure how to get the title from the CD itself. If someone can point me in the direction, I'd probably be able to figure it out.
bmopro
09-09-2003, 04:01 PM
If you make any headway let me know.
Thanks
brain
gnetcanada
09-13-2003, 12:14 PM
brad (worm) you are the man, i have used both your dll's the volume control one, and now checking out this cd-rom one, simply amazing! keep up the good work.
Thanks.
But to be fair, they are really only wrappers for other Windows System DLLs that AMS can't call correctly because of how the values are passed or returned. All I do is get the information and pass it back to AMS in a way it can handle.
Its nice to hear someone has a use for them /ubbthreads/images/icons/smile.gif
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.