mIRC Home    About    Download    Register    News    Help

Print Thread
#43792 23/08/03 08:22 PM
Joined: Aug 2003
Posts: 9
B
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Aug 2003
Posts: 9
I'm making an mp3player on my mIRC , but it doesn't work , could any1 help me out confused?that would be very cool
here is the code
Code:
dialog boogymp3 {
  title "Mp3 Player by C3ll` aka Bøøgyman"
  size -1 -1 165 172
  option dbu
  list %amout.mp3, 5, 4 4 156 119, size
  box "Options", 15, 4 124 120 29
  button "Play", 1, 37 132 25 16, flat
  button "[ ]", 2, 66 132 25 16, flat
  button "Select Dir", 8, 130 132 27 16, flat
  button "Random", 13, 95 132 25 16, flat
  button "Pause", 3, 8 132 25 8, flat
  button "Bitch", 30, 141 322 75 25, hide ok cancel
  button "Close", 6, 4 156 158 12, flat ok
  box "", 56, 125 124 37 29
  button "Resume", 4, 8 140 25 8, flat
}
on *:dialog:boogymp3:sclick:* {
  if ($did == 1) {
    splay %mp3.dir $+ $did($dname,5).seltext
    ame  BøøgyMp3 ~ Listening 2 :: $did($dname,5).seltext
    set %mp3 $did($dname,5).seltext
    did -a mp3 14 %mp3
    set %playtype off
  }
  if ($did == 2) {
    splay stop
    set %playtype off
    did -a mp3 14
    set %mp3  
    set %playtype
  }
  if ($did == 8) {
    %mp3.dir = $sdir(Select your new mp3 directory.)
    did -a mp3 5 
    set %amout.mp3 = $findfile(%mp3.dir,*.mp3,0,did -a mp3 5 $nopath($1-))
  }
  if ($did == 3) {
    splay pause
  }
  if ($did == 4) {
    splay resume
  }
  if ($did == 13) {
    var %x = $findfile(%mp3.dir,*.mp3,0,write randplay.txt $1-)
    set %mp3 $read(randplay.txt)
    splay %mp3
    amsg BøøgyMp3: $did($dname,5).seltext 
    did -a mp3 14 $replace(%mp3,%mp3.dir, )
    set %playtype Rand
    mp3chan
  }
}
on *:dialog:boogymp3:init:0: {
  if (%mp3.dir == $null) {
    %mp3.dir = $sdir(Select your mp3 directory.)
    ;Sets the mp3 dir on start
  }
  set %amout.mp3 = $findfile(%mp3.dir,*.mp3,0,did -a mp3 5 $nopath($1-))
}
on *:mp3end: {
  If ( %playtype == off ) {
    set %mp3  
    did -a mp3 14 %mp3  
  }
  If ( %playtype == Rand ) {
    var %x = $findfile(%mp3.dir,*.mp3,0,write randplay.txt $1-)
    set %mp3 $read(randplay.txt)
    splay %mp3
    did -a mp3 14 $replace(%mp3,%mp3.dir, )
    set %playtype Rand
    mp3chan
  }
}
if ($did == buttoncode) {
  if (%mp3.vol <= 0) { set %mp3.vol 0 | goto endd }
  elseif (%mp3.vol != 0) { goto down }
  :down
  %mp3.vol = $calc(%mp3.vol -6.5)
  vol -p $calc(%mp3.vol  * 1000)
  :endd
}
if ($did == buttoncode) {
  if (%mp3.vol >= 65) { set %mp3.vol 65  | goto endd }
  elseif (%mp3.vol != 65) { goto upp }
  :upp
  %mp3.vol = $calc(%mp3.vol +6.5)
  vol -p $calc(%mp3.vol  * 1000) 
  :endw
}
on ^*:LOAD:#:echo # 4(2Loaded BøøgyMp34) | echo # 4(2Made by Bøøgyman4) | echo # 4(2Type /boogymp3 to open it or use popups4)
alias boogymp3 { if ($dialog(boogymp3) == $null { dialog -m boogymp3 boogymp3 }) }
  

#43793 24/08/03 06:12 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
It doesn't work is a bit vague. What doesn't work? Try to be specific.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#43794 24/08/03 08:37 AM
Joined: Apr 2003
Posts: 300
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
well i tested it out and, for some reason it wont open the dialog for me :
* /dialog: 'boogymp3' invalid id ''


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#43795 24/08/03 09:21 AM
Joined: Aug 2003
Posts: 9
B
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Aug 2003
Posts: 9
the whole **** doesn't works......

#43796 24/08/03 03:26 PM
Joined: Jun 2003
Posts: 67
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
shouldnt
Code:
on *:dialog:boogymp3:init:0: 

be
Code:
on *:dialog:boogymp3:init:*: 


while (demi == nub) {
inc %skill
}
#43797 24/08/03 03:28 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
can be either


new username: tidy_trax
#43798 24/08/03 03:58 PM
Joined: Jun 2003
Posts: 67
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
wow
i set about fixing ur script and started finding numerous bugs
but i came up with this...
Code:
dialog boogymp3 {  
  title "Mp3 Player by C3ll` aka Bøøgyman"  
  size -1 -1 165 172  
  option dbu  
  list 5, 4 4 156 119, size  
  box "Options", 15, 4 124 120 29  
  button "Play", 1, 37 132 25 16, flat  
  button "[ ]", 2, 66 132 25 16, flat  
  button "Select Dir", 8, 130 132 27 16, flat 
  button "Random", 13, 95 132 25 16, flat  
  button "Pause", 3, 8 132 25 8, flat  
  button "Bitch", 30, 141 322 75 25, hide ok cancel  
  button "Close", 6, 4 156 158 12, flat ok  
  box "", 56, 125 124 37 29  
  button "Resume", 4, 8 140 25 8, flat
}
on *:dialog:boogymp3:sclick:* {  
  if ($did == 1) {
    splay %mp3.dir $+ $did($dname,5).seltext
    set %mp3 $did($dname,5).seltext   
    set %playtype off  
  }  
  if ($did == 2) {    
    splay stop    
    set %playtype off
    set %mp3
    set %playtype
  }  
  if ($did == 8) {    
    %mp3.dir = $sdir(Select your new mp3 directory.)    
    did -a mp3 5     
    set %amout.mp3 $findfile(%mp3.dir,*.mp3,0) 
  }  
  if ($did == 3) {    
    splay pause  
  }  
  if ($did == 4) {
    splay resume  
  }  
  if ($did == 13) {    
    var %x = $findfile(%mp3.dir,*.mp3,0,write randplay.txt $1-)    
    set %mp3 $read(randplay.txt)    
    splay %mp3       
    set %playtype Rand    
    mp3chan  
  }
}
on *:dialog:boogymp3:init:*: {  
  if (%mp3.dir == $null) {    
    %mp3.dir = $sdir(Select your mp3 directory.)    ;Sets the mp3 dir on start  
  }  
  set %amout.mp3 $findfile(%mp3.dir,*.mp3,0)
  var %x = 1
  while (%x <= %amout.mp3) {
    did -a $dname 5 $nopath($findfile(%mp3.dir,*.mp3,%x))
    inc %x
  }
}
on *:mp3end: {  
  If ( %playtype == off ) {    
    set %mp3      
  }  
  If ( %playtype == Rand ) {    
    var %x = $findfile(%mp3.dir,*.mp3,0,write randplay.txt $1-)    
    set %mp3 $read(randplay.txt)    
    splay %mp3      
    set %playtype Rand    
    mp3chan
  }
}
if ($did == buttoncode) {  
  if (%mp3.vol <= 0) { set %mp3.vol 0 | goto endd }  
  elseif (%mp3.vol != 0) { goto down }  
  :down  
  %mp3.vol = $calc(%mp3.vol -6.5)  
  vol -p $calc(%mp3.vol  * 1000)  
  :endd
}
if ($did == buttoncode) {  
  if (%mp3.vol >= 65) { 
  set %mp3.vol 65  | goto endd }  
  elseif (%mp3.vol != 65) { goto upp }  
  :upp  
  %mp3.vol = $calc(%mp3.vol +6.5)  
  vol -p $calc(%mp3.vol  * 1000)   
  :endw
}
on ^*:LOAD:#:echo # 4(2Loaded BøøgyMp34) | echo # 4(2Made by Bøøgyman4) | echo # 4(2Type /boogymp3 to open it or use popups4)
alias boogymp3 { 
  if ($dialog(boogymp3) == $null) { dialog -m boogymp3 boogymp3 } 
}

its no where near perfect but i didnt want to replace all your code with mine.just as warning it takes awhile to load a dir with a large number of MP3s

Edit: I removed the msg lines for dev purposes (didnt want to be spamming channels)

Edit2: Mp3s found in SubDir of the main MP3 dir wont play sorry bout that but its easy to fix

Last edited by demitrix; 24/08/03 04:00 PM.

while (demi == nub) {
inc %skill
}

Link Copied to Clipboard