bobheart 0 Report post Posted June 15, 2004 I have this and trying to get it to play a cd but no go ? What do I have wrong or can this play cd's ? expandcollapse popup;Generated with AutoBuilder 0.3 Opt("GUICoordMode", 1) Opt("GUINotifyMode", 1) GuiCreate("MyGUI", 392,226,10,10,0x04CF0000) $button_1 = GUISetControl("button", "play/pause", 30,30, 80,20) $button_2 = GUISetControl("button", "stop", 30,70, 80,20) $button_3 = GUISetControl("button", "last track", 30,100, 80,20) $button_4 = GUISetControl("button", "next track", 30,130, 80,20) $button_5 = GUISetControl("button", "volume up", 150,30, 70,20) $button_6 = GUISetControl("button", "volume down", 150,80, 70,20) $button_7 = GUISetControl("button", "mute", 150,110, 70,20) $button_8 = GUISetControl("button", "search", 250,60, 80,30) GuiShow() While 1 sleep(100) $msg = GuiMsg(0) Select Case $msg = -3 Exit Case $msg = $button_1 Send("{MEDIA_PLAY_PAUSE}") ;;; Case $msg = $button_2 ;;; Case $msg = $button_3 ;;; Case $msg = $button_4 ;;; Case $msg = $button_5 ;;; Case $msg = $button_6 ;;; Case $msg = $button_7 ;;; Case $msg = $button_8 ;;; EndSelect WEnd Exit Share this post Link to post Share on other sites
pekster 0 Report post Posted June 15, 2004 Just sending the media keys won't play a CD by itself. These keys were originally designed to be used by keyboard that have special "media" or "internet" buttons on the top (like mine ) but will not play a CD so to speak. This will only send the play, next track, etc commands to your default player, if it's active. If you want to play files, how about queueing them up in winamp (or whatever player you use) with command line switches? If you use winamp, check my Misc folder on my Projects FTP link (see my signature) for a program called CLEveR.exe, which can let you control winamp 2.x and 5.x from the command line (or through AutoIt since you can use the command interperter.) [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Share this post Link to post Share on other sites
tutor2000 0 Report post Posted June 15, 2004 Just sending the media keys won't play a CD by itself. These keys were originally designed to be used by keyboard that have special "media" or "internet" buttons on the top (like mine ) but will not play a CD so to speak. This will only send the play, next track, etc commands to your default player, if it's active. If you want to play files, how about queueing them up in winamp (or whatever player you use) with command line switches? If you use winamp, check my Misc folder on my Projects FTP link (see my signature) for a program called CLEveR.exe, which can let you control winamp 2.x and 5.x from the command line (or through AutoIt since you can use the command interperter.)SoundPlay ( "filename" [, wait] ) Parameters filename Name of the file to be played (typically a WAV or MP3) wait (optional) This flag determines if the script should wait for the sound to finish before continuing: 1 = wait until sound has finished 0 = continue script while sound is playing (default) Return Value None. (Always returns 1 regardless of success.) Remarks Terminating the script will stop the sound (if it is still playing). Related SoundSetWaveVolume Example SoundPlay("C:\Windows\media\tada.wav") Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm Share this post Link to post Share on other sites
pekster 0 Report post Posted June 15, 2004 That works well if you don't have 2 GB of ogg music [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Share this post Link to post Share on other sites
SlimShady 0 Report post Posted June 15, 2004 I have a question regarding the SoundPlay function... Which audio formats can it play? Share this post Link to post Share on other sites
bobheart 0 Report post Posted June 15, 2004 That works well if you don't have 2 GB of ogg music Same here.. Share this post Link to post Share on other sites
bobheart 0 Report post Posted June 16, 2004 Thanks ok if it don't work as I can make players in MMB and use the open /close with MMB .. Would be nice if we could start making stuff like that with autoit . (hint hint) Share this post Link to post Share on other sites
Josbe 1 Report post Posted June 16, 2004 Eh, I think that, you could use the "Global Hotkeys" included since Winamp 5.02, in your script. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Share this post Link to post Share on other sites
bobheart 0 Report post Posted June 16, 2004 Would that be winamp playing then ? or autoit . I don't want to make a short cut to winamp just a new player .. Share this post Link to post Share on other sites