home *** CD-ROM | disk | FTP | other *** search
Winamp Compiled Maki Script | 2004-03-07 | 12.4 KB | 520 lines |
- /* Note: a decompiler is no invitation to steal code.
- Please respect the the copyright */
-
- #include "std.mi"
- Global ConfigAttribute ConfigAttribute17;
- Global ConfigAttribute ConfigAttribute18;
- Global ConfigAttribute ConfigAttribute19;
- Global ConfigAttribute ConfigAttribute20;
- Global ConfigAttribute ConfigAttribute21;
- Global ConfigAttribute ConfigAttribute22;
- Global ConfigAttribute ConfigAttribute23;
- Global ConfigAttribute ConfigAttribute24;
- Global ConfigAttribute ConfigAttribute25;
- Global ConfigAttribute ConfigAttribute26;
- Global ConfigAttribute ConfigAttribute27;
- Global ConfigAttribute ConfigAttribute28;
- Global ConfigAttribute ConfigAttribute29;
- Global ConfigAttribute ConfigAttribute30;
- Global ConfigAttribute ConfigAttribute31;
- Global ConfigAttribute ConfigAttribute32;
- Global ConfigAttribute ConfigAttribute33;
- Global ConfigAttribute ConfigAttribute34;
- Global ConfigAttribute ConfigAttribute35;
- Global ConfigAttribute ConfigAttribute36;
- Global ConfigAttribute ConfigAttribute37;
- Global ConfigAttribute ConfigAttribute38;
- Global ConfigAttribute ConfigAttribute39;
- Global ConfigAttribute ConfigAttribute40;
- Global ConfigAttribute ConfigAttribute41;
- Global ConfigAttribute ConfigAttribute42;
- Global ConfigAttribute ConfigAttribute43;
- Global Container Container116;
- Global Layout Layout117;
- Global Timer Timer118;
- Global String String119;
-
- Function func242();
- Function func2229();
- Function func2538(Int 0);
- Function func3163();
- Function func3205();
- Function func3380(Int 0);
- Function func3770(String "0");
- Function func5185(String "0");
-
- func242()
- {
- ConfigItem ConfigItem64;
- ConfigItem ConfigItem67;
- ConfigItem ConfigItem58;
- ConfigAttribute ConfigAttribute73;
- ConfigAttribute ConfigAttribute77;
- ConfigAttribute ConfigAttribute74;
- ConfigAttribute ConfigAttribute75;
- ConfigItem ConfigItem52;
- ConfigItem ConfigItem46;
- ConfigAttribute ConfigAttribute78;
- ConfigAttribute ConfigAttribute72;
- ConfigItem ConfigItem55;
- ConfigItem ConfigItem61;
- ConfigItem ConfigItem69;
- ConfigAttribute ConfigAttribute79;
- ConfigItem ConfigItem71;
- ConfigAttribute ConfigAttribute84;
- ConfigItem ConfigItem49;
- ConfigItem46 = Config.newItem(( "Winamp\ Modern"), ( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
- ConfigItem49 = Config.newItem(( "Drawers"), ( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
- ConfigItem52 = Config.newItem(( "Menus"), ( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
- ConfigItem55 = Config.newItem(( "Main\ Windowshade\ Mode"), ( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
- ConfigItem58 = Config.newItem(( "Vis\ Buttons"), ( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
- ConfigItem61 = Config.newItem(( "Notifications"), ( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
- ConfigItem64 = Config.newItem(( "Songticker"), ( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
- ConfigItem67 = Config.newItem(( "Hidden"), ( "\{E9C2D926\-53CA\-400f\-9A4D\-85E31755A4CF\}"));
- ConfigItem69 = Config.getItem(( "\{1828D28F\-78DD\-4647\-8532\-EBA504B8FC04\}"));
- ConfigItem71 = Config.getItem(( "\{6559CA61\-7EB2\-4415\-A8A9\-A2AEEF762B7F\}"));
- ConfigAttribute72 = ConfigItem69.newAttribute(( "Winamp\ Modern"), ( ""));
- ConfigAttribute72.setData(( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
- ConfigAttribute73 = ConfigItem46.newAttribute(( "Drawers"), ( ""));
- ConfigAttribute73.setData(( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
- ConfigAttribute74 = ConfigItem46.newAttribute(( "Menus"), ( ""));
- ConfigAttribute74.setData(( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
- ConfigAttribute75 = ConfigItem46.newAttribute(( "Main\ Windowshade\ Mode"), ( ""));
- ConfigAttribute75.setData(( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
- ConfigAttribute77 = ConfigItem46.newAttribute(( "Vis\ Shortcut\ Button"), ( ""));
- ConfigAttribute77.setData(( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
- ConfigAttribute78 = ConfigItem46.newAttribute(( "Notifications"), ( ""));
- ConfigAttribute78.setData(( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
- ConfigAttribute79 = ConfigItem46.newAttribute(( "Songticker"), ( ""));
- ConfigAttribute79.setData(( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
- ConfigAttribute17 = ConfigItem49.newAttribute(( "Animate\ Video\/Vis\ Drawer\ \(disabled\ if\ opacity\ \<\ 100\%\)"), ( "0"));
- ConfigAttribute18 = ConfigItem49.newAttribute(( "Animate\ Config\ Drawer"), ( "0"));
- ConfigAttribute84 = ConfigItem49.newAttribute(( "sep1"), ( ""));
- ConfigAttribute84.setData(( "\-"));
- ConfigAttribute21 = ConfigItem49.newAttribute(( "Open\ Video\/Vis\ from\ the\ top"), ( "0"));
- ConfigAttribute22 = ConfigItem49.newAttribute(( "Open\ Video\/Vis\ from\ the\ bottom"), ( "1"));
- ConfigAttribute23 = ConfigItem49.newAttribute(( "Bypass\ setting\ to\ keep\ in\ screen"), ( "1"));
- if(( ConfigAttribute21.getData() == ( "1"))) {
- ConfigAttribute21.onDataChanged();
- } else {
- ConfigAttribute22.onDataChanged();
- }
- ConfigAttribute25 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Main\ Window"), ( "1"));
- ConfigAttribute26 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Playlist\ Editor"), ( "1"));
- ConfigAttribute27 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Media\ Library"), ( "1"));
- ConfigAttribute84 = ConfigItem46.newAttribute(( "sep1"), ( ""));
- ConfigAttribute84.setData(( "\-"));
- ConfigAttribute19 = ConfigItem46.newAttribute(( "Detach\ Vis\ Window"), ( "0"));
- ConfigAttribute20 = ConfigItem46.newAttribute(( "Detach\ Video\ Window"), ( "0"));
- ConfigAttribute24 = ConfigItem71.newAttribute(( "Equalizer\ Alt\+G"), ( "0"));
- ConfigAttribute84 = ConfigItem46.newAttribute(( "sep2"), ( ""));
- ConfigAttribute84.setData(( "\-"));
- ConfigAttribute31 = ConfigItem46.newAttribute(( "Enable\ Beat\ Visualization"), ( "1"));
- ConfigAttribute28 = ConfigItem55.newAttribute(( "Link\ Position\ and\ Width"), ( "1"));
- ConfigAttribute29 = ConfigItem55.newAttribute(( "Link\ Position\,\ Unlink\ Width"), ( "0"));
- ConfigAttribute30 = ConfigItem55.newAttribute(( "Unlink\ Position\ and\ Width"), ( "0"));
- ConfigAttribute33 = ConfigItem58.newAttribute(( "Open\ Context\ Menu"), ( "1"));
- ConfigAttribute32 = ConfigItem58.newAttribute(( "Open\ Configuration"), ( "0"));
- ConfigAttribute36 = ConfigItem61.newAttribute(( "Show\ always"), ( "0"));
- ConfigAttribute35 = ConfigItem61.newAttribute(( "Show\ with\ windowshade\ and\ when\ minimized"), ( "0"));
- ConfigAttribute34 = ConfigItem61.newAttribute(( "Show\ only\ when\ minimized"), ( "0"));
- ConfigAttribute37 = ConfigItem61.newAttribute(( "Never\ show"), ( "1"));
- ConfigAttribute84 = ConfigItem61.newAttribute(( "sep1"), ( ""));
- ConfigAttribute84.setData(( "\-"));
- ConfigAttribute41 = ConfigItem61.newAttribute(( "Disable\ in\ fullscreen"), ( "1"));
- ConfigAttribute38 = ConfigItem67.newAttribute(( "Notifications\ fade\ in\ time"), ( "1000"));
- ConfigAttribute39 = ConfigItem67.newAttribute(( "Notifications\ fade\ out\ time"), ( "5000"));
- ConfigAttribute40 = ConfigItem67.newAttribute(( "Notifications\ display\ time"), ( "2000"));
- ConfigAttribute42 = ConfigItem64.newAttribute(( "Enable\ Songticker\ scrolling"), ( "1"));
- ConfigAttribute43 = ConfigItem64.newAttribute(( "Disable\ Songticker\ scrolling"), ( "0"));
- return Null;
- }
-
- System.onScriptLoaded()
- {
- func242();
- Timer118 = ( new Timer);
- return Null;
- }
-
- System.onScriptUnloading()
- {
- delete Timer118;
- return Null;
- }
-
- Int System.onShowNotification()
- {
- String String120;
- if(func2538(1)) {
- return Null;
- }
- func3205();
- if(( System.getStatus() == 1)) {
- String120 = ( "Playing");
- }
- if(( System.getStatus() == ( - 1))) {
- String120 = ( "Playback\ Paused");
- }
- if(( System.getStatus() == 0)) {
- String120 = ( "Playback\ Stopped");
- }
- func3380(func3770(String120));
- complete;
- return 1;
- }
-
- System.onTitleChange(String newtitle)
- {
- if(( String119 == newtitle)) {
- return Null;
- }
- if(( System.Strleft(newtitle, 1) == ( "\["))) {
- if(( ( System.Strleft(newtitle, 7) == ( "\[Buffer")) || ( System.Strleft(newtitle, 4) == ( "\[ICY")))) {
- return Null;
- }
- }
- String119 = newtitle;
- func2229();
- return Null;
- }
-
- func2229()
- {
- if(func2538(0)) {
- return Null;
- }
- func3205();
- func3380(func3770(( "")));
- return Null;
- }
-
- System.onPlay()
- {
- if(func2538(0)) {
- return Null;
- }
- func3205();
- func3380(func3770(( "Playing")));
- return Null;
- }
-
- System.onPause()
- {
- if(func2538(0)) {
- return Null;
- }
- func3205();
- func3380(func5185(( "Playback\ Paused")));
- return Null;
- }
-
- System.onResume()
- {
- if(func2538(0)) {
- return Null;
- }
- func3205();
- func3380(func3770(( "Resuming\ Playback")));
- return Null;
- }
-
- System.onStop()
- {
- if(func2538(0)) {
- return Null;
- }
- func3205();
- func3380(func5185(( "End\ of\ Playback")));
- return Null;
- }
-
- func2538(Int 0)
- {
- Layout Layout135;
- Container Container134;
- if(( ( ( ! Int132) && ( ConfigAttribute41.getData() == ( "1"))) && System.isVideoFullscreen())) {
- return 1;
- }
- if(( ConfigAttribute37.getData() == ( "1"))) {
- return 1;
- }
- if(( ( ConfigAttribute34.getData() == ( "1")) && ( ! System.isMinimized()))) {
- return 1;
- }
- if(( ConfigAttribute35.getData() == ( "1"))) {
- if(System.isMinimized()) {
- return 0;
- }
- Container134 = System.getContainer(( "main"));
- if(( ! Container134)) {
- return 1;
- }
- Layout135 = Container134.getCurLayout();
- if(( ! Layout135)) {
- return 1;
- }
- if(( Layout135.getId() != ( "shade"))) {
- return 1;
- }
- }
- return 0;
- }
-
- Layout117.onTargetReached()
- {
- Int Int137;
- Int137 = Layout117.getAlpha();
- if(( Int137 == 255)) {
- Timer118.setDelay(System.StringToInteger(ConfigAttribute40.getData()));
- Timer118.start();
- } else {
- if(( Int137 == 0)) {
- func3163();
- }
- }
- return Null;
- }
-
- Timer118.onTimer()
- {
- Timer118.stop();
- if(Layout117.isTransparencySafe()) {
- Layout117.setTargetA(0);
- Layout117.setTargetSpeed(( System.StringToInteger(ConfigAttribute39.getData()) / 1000));
- Layout117.gotoTarget();
- } else {
- func3163();
- }
- return Null;
- }
-
- Layout117.onLeftButtonDown(int x, int y)
- {
- Timer118.stop();
- Layout117.cancelTarget();
- func3163();
- System.restoreApplication();
- System.activateApplication();
- return Null;
- }
-
- func3163()
- {
- Container116.close();
- Container116 = Null;
- Layout117 = Null;
- return Null;
- }
-
- func3205()
- {
- if(( Container116 == Null)) {
- Container116 = System.newDynamicContainer(( "notifier"));
- if(( ! Container116)) {
- return Null;
- }
- if(System.isDesktopAlphaAvailable()) {
- Layout117 = Container116.getLayout(( "desktopalpha"));
- } else {
- Layout117 = Container116.getLayout(( "normal"));
- }
- if(( ! Layout117)) {
- return Null;
- }
- } else {
- Layout117.cancelTarget();
- Timer118.stop();
- }
- return Null;
- }
-
- func3380(Int 0)
- {
- Int Int147;
- Int Int149;
- Int145 = ( Int145 + 32);
- Int147 = ( ( ( System.getViewportWidth() + System.getViewportLeft()) - Int145) - 2);
- Int149 = ( ( ( System.getViewportHeight() + System.getViewportTop()) - 80) - 2);
- Layout117.resize(Int147, Int149, Int145, 80);
- if(Layout117.isTransparencySafe()) {
- Layout117.show();
- Layout117.setTargetA(255);
- Layout117.setTargetX(Int147);
- Layout117.setTargetY(Int149);
- Layout117.setTargetW(Int145);
- Layout117.setTargetH(80);
- Layout117.setTargetSpeed(( System.StringToInteger(ConfigAttribute38.getData()) / 1000));
- Layout117.gotoTarget();
- } else {
- Layout117.setAlpha(255);
- Layout117.show();
- Timer118.setDelay(System.StringToInteger(ConfigAttribute40.getData()));
- Timer118.start();
- }
- return Null;
- }
-
- func3770(String "0")
- {
- String String184;
- Text Text163;
- Text Text155;
- String String182;
- Group Group153;
- Text Text165;
- String String176;
- Int Int151;
- Text Text159;
- Text Text157;
- Int Int152;
- String String172;
- Text Text161;
- Int151 = 0;
- Int152 = 0;
- Group153 = Layout117;
- Text155 = Group153.findObject(( "plentry"));
- Text157 = Group153.findObject(( "nexttrack"));
- Text159 = Group153.findObject(( "title"));
- Text161 = Group153.findObject(( "album"));
- Text163 = Group153.findObject(( "artist"));
- Text165 = Group153.findObject(( "endofplayback"));
- System.debugString(( ( "got\ callback\ for\ ") + System.getPlayItemString()), 0);
- if(( System.Strleft(System.getPlayItemString(), 7) == ( "http\:\/\/"))) {
- Int152 = 1;
- }
- if(Text165) {
- Text165.hide();
- }
- if(Text155) {
- Text155.setText(( ( System.integerToString(( System.getPlaylistIndex() + 1)) + ( "\/")) + System.integerToString(System.getPlaylistLength())));
- Text155.show();
- }
- if(Text157) {
- if(( String150 == ( ""))) {
- if(( ! Int152)) {
- if(( ! System.isVideo())) {
- Text157.setText(( "New\ track"));
- } else {
- Text157.setText(( "New\ video"));
- }
- } else {
- Text157.setText(( "On\ air"));
- }
- } else {
- Text157.setText(String150);
- }
- Text157.show();
- }
- if(Text159) {
- if(( ! Int152)) {
- Text159.setXmlParam(( "ticker"), ( "0"));
- Text159.setXmlParam(( "display"), ( ""));
- String172 = System.getPlayItemMetaDataString(( "title"));
- if(( String172 == ( ""))) {
- String172 = System.getPlayItemDisplayTitle();
- }
- String176 = System.getPlayItemMetaDataString(( "length"));
- if(( String176 != ( ""))) {
- String172 = ( String172 + ( ( ( "\ \(") + System.integerToTime(System.StringToInteger(String176))) + ( "\)")));
- }
- Text159.setText(String172);
- } else {
- Text159.setXmlParam(( "ticker"), ( "1"));
- Text159.setXmlParam(( "display"), ( "songtitle"));
- Text159.setText(( ""));
- }
- Text159.show();
- }
- if(Text163) {
- if(( ! Int152)) {
- if(System.isVideo()) {
- Text163.setText(( ""));
- } else {
- Text163.setText(System.getPlayItemMetaDataString(( "artist")));
- }
- } else {
- if(System.isVideo()) {
- Text163.setText(( "Internet\ TV"));
- } else {
- Text163.setText(( "Internet\ Radio"));
- }
- }
- Text163.show();
- }
- if(Text161) {
- if(( ( ! Int152) && ( ! System.isVideo()))) {
- Text161.setXmlParam(( "display"), ( ""));
- String182 = System.getPlayItemMetaDataString(( "album"));
- String184 = System.getPlayItemMetaDataString(( "track"));
- if(( ( String184 != ( "")) && ( String184 != ( "\-1")))) {
- String182 = ( String182 + ( ( ( "\ \(Track\ ") + String184) + ( "\)")));
- }
- Text161.setText(String182);
- } else {
- Text161.setText(( ""));
- Text161.setXmlParam(( "display"), ( "songinfo"));
- }
- Text161.show();
- }
- Int151 = Text163.getAutoWidth();
- if(( Int151 > Text161.getAutoWidth())) {
- Int151 = Text161.getAutoWidth();
- }
- if(( Int151 > Text159.getAutoWidth())) {
- Int151 = Text159.getAutoWidth();
- }
- if(( Int151 > 128)) {
- Int151 = 128;
- }
- if(( Int151 < ( System.getViewportWidth() / 4))) {
- Int151 = ( System.getViewportWidth() / 4);
- }
- return Int151;
- }
-
- func5185(String "0")
- {
- Int Int197;
- Group Group190;
- Text Text196;
- Text Text191;
- Text Text192;
- Text Text195;
- Text Text194;
- Text Text193;
- Group190 = Layout117;
- Text191 = Group190.findObject(( "plentry"));
- Text192 = Group190.findObject(( "nexttrack"));
- Text193 = Group190.findObject(( "title"));
- Text194 = Group190.findObject(( "album"));
- Text195 = Group190.findObject(( "artist"));
- Text196 = Group190.findObject(( "endofplayback"));
- if(Text191) {
- Text191.hide();
- }
- if(Text192) {
- Text192.hide();
- }
- if(Text193) {
- Text193.hide();
- }
- if(Text195) {
- Text195.hide();
- }
- if(Text194) {
- Text194.hide();
- }
- if(Text196) {
- Text196.setText(String189);
- Int197 = Text196.getAutoWidth();
- Text196.show();
- if(( Int197 < 128)) {
- return Int197;
- }
- }
- return 128;
- }
-
-
-