Jump to content

Recommended Posts

Posted

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

Posted (edited)

Wow, you narrowed that down well....

What music player do you use?

James

wow sarcasm nice

i use WMP V 11

Edited by TECH
Posted (edited)

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
Posted

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

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
  • Recently Browsing   0 members

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