Jump to content

Music Tooltip


TECH
 Share

Recommended Posts

I need some help.

Im trying to create a tooltip that will show what music I am listening to. I.e. if Im listening to Boom Boom Pow by B.E.P. I want the music to show in a tootip in the left corner. I already got the top corner part but I need to create a ??variable?? to show what song Im listening to.

Any help will be greatly appreciated.

Thnx

Link to comment
Share on other sites

Dim $objWMP = ObjCreate("WMPlayer.OCX")
If @error Then
    MsgBox(0, @ScriptName, "Erm... Problem!")
EndIf

Dim $last, $new

$last = _WMP_GetSongName()

While 1
    If $last <> $new Then
        $new = _WMP_GetSongName()
        $last = $new

        TrayTip(@ScriptName, $new & " - " & _WMP_GetSongArtist(), 10)
    EndIf
WEnd

Func _WMP_GetSongName()
    Local $firstMedia = $objWMP.mediaCollection.getAll().item(0)
    $objWMP.currentMedia = $firstMedia
    
    Return $objWMP.CurrentMedia.Name
EndFunc   ;==>_WMP_GetSongName

Func _WMP_GetSongArtist()
    Local $firstMedia = $objWMP.mediaCollection.getAll().item(0)
    $objWMP.currentMedia = $firstMedia
    
    Return $objWMP.CurrentMedia.getItemInfo("artist")
EndFunc

That's a start...

Edited by JamesBrooks
Link to comment
Share on other sites

Dim $objWMP = ObjCreate("WMPlayer.OCX")
If @error Then
    MsgBox(0, @ScriptName, "Erm... Problem!")
EndIf

Dim $last, $new

$last = _WMP_GetSongName()

While 1
    If $last <> $new Then
        $new = _WMP_GetSongName()
        $last = $new

        TrayTip(@ScriptName, $new & " - " & _WMP_GetSongArtist(), 10)
    EndIf
WEnd

Func _WMP_GetSongName()
    Local $firstMedia = $objWMP.mediaCollection.getAll().item(0)
    $objWMP.currentMedia = $firstMedia
    
    Return $objWMP.CurrentMedia.Name
EndFunc   ;==>_WMP_GetSongName

Func _WMP_GetSongArtist()
    Local $firstMedia = $objWMP.mediaCollection.getAll().item(0)
    $objWMP.currentMedia = $firstMedia
    
    Return $objWMP.CurrentMedia.getItemInfo("artist")
EndFunc

That's a start...

haha thnx...

now just to figure out how to change the song or get what song from a playlist hmmm....

are their any really good tuts that you know of or have done??

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