Go Back   Winamp Forums > Skinning and Design > Modern Skins

Reply
Thread Tools Search this Thread Display Modes
Old 30th November 2001, 14:59   #1
drwho9437
Senior Member
 
drwho9437's Avatar
 
Join Date: Oct 2001
Location: UMCP
Posts: 395
player status button script request

does anybody want to write a script for the player status button so the it causes the following actions:

State, Mouseaction, Winamp Action
stop, single click, play
stop, double click, eject
play, single click, pause
play, double click, stop
pause, single click, play (unpause)
pause, double click, stop

I would write it myself but I don't know the scripting language at the moment. I will probably try to learn it over break but I just had this idea so I though I'd ask if anyone wants to take a stab at it. The layout it is written for doesn't matter to me I can change that .
drwho9437 is offline   Reply With Quote
Old 30th November 2001, 15:22   #2
Naamloos
Forum King
 
Naamloos's Avatar
 
Join Date: Mar 2001
Location: irc.tehflap.org/*******
Posts: 3,085
Make 3 buttons and give them a name I'm using myplaybutton as example

MyStop.onLeftClick()
Play();
MyStop.doubleClick()
Eject();

and so on...
check Rhinotrips site for the real names of the functions, I can't remember them so clear, but I know they are there...
Naamloos is offline   Reply With Quote
Old 30th November 2001, 17:36   #3
drwho9437
Senior Member
 
drwho9437's Avatar
 
Join Date: Oct 2001
Location: UMCP
Posts: 395
I would like all the funtions on the play status button (the one that shows if winamp is playing paused or stoped) depending on it's state so I think it is much or complicated.
drwho9437 is offline   Reply With Quote
Old 10th December 2001, 23:39   #4
drwho9437
Senior Member
 
drwho9437's Avatar
 
Join Date: Oct 2001
Location: UMCP
Posts: 395
anyone want to help me with this one
drwho9437 is offline   Reply With Quote
Old 11th December 2001, 01:40   #5
sirchess
Senior Member
 
sirchess's Avatar
 
Join Date: Dec 2000
Location: Cyberspace
Posts: 132
This is a rather tricky one. The problem is that WinAmp won't recognize a click on the status area. The script listed below will work, but only on a LAYER or BUTTON labelled "statusarea".

Also the script is FAR from perfect. The single-click actions will work, and the double-click for the play and pause states works, but the double-click for the stop state won't work. I'll look more into this later...

code:

#include "../../../lib/std.mi"

Global GuiObject statusarea;
Global Slider SongPos;
Global Boolean DblClickDone;

Function Boolean checkStatus(int x, int y);

System.onScriptLoaded()
{
statusarea = getContainer("main").getLayout("normal").getObject("statusarea");
SongPos = getContainer("main").getLayout("normal").getObject("SeekerGhost");

DblClickDone = 0;
}


mainlayout.onLeftButtonUp(int x, int y)
{
if (DblClickDone == 0)
{
int IsPlayingInt;
IsPlayingInt = System.getLeftVuMeter();

if (IsPlayingInt != NULL)
{
System.Pause();
}
else
{
System.Play();
}
}
else DblClickDone = 0;
}

mainlayout.onLeftButtonDblClk(int x, int y)
{
if (SongPos.getPosition() != NULL)
{
System.Stop();
}
else
{
System.Eject();
}

DblClickDone = 1;
}

sirchess is offline   Reply With Quote
Old 11th December 2001, 02:52   #6
drwho9437
Senior Member
 
drwho9437's Avatar
 
Join Date: Oct 2001
Location: UMCP
Posts: 395
thanks... After the 20th I think I will have a chance to get my hands dirty with scripting. The idea of the script is to make an extreemly small winshade mode with the status being the only real button.
drwho9437 is offline   Reply With Quote
Old 11th December 2001, 20:32   #7
sirchess
Senior Member
 
sirchess's Avatar
 
Join Date: Dec 2000
Location: Cyberspace
Posts: 132
Well like I said above, the status region itself won't register a click for some reason...but you could probably easily copy the status button images to layers and just have the script change layers when it changed modes.
sirchess is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump