Jump to content

Media player


Recommended Posts

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 ?

;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
Link to comment
Share on other sites

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 :D ) 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.

Link to comment
Share on other sites

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 :D ) 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

Link to comment
Share on other sites

That works well if you don't have 2 GB of ogg music :D

[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.

Link to comment
Share on other sites

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) :D

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...