home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 November / CDVD1105.ISO / Util / Winamp / Skins / Anime_Shogo.wal / scripts / sonique2_timer.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2003-02-19  |  2KB  |  97 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global Timer Timer2;
  6. Global Text Text3;
  7. Global Boolean Boolean4;
  8.  
  9. Function func391(Int 0);
  10.  
  11. System.onScriptLoaded()
  12. {
  13. Group Group7;
  14. Group7 = System.getContainer(( "Main")).getLayout(( "Normal"));
  15. Text3 = Group7.findObject(( "s2timer"));
  16. Timer2 = ( new Timer);
  17. Timer2.setDelay(20);
  18. Boolean4 = System.getPrivateInt(( "Settings"), ( "Minus"), 0);
  19. if(( System.getStatus() == 1)) {
  20. Timer2.start();
  21. }
  22. return Null;
  23. }
  24.  
  25. System.onScriptUnloading()
  26. {
  27. Timer2.stop();
  28. delete Timer2;
  29. return Null;
  30. }
  31.  
  32. System.onPlay()
  33. {
  34. Timer2.start();
  35. return Null;
  36. }
  37.  
  38. System.onStop()
  39. {
  40. Timer2.stop();
  41. Text3.setText(( ""));
  42. return Null;
  43. }
  44.  
  45. Timer2.onTimer()
  46. {
  47. if(Boolean4) {
  48. Text3.setText(func391(( System.getPlayItemLength() - System.getPosition())));
  49. } else {
  50. Text3.setText(func391(System.getPosition()));
  51. }
  52. return Null;
  53. }
  54.  
  55. Text3.onLeftButtonDown(int x, int y)
  56. {
  57. if(Boolean4) {
  58. Boolean4 = 0;
  59. } else {
  60. Boolean4 = 1;
  61. }
  62. System.setPrivateInt(( "Settings"), ( "Minus"), Boolean4);
  63. return Null;
  64. }
  65.  
  66. func391(Int 0)
  67. {
  68. String String20;
  69. Int Int21;
  70. String String19;
  71. String19 = ( System.integerToLongTime(Int17) + ( "\."));
  72. String20 = System.integerToString(Int17);
  73. Int21 = System.strlen(String20);
  74. if(( System.strlen(String19) == 8)) {
  75. String19 = ( ( "0") + String19);
  76. }
  77. if(( Int21 <= 3)) {
  78. String20 = System.strmid(String20, ( Int21 - 3), 2);
  79. String19 = ( String19 + String20);
  80. } else {
  81. if(( Int21 == 2)) {
  82. String20 = System.strmid(String20, 0, 1);
  83. String19 = ( ( String19 + ( "0")) + String20);
  84. } else {
  85. String19 = ( String19 + ( "00"));
  86. }
  87. }
  88. if(Boolean4) {
  89. String19 = ( ( "\-") + String19);
  90. } else {
  91. String19 = ( ( "\ ") + String19);
  92. }
  93. return String19;
  94. }
  95.  
  96.  
  97.