Jump to content
Sign in to follow this  
Jupelius

Winamp current song information

Recommended Posts

Jupelius

Hi everyone, just registered here and this is my first post :shocked:

I have done few searchs but have found nothing so I made own thread about this.

How to see current song playing in winamp with AutoIt? Do I need any .dlls to do it?

I need only artist and song :(

Thanks!

Share this post


Link to post
Share on other sites
BrettF

Hi everyone, just registered here and this is my first post :shocked:

I have done few searchs but have found nothing so I made own thread about this.

How to see current song playing in winamp with AutoIt? Do I need any .dlls to do it?

I need only artist and song :(

Thanks!

Try doing a google search on winamp + object. You should get something that can help you :P....

Share this post


Link to post
Share on other sites
Jupelius

I havent found anything about it.

Someone knows how to do this?

Share this post


Link to post
Share on other sites
big_daddy

It's still pretty basic, but you should be able to get the information you need with this.

Winamp Automation Library

Share this post


Link to post
Share on other sites
jvanegmond

Uhmm... The easy way:

#include <ARray.au3>

$a = WinampGet()
If @error Then
    MsgBox(0, "", "no songs are played")
Else
    MsgBox(0, "", $a)
EndIf

Func WinampGet()
    Opt("WinTitleMatchMode",2 )
    $sTitle = WinGetTitle(" - Winamp")
    If $sTitle = 0 Then
        SetError(1)
        Return 0 ;no songs are being played.
    Else
        $sTitle = StringReplace($sTitle, " - Winamp", "")
        While 1
            If StringLeft($sTitle,1) <> "." Then
                $sTitle = StringTrimLeft($sTitle,1)
            Else
                $sTitle = StringTrimLeft($sTitle,1)
                ExitLoop
            EndIf
        WEnd
        
        $string = StringSplit($sTitle, " - ", 1)
        
        If StringRight($string[2], 8) = "[Paused]" Then
            $string[2] = StringTrimRight($string[2], 9)
        ElseIf StringRight($string[2], 9) = "[Stopped]" Then
            $string[2] = StringTrimRight($string[2], 10)
        EndIf
        $string[1] = StringStripWS($string[1],7) ;artist
        $string[2] = StringStripWS($string[2],7) ;song
        
        Return $string[2]
    EndIf
EndFunc

This is some of my ancient stuff.. :shocked:

Edited by Manadar

Share this post


Link to post
Share on other sites
Jupelius

I got it. Thanks all :shocked:

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  

×