mIRC Home    About    Download    Register    News    Help

Print Thread
im scripting once again #82620 10/05/04 07:20 PM
Joined: Jun 2003
Posts: 68
D
Dr4g0n Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
lo there i posted this a year ago!! and i stopped scripting i lost my files and i searched for my mp3 script

alias /mp3 { dialog -m mp3 mp3 | did -r mp3 11 | var %x = $findfile(%mp3dir,*mp3,0,did -a mp3 11 $nopath($1-)) }
alias f3 mp3

dialog mp3 {
title "Mpł Player"
size -1 -1 130 80
option dbu
tab "Main", 1, 1 -2 128 69
button "Play", 2, 90 22 32 8, tab 1
button "Pause", 3, 90 30 32 8, tab 1
button "Stop", 4, 90 46 32 8, tab 1
button "Resume", 5, 90 38 32 8, tab 1
button "Refresh", 6, 90 54 32 8, tab 1
button "Exit", 7, 1 71 23 8, ok
text "© by Dragon", 8, 91 71 32 8, disable
box "Mpł List", 9, 4 14 84 50, disable tab 1
box "Navigation", 10, 88 14 36 50, tab 1
list 11, 6 21 80 41, tab 1 sort size
tab "Gadgets", 12, 1 -2 128 69
box "Hide Message", 13, 5 14 47 18, tab 12
check "Yes", 14, 7 21 22 10, tab 12
check "No", 15, 30 21 20 10, tab 12
box "Switch Layout", 16, 5 34 47 19, tab 12
check "[ 1 ]", 17, 7 41 19 10, tab 12
check "[ 2 ]", 18, 30 41 20 10, tab 12
button "Mp3 Count", 20, 80 22 33 8, tab 12
box "Navigation", 22, 78 14 37 27, tab 12
button "Set Dir", 23, 80 30 33 8, tab 12
text "©2003 Dragon", 24, 77 48 39 8, tab 12 disable
}

on *:dialog:mp3:sclick:*: {
if $did = 3 { .splay pause }
if $did = 4 { .splay stop }
if $did = 5 { .splay resume }
if $did = 6 { did -r mp3 11 | var %x = $findfile(%mp3dir,*mp3,0,did -a mp3 11 $nopath($1-)) }
if $did = 14 { .set %mp3msg yes }
if $did = 15 { .set %mp3msg no }
if $did == 23 { .set %mp3dir $sdir="Select Prefered Directory" }
if $did == 20 {
if (%mp3dir == $null) {
echo -a $dstime 15(9C15ant count no dir selecte9d15)
return
}
.msg $active 9(15( 9D15emon I9S 15)9) 15(9C15oun9T15: $findfile(%mp3dir,*.mp3,0) 9m15p3'z15) 15(9D15ir: %mp3dir $+ 15)
echo $active $dstime $dsme 9(15( 9D15emon I9S 15)9) 15(9C15oun9T15: $findfile(%mp3dir,*.mp3,0) 9m15p3'z15) 15(9D15ir: %mp3dir $+ 15) | Halt }
}
if $did == 2 {
if $did(mp3,11).seltext == $null {
echo -a $dstime 15(9C15ant play no file selecte9d15)
return
}
.set %mp3activ %mp3dir $+ $did(mp3,11,$did(mp3,11).sel).text
if (%mp3msg == no) {
.splay %mp3activ
.msg $active 9(15( 9D15emon I9S 15)9) 15(9M15pł) (9F15ile: $nopath($remove(%mp3activ,*,.mp3)) $+ 15) 9(15( $+ $left($calc($file( $+ %mp3activ $+ ).size / 1000000),4) M9b9)15) 9(15( $+ $remove($duration($calc($mp3(%mp3activ).length / 1000 )),ins,ecs) $+ 9)15) 9(15( $+ $mp3(%mp3activ).bitrate 9K15b/P9s $+ 9)15)
echo $active $dstime $dsme 9(15( 9D15emon I9S 15)9) 15(9M15pł) (9F15ile: $nopath($remove(%mp3activ,*,.mp3)) $+ 15) 9(15( $+ $left($calc($file( $+ %mp3activ $+ ).size / 1000000),4) M9b9)15) 9(15( $+ $remove($duration($calc($mp3(%mp3activ).length / 1000 )),ins,ecs) $+ 9)15) 9(15( $+ $mp3(%mp3activ).bitrate 9K15b/P9s $+ 9)15) }
if (%mp3msg == yes) {
.splay %mp3activ
echo $active $dstime $dsme 15(9H15idden15) 9(15( 9D15emon I9S 15)9) 15(9M15pł) (9F15ile: $nopath($remove(%mp3activ,*,.mp3)) $+ 15) 9(15( $+ $left($calc($file( $+ %mp3activ $+ ).size / 1000000),4) M9b9)15) 9(15( $+ $remove($duration($calc($mp3(%mp3activ).length / 1000 )),ins,ecs) $+ 9)15) 9(15( $+ $mp3(%mp3activ).bitrate 9K15b/P9s $+ 9)15) }
}

and offcourse it doesnt works the buttons dont respond to my clicks :S

Re: im scripting once again #82621 10/05/04 09:58 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
This fixes a bracket mismatch only.
Code:
on *:dialog:mp3:sclick:*: {
  if $did = 3 { .splay pause }
  if $did = 4 { .splay stop }
  if $did = 5 { .splay resume }
  if $did = 6 { did -r mp3 11 | var %x = $findfile(%mp3dir,*mp3,0,did -a mp3 11 $nopath($1-)) }
  if $did = 14 { .set %mp3msg yes }
  if $did = 15 { .set %mp3msg no }
  if $did == 23 { .set %mp3dir $sdir="Select Prefered Directory" }
  if $did == 20 {
    if (%mp3dir == $null) {
      echo -a $dstime 15(9C15ant count no dir selecte9d15)
      return
    }
    .msg $active 9(15( 9D15emon I9S 15)9) 15(9C15oun9T15: $findfile(%mp3dir,*.mp3,0) 9m15p3'z15) 15(9D15ir: %mp3dir $+ 15)
    [color:red]; here was the mismatch
    echo $active $dstime $dsme 9(15( 9D15emon I9S 15)9) 15(9C15oun9T15: $findfile(%mp3dir,*.mp3,0) 9m15p3'z15) 15(9D15ir: %mp3dir $+ 15)
    Halt
  }
  ;[/color]
  if $did == 2 { 
    if $did(mp3,11).seltext == $null {
      echo -a $dstime 15(9C15ant play no file selecte9d15)
      return
    }
    .set %mp3activ %mp3dir $+ $did(mp3,11,$did(mp3,11).sel).text
    if (%mp3msg == no) {
      .splay %mp3activ
      .msg $active 9(15( 9D15emon I9S 15)9) 15(9M15pł) (9F15ile: $nopath($remove(%mp3activ,*,.mp3)) $+ 15) 9(15( $+ $left($calc($file( $+ %mp3activ $+ ).size / 1000000),4) M9b9)15) 9(15( $+ $remove($duration($calc($mp3(%mp3activ).length / 1000 )),ins,ecs) $+ 9)15) 9(15( $+ $mp3(%mp3activ).bitrate 9K15b/P9s $+ 9)15)
      echo $active $dstime $dsme 9(15( 9D15emon I9S 15)9) 15(9M15pł) (9F15ile: $nopath($remove(%mp3activ,*,.mp3)) $+ 15) 9(15( $+ $left($calc($file( $+ %mp3activ $+ ).size / 1000000),4) M9b9)15) 9(15( $+ $remove($duration($calc($mp3(%mp3activ).length / 1000 )),ins,ecs) $+ 9)15) 9(15( $+ $mp3(%mp3activ).bitrate 9K15b/P9s $+ 9)15)
    }
    if (%mp3msg == yes) { 
      .splay %mp3activ
      echo $active $dstime $dsme 15(9H15idden15) 9(15( 9D15emon I9S 15)9) 15(9M15pł) (9F15ile: $nopath($remove(%mp3activ,*,.mp3)) $+ 15) 9(15( $+ $left($calc($file( $+ %mp3activ $+ ).size / 1000000),4) M9b9)15) 9(15( $+ $remove($duration($calc($mp3(%mp3activ).length / 1000 )),ins,ecs) $+ 9)15) 9(15( $+ $mp3(%mp3activ).bitrate 9K15b/P9s $+ 9)15)
    }
  }
}

Re: im scripting once again #82622 11/05/04 07:47 PM
Joined: Jun 2003
Posts: 68
D
Dr4g0n Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
well thanks but it aint working yet :x