Andrews mem.dll + winamp

sublimezg

Doc Holligay
Basic Winamp controls

Code:
* Winamp::Active() - Returns True if Winamp is running, False otherwise
    * Winamp::Command(%cmd)
      %cmd = One of (play, pause, stop, prev, next, songtitle, state)
    * Winamp::Command(songtitle) returns the title of the current song or "Stopped" if there is none, "Not Open" if Winamp isn't open.
    * Winamp::Command(state) returns Winamp's state:(Stopped, Playing, Paused, Not Open)







Here's what I have. Everything is functioning but I don't see song titles on screen, what do I need to add?

Code:
EditActionMap("playMap.sae"); 
bindCommand(keyboard0, make, "up", TO, "Winamp::Command(Play);"); 
bindCommand(keyboard0, make, "down", TO, "Winamp::Command(Pause);"); 
bindCommand(keyboard0, make, "left", TO, "Winamp::Command(Prev);"); 
bindCommand(keyboard0, make, "right", TO, "Winamp::Command(Next) Winamp::Command(songtitle);");
 
Last edited:
:shrug:

Code:
//by SuperSlug
editActionMap("playMap.sae");
bindCommand(keyboard0, make, alt, "up", TO, "Winamp::Play();");
bindCommand(keyboard0, make, alt, "down", TO, "Winamp::Pause();");
bindCommand(keyboard0, make, alt, "right", TO, "Winamp::Next();");
bindCommand(keyboard0, make, alt, "left", TO, "Winamp::Prev();");
bindCommand(keyboard0, make, alt, "delete", TO, "Winamp::Stop();");

function Winamp::Status()
{
	remoteBP(2048, "<JC><F1>Winamp is: "@ Winamp::Command(state),2);
}

function Winamp::Play()
{
	if(!$Winamp::Playing)
	{
		Winamp::Command(play);
		$Winamp::Playing = true;

		remoteBP(2048, "<JC><F1>Winamp currently playing: <F2>"@ Winamp::Command(songtitle),2);
	}
	else
		remoteBP(2048, "<JC><F1>Winamp is already playing: <F2>"@ Winamp::Command(songtitle),2);
}

function Winamp::Next()
{
	Winamp::Command(next);

	remoteBP(2048, "<JC><F1>Winamp currently playing: <F2>"@ Winamp::Command(songtitle),2);
}

function Winamp::Prev()
{
	Winamp::Command(prev);
	remoteBP(2048, "<JC><F1>Winamp Currently playing: <F2>"@ Winamp::Command(songtitle),2);
}

function Winamp::Pause()
{
	Winamp::Command(pause);
	$Winamp::Playing = false;
	Winamp::Status();
}

function Winamp::Stop()
{
	Winamp::Command(stop);
	$Winamp::Playing = false;
	Winamp::Status();	
}

Greyhound's:http://www.bindig.net/tribes/stuff/hosted/Scripts/WinAmp.cs
 
Code:
* Winamp::Command(songtitle) returns the title of the current song or "Stopped" if there is none, "Not Open" if Winamp isn't open.

The keyword is returns. You need to echo(), say(), or otherwise output the value returned. Can't just execute it. Besides, you're missing a ; in your bindCommand.

[edit] I need to not be so tired and see the replies. Ugh. Either way, maybe you learned something.
 
Last edited:
Back
Top