Jump to content
Sign in to follow this  

Get Track Name Fro Windows Media Player

Recommended Posts


First time using the ObjCreate function, and don`t even know if I`m using it correctly...

Trying to get the current track playing from windows media player.

#include <GUIConstants.au3>

; == GUI generated with Koda ==);

$TrackName = GUICreate("Track Name", 425, 54, 193, 161)

$Currtrack = GUICtrlCreateLabel("Current Track", 8, 16, 290, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")

$GetTr = GUICtrlCreateButton("GetTrackName", 320, 8, 97, 33, 0)

Run ("C:\Program Files\Windows Media Player\wmplayer.exe" )

$WMP = ObjCreate("wmplayer.ocx")


While 1
    $msg = GuiGetMsg()
    Case $msg = $GetTr
    $TrackName = $WMP.GetMediaInfoString()
    GUICtrlSetData ($Currtrack,$TrackName)

    Case $msg = $GUI_EVENT_CLOSE
    Case Else

Thanks for all your Help! :)

2015 - Still no flying cars, instead blankets with sleeves.

Share this post

Link to post
Share on other sites

Any more information available about OCX in WMP? Is this work? Can I also get the current play time?

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.