Sign in to follow this  
Followers 0
GrungeRocker

Winamp Status

8 posts in this topic

Here is an example how to get the played title in winamp:

If ProcessExists("winamp.exe") Then
    $var = WinList()

    For $i = 1 to $var[0][0]
        If $var[$i][0] <> "" AND StringRight($var[$i][0], 6) = "WinAmp" Then
            $song = StringReplace($var[$i][0], " - WinAmp", "")
            $letters = Stringsplit($song, "")
            $count = getsong($letters)
            $letters = StringLeft($song, $count)
            $song = StringReplace($song, $letters, "")
            msgbox(0, "Playing:", $song)
        EndIf
    Next
Else
    MsgBox(0, "WinAmp", "WinAmp is not running!")
EndIf

Func getsong($letters)
    For $x = 0 To $letters[0]
        If $letters[$x] = "." Then
            Return $x
        EndIf
    Next
EndFunc

its only a short example.... you can make it better with giving credits :)


[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Share this post


Link to post
Share on other sites



Thnx :think: now i can make an nice remote fore my winamp :( ( i hate it to click on it just to get to the next song :-) )

Share this post


Link to post
Share on other sites

well no problem :think:


[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

hmm there is one litle error in your function :think:

it shows first an msgbox without anything in it :S and after that it shows the correct info :( hmm so if you can fix that maybe ?:$ that would be great

hmm maybe its my streamripper that is fucking things up :) i going to get some beta testers :-)

Edited by {NL}--Xantios---

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Now I know where his code came from...

I fixed it up some in this thread: http://www.autoitscript.com/forum/index.php?showtopic=24674

EDIT:

ok well im pleased, that you are using my code but could you please give credits ?.?

and well i made another lil spammer of it:

$g_szVersion = "asdjkjkasdfjkasdjfjasdjkjfajdfsdjkfjkasdjfjkasdjfasdjkfjkjkasdfjk"
If WinExists($g_szVersion) Then Exit; It's already running
AutoItWinSetTitle($g_szVersion)


#Include <Misc.au3>
#include <GUIConstants.au3>

Opt("SendKeyDelay", 0)        
Opt("SendKeyDownDelay", 0)
Opt("TrayIconHide", 1) 

$Form1 = GUICreate("WinAmp Spammer 4 everywhere", 298, 140, 228, 133, -1, $WS_EX_TOOLWINDOW)
GUICtrlCreateLabel("WinAmpstatus:", 0, 8, 75, 17)
$status = GUICtrlCreateLabel("OFF", 80, 0, 27, 22, $SS_SUNKEN)
GUICtrlSetFont(-1, 10, 400, 0, "Morpheus")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlCreateLabel("Spamstyle (use %s for currently played song!", 0, 32, 212, 17)
$Input1 = GUICtrlCreateInput(".:%s:.", 0, 56, 297, 31, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1, 14, 400, 0, "Lucida Sans Unicode")
GUICtrlSetColor(-1, 0xFF0000)
$start = GUICtrlCreateButton("Start", 0, 112, 89, 25)
GUICtrlSetState(-1, $GUI_DISABLE)
$About = GUICtrlCreateButton("About", 104, 112, 89, 25)
$Exit = GUICtrlCreateButton("Exit", 208, 112, 89, 25)
GUISetState(@SW_SHOW)
While 1
;~  msgbox(0, "", GUICtrlGetState($start))
    if ProcessExists("winamp.exe") And GUICtrlGetState($start) = 144 Then
        GUICtrlSetState($start, $GUI_ENABLE)
        GUICtrlSetData($status, "ON")
        GUICtrlSetColor($status, 0x00FFFF)
    EndIf
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE or $msg = $exit
        ExitLoop
    Case $msg = $start
        GUISetState(@sw_hide)
        loop(guictrlread($input1))
    EndSelect
WEnd
Exit


func loop($style)
While 1
    If _IsPressed("21") Then
        ExitLoop
    ElseIf _IsPressed("11") AND _IsPressed("4D") Then
        ShowMessage($style)
    EndIf
    sleep(20)
WEnd
Exit
EndFunc

Func ShowMessage($style)
;~  If getsong() = 0 then msgbox(0, "", "0")
    $text = StringReplace($style, "%s", getsong())
    Send($text, 1)
EndFunc



Func getsong()
    If ProcessExists("winamp.exe") Then
    $var = WinList()

    For $i = 1 to $var[0][0]
        If $var[$i][0] <> "" AND StringRight($var[$i][0], 6) = "WinAmp" Then
            $song = StringReplace($var[$i][0], " - WinAmp", "")
            $letters = Stringsplit($song, "")
            For $x = 0 To $letters[0]
                If $letters[$x] = "." Then
                    $count = $x
                    $x = $letters[0]
                EndIf
            Next
            $letters = StringLeft($song, $count + 1)
            $song = StringReplace($song, $letters, "")
            Return $song
        EndIf
    Next
    Else
        $song = "not playing a song"
        Return $song
    EndIf
EndFunc
Edited by GrungeRocker

[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Share this post


Link to post
Share on other sites

"EDIT:

ok well im pleased, that you are using my code but could you please give credits ?.?"

I had no idea it was your code when he posted his support question. I just edited what he posted, and when I saw he posted in this thread (which contained your code), I commented.

Share this post


Link to post
Share on other sites

"EDIT:

ok well im pleased, that you are using my code but could you please give credits ?.?"

I had no idea it was your code when he posted his support question. I just edited what he posted, and when I saw he posted in this thread (which contained your code), I commented.

yes i didnt mean you, i meaned him with this....

it's clear, that you didn't know this....

:think:

well guy im trusting you so far :(


[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

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  
Followers 0