home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 November
/
CDVD1105.ISO
/
Util
/
Winamp
/
Skins
/
Anime_Shogo.wal
/
scripts
/
notifier.maki
(
.txt
)
< prev
next >
Wrap
Winamp Compiled Maki Script
|
2004-09-05
|
11KB
|
399 lines
/* Note: a decompiler is no invitation to steal code.
Please respect the the copyright */
#include "std.mi"
Global Container Container11;
Global Container Container12;
Global Layout Layout13;
Global Layout Layout14;
Global Group Group15;
Global Text Text16;
Global Text Text17;
Global Text Text18;
Global Text Text19;
Global Text Text20;
Global Text Text21;
Global Text Text22;
Global Text Text23;
Global Slider Slider24;
Global Slider Slider25;
Global Slider Slider26;
Global CheckBox CheckBox27;
Global CheckBox CheckBox28;
Global CheckBox CheckBox29;
Global Timer Timer31;
Global Timer Timer32;
Global Int Int33;
Global Int Int35;
Global Float Float36;
Global Float Float37;
Global Float Float38;
Global String String39;
Global String String40;
Function func2264();
Function func2482();
Function func3595();
Function func4519(Float 5.87747175411144e-39, Float 5.87747175411144e-39);
System.onScriptLoaded()
{
Layout Layout50;
Container11 = System.getContainer(( "opensource_notifier"));
Container12 = System.getContainer(( "config"));
Layout13 = Container11.getLayout(( "normal"));
Layout14 = Container11.getLayout(( "normal"));
Group15 = Layout13.findObject(( "notifier\.text"));
Text16 = Layout13.findObject(( "artist"));
Text17 = Layout13.findObject(( "title"));
Text18 = Layout13.findObject(( "album"));
Text19 = Layout13.findObject(( "plentry"));
Text20 = Layout13.findObject(( "nexttrack"));
Layout50 = Container12.getLayout(( "normal"));
Text21 = Layout50.findObject(( "fadein\.text"));
Text22 = Layout50.findObject(( "stay\.text"));
Text23 = Layout50.findObject(( "fadeout\.text"));
Slider24 = Layout50.findObject(( "fadein\.slider"));
Slider25 = Layout50.findObject(( "stay\.slider"));
Slider26 = Layout50.findObject(( "fadeout\.slider"));
CheckBox29 = Layout50.findObject(( "fullscreen"));
CheckBox27 = Layout50.findObject(( "radio\.fade"));
CheckBox28 = Layout50.findObject(( "radio\.slide"));
Float36 = System.getPrivateInt(( "OpenNote"), ( "FadeIn"), 6);
Float37 = System.getPrivateInt(( "OpenNote"), ( "FadeOut"), 2);
Float38 = System.getPrivateInt(( "OpenNote"), ( "Stay"), 16);
String39 = System.getPrivateString(( "OpenNote"), ( "Effect"), ( "Fade"));
if(( String39 == ( "Fade"))) {
CheckBox27.setChecked(1);
} else {
CheckBox28.setChecked(1);
}
Timer31 = ( new Timer);
Timer32 = ( new Timer);
Timer32.setDelay(100);
Slider24.setPosition(Float36);
Slider26.setPosition(Float37);
Slider25.setPosition(Float38);
CheckBox29.setChecked(System.getPrivateInt(( "OpenNote"), ( "fullscreen"), 0));
Layout13.hide();
func3595();
func2264();
return Null;
}
System.onScriptUnloading()
{
System.setPrivateInt(( "OpenNote"), ( "FadeIn"), ( Float36 * 4));
System.setPrivateInt(( "OpenNote"), ( "FadeOut"), ( Float37 * 4));
System.setPrivateInt(( "OpenNote"), ( "Stay"), ( ( Float38 * 4) / 1000));
System.setPrivateString(( "OpenNote"), ( "Effect"), String39);
return Null;
}
CheckBox29.onToggle(int newstate)
{
System.setPrivateInt(( "OpenNote"), ( "fullscreen"), newstate);
return Null;
}
CheckBox27.onToggle(int newstate)
{
if(( CheckBox27.isChecked() == 1)) {
String39 = ( "Fade");
Slider24.setPosition(( Float36 * 4));
Slider26.setPosition(( Float37 * 4));
Slider25.setPosition(( ( Float38 * 4) / 1000));
}
return Null;
}
CheckBox28.onToggle(int newstate)
{
if(( CheckBox28.isChecked() == 1)) {
String39 = ( "Slide");
Slider24.setPosition(( Float36 * 4));
Slider26.setPosition(( Float37 * 4));
Slider25.setPosition(( ( Float38 * 4) / 1000));
if(( Int33 == 2)) {
Layout13.setXmlParam(( "y"), System.integerToString(( System.getViewportHeight() + 5)));
}
}
return Null;
}
Slider24.onSetPosition(int newpos)
{
Text21.setText(( ( ( String39 + ( "\-in\ Time\ \(")) + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float36 = ( newpos / 4);
return Null;
}
Slider26.onSetPosition(int newpos)
{
Text23.setText(( ( ( String39 + ( "\-out\ Time\ \(")) + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float37 = ( newpos / 4);
return Null;
}
Slider25.onSetPosition(int newpos)
{
Text22.setText(( ( ( "Hold\ Time\ \(") + System.floatToString(( newpos / 4), 1)) + ( "s\)\:")));
Float38 = ( ( newpos / 4) * 1000);
Timer31.setDelay(Float38);
return Null;
}
System.onTitleChange(String newtitle)
{
Timer32.start();
return Null;
}
System.onPlay()
{
Timer32.start();
return Null;
}
System.onResume()
{
Timer32.start();
return Null;
}
Int System.onShowNotification()
{
Timer32.start();
complete;
return 1;
}
Timer32.onTimer()
{
Timer32.stop();
func2264();
return Null;
}
Layout13.onLeftButtonDown(int x, int y)
{
Container12.show();
return Null;
}
Layout13.onRightButtonDown(int x, int y)
{
Layout13.hide();
return Null;
}
func2264()
{
String String92;
String92 = System.getPrivateString(( "OpenNote"), ( "Freq"), ( "Always\ Show\ Notifications"));
if(( ( ( CheckBox29.isChecked() == 1) && ( System.isVideoFullscreen() == 0)) || ( CheckBox29.isChecked() == 0))) {
if(( String92 == ( "Always\ Show\ Notifications"))) {
func2482();
func3595();
func4519(Float36, Float37);
}
if(( ( String92 == ( "Show\ Notifications\ When\ Minimized")) && ( System.isMinimized() == 1))) {
func2482();
func3595();
func4519(Float36, Float37);
}
}
return Null;
}
func2482()
{
String String97;
String String103;
String String106;
Int Int99;
String String98;
String String111;
Int Int102;
Int Int101;
Int Int94;
Int94 = 0;
if(( System.Strleft(System.getPlayItemString(), 7) == ( "http\:\/\/"))) {
Int94 = 1;
}
String97 = System.integerToString(System.getPlaylistLength());
String98 = System.integerToString(( System.getPlaylistIndex() + 1));
if(( ! Int94)) {
Int99 = ( System.getPlayItemLength() / 1000);
Int101 = ( Int99 / 60);
Int102 = ( Int99 - ( Int101 * 60));
if(( Int102 > 10)) {
String103 = ( ( "0") + System.integerToString(Int102));
} else {
String103 = System.integerToString(Int102);
}
if(( System.getPlayItemMetaDataString(( "title")) == ( ""))) {
String106 = ( "\?\?\?");
} else {
String106 = System.getPlayItemMetaDataString(( "title"));
}
Text17.setXmlParam(( "ticker"), ( "1"));
if(( Int99 != 0)) {
String111 = ( ( System.integerToString(Int101) + ( "\:")) + String103);
Text17.setText(( ( ( String106 + ( "\ \(")) + String111) + ( "\)")));
} else {
Text17.setText(( String106 + ( "\ \ \ \ ")));
}
if(( System.getPlayItemMetaDataString(( "artist")) == ( ""))) {
Text16.setText(( ( "by\ ") + ( "\?\?\?")));
} else {
Text16.setText(( ( "by\ ") + System.getPlayItemMetaDataString(( "artist"))));
}
if(( System.getPlayItemMetaDataString(( "album")) == ( ""))) {
Text18.setText(( ""));
}
if(( System.getPlayItemMetaDataString(( "album")) != ( ""))) {
if(( System.getPlayItemMetaDataString(( "track")) <= ( "0"))) {
Text18.setText(( ( ( System.getPlayItemMetaDataString(( "album")) + ( "\ \(Track\ ")) + System.getPlayItemMetaDataString(( "track"))) + ( "\)")));
} else {
Text18.setText(System.getPlayItemMetaDataString(( "album")));
}
} else {
Text18.setText(( ""));
}
}
if(Int94) {
Text20.setText(( "On\ Air"));
Text17.setXmlParam(( "ticker"), ( "1"));
Text17.setXmlParam(( "display"), ( "songtitle"));
Text17.setText(( ""));
if(( ! System.isVideo())) {
Text16.setText(( "Internet\ Radio"));
} else {
Text16.setText(( "Internet\ TV"));
}
Text18.setText(( ""));
Text18.setXmlParam(( "display"), ( "songinfo"));
}
Text19.setText(( ( String98 + ( "\/")) + String97));
return Null;
}
func3595()
{
Int Int131;
String String128;
Int Int130;
Int Int129;
String128 = System.getPrivateString(( "Abducted_OpenNote"), ( "NotifierPosition"), ( "1\.\ Bottom\ Right"));
Int129 = System.getViewportWidth();
Int130 = System.getViewportHeight();
Int131 = System.strlen(Text17.getText());
Int35 = Text16.getAutoWidth();
if(( Int35 > Text18.getAutoWidth())) {
Int35 = Text18.getAutoWidth();
}
if(( Int35 > Text17.getAutoWidth())) {
Int35 = Text17.getAutoWidth();
}
if(( Int35 > 128)) {
Int35 = 150;
}
if(( Int35 < ( System.getViewportWidth() / 4))) {
Int35 = ( System.getViewportWidth() / 4);
}
Int35 = ( Int35 + 60);
Group15.setXmlParam(( "x"), ( "10"));
Group15.setXmlParam(( "w"), ( "\-20"));
if(( String128 == ( "1\.\ Bottom\ Right"))) {
String40 = ( "b");
Layout13.setXmlParam(( "x"), System.integerToString(( ( Int129 - Int35) - 5)));
Layout13.setXmlParam(( "y"), System.integerToString(( Int130 - 124)));
}
if(( String128 == ( "2\.\ Bottom\ Left"))) {
String40 = ( "b");
Layout13.setXmlParam(( "x"), System.integerToString(5));
Layout13.setXmlParam(( "y"), System.integerToString(( Int130 - 124)));
}
if(( String128 == ( "3\.\ Top\ Right"))) {
String40 = ( "t");
Layout13.setXmlParam(( "x"), System.integerToString(( ( Int129 - Int35) - 5)));
Layout13.setXmlParam(( "y"), System.integerToString(5));
}
if(( String128 == ( "4\.\ Top\ Left"))) {
String40 = ( "t");
Layout13.setXmlParam(( "x"), System.integerToString(5));
Layout13.setXmlParam(( "y"), System.integerToString(5));
}
Layout13.setXmlParam(( "h"), System.integerToString(119));
Layout13.setXmlParam(( "w"), System.integerToString(Int35));
return Null;
}
func4519(Float 5.87747175411144e-39, Float 5.87747175411144e-39)
{
Int33 = 1;
if(( CheckBox27.isChecked() == 1)) {
Layout13.show();
Layout13.setTargetA(255);
Layout13.setTargetY(System.StringToInteger(Layout13.getXmlParam(( "y"))));
Layout13.setTargetW(Int35);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float146);
Layout13.gotoTarget();
} else {
Layout13.setAlpha(255);
Layout13.show();
Layout13.setTargetA(255);
Layout13.setTargetY(System.StringToInteger(Layout13.getXmlParam(( "y"))));
Layout13.setTargetW(Int35);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float146);
Layout13.gotoTarget();
}
return Null;
}
Layout13.onTargetReached()
{
if(( Int33 == 1)) {
Timer31.start();
}
if(( Int33 == 2)) {
Layout13.hide();
}
return Null;
}
Timer31.onTimer()
{
Float Float147;
Float Float146;
Timer31.stop();
Int33 = 2;
if(( CheckBox27.isChecked() == 1)) {
Layout13.setTargetA(0);
Layout13.setTargetY(System.StringToInteger(Layout13.getXmlParam(( "y"))));
Layout13.setTargetW(Int35);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float147);
Layout13.gotoTarget();
} else {
Layout13.show();
Layout13.setTargetA(255);
if(( String40 == ( "b"))) {
Layout13.setTargetY(( System.StringToInteger(Layout13.getXmlParam(( "y"))) + 150));
}
if(( String40 == ( "t"))) {
Layout13.setTargetY(( System.StringToInteger(Layout13.getXmlParam(( "y"))) - 150));
}
Layout13.setTargetW(Int35);
Layout13.setTargetX(System.StringToInteger(Layout13.getXmlParam(( "x"))));
Layout13.setTargetSpeed(Float146);
Layout13.gotoTarget();
}
return Null;
}