|
Joined: Nov 2004
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2004
Posts: 21 |
I recently made an mp3 script, and it works on all versions of mIRC except 6.16. I've tried changing the "describe $chan" string to /msg $chan, /msg #, describe #, and every other possible combination of all of these.. but I also tried it with putting the channelname itself into the string of the remote, and it works fine.. Any ideas? Thanks in advance. -ProoN-
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 175 |
It's traditional to show us the part of the script that you need help on.
- Relinsquish
|
|
|
|
Joined: Nov 2004
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Nov 2004
Posts: 21 |
Alias F5 { .dialog -md Mp3Player Mp3Player } dialog Mp3Player { title "ProoN's Mp3 PlaYeR" size -1 -1 255 151 option dbu list 2, 3 4 246 67, sort size extsel hsbar vsbar button "Play", 3, 127 80 26 11, default button "Stop", 4, 186 80 26 11 button "Configure", 5, 22 133 66 11 edit "", 6, 4 73 103 52, read multi return autovs vsbar button "Button", 8, 258 96 6 9, hide cancel box "Controls", 1, 122 72 93 34 button "Pause", 7, 157 80 26 11 button "+", 10, 177 94 13 9 button "-", 11, 191 94 13 9 text "Volume", 12, 157 95 19 8 button "Resume", 13, 127 93 26 11 box "Advertise", 14, 217 72 35 33 radio "ON", 15, 222 80 19 10 radio "OFF", 16, 222 90 21 10 } on 1:dialog:mp3player:sclick:*: { if ($did == 15) { .set %advertise on } if ($did == 16) { .set %advertise off } if ($did == 10) { inc %mp3vol 5000 | .vol -v %mp3vol } if ($did == 11) { dec %mp3vol 5000 | .vol -v %mp3vol } if ($did == 7) { .splay pause } if ($did == 13) { .splay resume } if ($did == 2) { .set %mp3var $did(2).seltext } if ($did == 3) { if (%advertise == on) { .splay %mp3var | .set %FsSize $round($calc($int($calc($file(%mp3var).size / 1049)) / 1000),2) $+ MB | mp3.status | adver } if (%advertise == off) { .splay %mp3var | EDITBOXINFO } } if ($did == 4) { .splay stop } if ($did == 5) { .dialog -ma mpconf mpconf } } on 1:dialog:Mp3Player:init:*: { did -a Mp3Player 2 $findfile(%mp3dir,*.mp3,0,did -a Mp3Player 2 $1-) did -a Mp3Player 2 $findfile(%mp3dir,*.wma,0,did -a Mp3Player 2 $1-) } alias mp3.status { .did -r Mp3Player 6 set %FsLength $calc($file(%mp3var).size / 16100) set %FsTime $duration(%Fslength) if (mins isin %Fstime) { %Fstime = $replace(%FStime,mins,mins) } if (secs isin %Fstime) { %Fstime = $replace(%Fstime,secs,secs) } if (sec isin %Fstime) { %Fstime = $replace(%Fstime,sec,sec) } if (min isin %Fstime) { %Fstime = $replace(%Fstime,min,min) } if ($chr(32) isin %Fstime) { %Fstime = $remove(%Fstime,$chr(32)) } EDITBOXINFO } Alias adver { describe $chan Mp³ [ $+ $nopath(%mp3var) $+ ] } alias EDITBOXINFO { .did -r Mp3Player 6 .did -a Mp3Player 6 $crlf Song: $nopath(%mp3var) .did -a Mp3Player 6 $crlf Size: $round($calc($int($calc($file(%mp3var).size / 1050)) / 1000),2) $+ MB .did -a Mp3Player 6 $crlf Bitrate: $sound(%mp3var).bitrate if ($sound(%mp3var).track == -1 ) { .did -a Mp3Player 6 $crlf Track #: N/A } else { .did -a Mp3Player 6 $crlf Track #: $sound(%mp3var).track } } dialog mpconf { title "Mp3 Configure" size -1 -1 135 28 option dbu text "Mp3 Directory:", 2, 4 4 37 8 edit "", 10, 49 3 50 10, autohs text "Example: C:\Mp3s", 11, 24 16 50 8 button "Ok", 12, 109 15 22 11, ok } on 1:dialog:mpconf:sclick:12: { refresh } on 1:dialog:mpconf:edit:*: { if ($did == 10) { set %mp3dir $did(10) } } alias refresh { did -r mp3player 2 | did -a Mp3Player 2 $findfile(%mp3dir,*.mp3,0,did -a Mp3Player 2 $1-) } on 1:dialog:mpconf:init:*: { did -a mpconf 10 %mp3dir }
-
The "Alias adver {...}" is where the problem is. Like I said, I've tried everything. /me, /describe, /msg, etc.. They only seem to work when I put the channelname into the script, like I said. Thanks again for the help.
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 175 |
Alias adver {
describe $Active Mp³ [ $+ $nopath(%mp3var) $+ ]
}
- Relinsquish
|
|
|
|
Joined: Jun 2004
Posts: 87
Babel fish
|
Babel fish
Joined: Jun 2004
Posts: 87 |
if that doesnt work try /say or privmsg or .msg NOTE with privmsg or .msg u must echo wat u have just said (how u create ur name display instead of < $me > to like ( $ME ) or watever :-P
|
|
|
|
Joined: Nov 2004
Posts: 80
Babel fish
|
Babel fish
Joined: Nov 2004
Posts: 80 |
This script uses decribe $chan to send the mp3 you play. If you hit play and active window isn't a channel decribe doesnt know where to send the info To solve this you can add a combo box in the dialog.In this combo box you can add all channel names your are in and select in which one you want to send the info .Also you can add a check box if you want the mp3 to appear in all channels So i believe this will work:
dialog Mp3Player {
title "ProoN's Mp3 PlaYeR"
size -1 -1 252 171
option dbu
list 2, 3 4 246 67, sort size extsel hsbar vsbar
button "Play", 3, 127 80 26 11, default
button "Stop", 4, 187 80 26 11
button "Configure", 5, 22 153 66 11
edit "", 6, 3 74 108 73, read multi return autovs vsbar
button "Button", 8, 258 96 6 9, hide cancel
box "Controls", 1, 122 72 127 36
button "Pause", 7, 157 80 26 11
button "+", 10, 150 94 13 10
button "-", 11, 165 94 13 10
text "Volume", 12, 127 95 20 10
button "Resume", 13, 217 80 26 11
box "Advertise", 14, 122 111 127 36
radio "ON", 15, 127 119 21 10,group
radio "OFF", 16,157 119 21 10
radio "All channels",17,187 119 50 10,group
radio "Channel",18,127 131 29 10
combo 19,157 131 87 50,drop
}
on 1:dialog:mp3player:sclick:*: {
if ($did == 17) { .set %advall on }
if ($did == 18) { .set %advall off }
if ($did == 19) { .set %adchan $did(19).seltext }
if ($did == 15) { .set %advertise on }
if ($did == 16) { .set %advertise off }
if ($did == 10) { inc %mp3vol 5000 | .vol -v %mp3vol }
if ($did == 11) { dec %mp3vol 5000 | .vol -v %mp3vol }
if ($did == 7) { .splay pause }
if ($did == 13) { .splay resume }
if ($did == 2) { .set %mp3var $did(2).seltext }
if ($did == 3) {
if (%advertise == on) {
.splay %mp3var | .set %FsSize $round($calc($int($calc($file(%mp3var).size / 1049)) / 1000),2) $+ MB | mp3.status | adver }
if (%advertise == off) { .splay %mp3var | EDITBOXINFO }
}
if ($did == 4) { .splay stop }
if ($did == 5) { .dialog -ma mpconf mpconf }
}
on 1:dialog:Mp3Player:init:*: {
did -a Mp3Player 2 $findfile(%mp3dir,*.mp3,0,did -a Mp3Player 2 $1-)
did -a Mp3Player 2 $findfile(%mp3dir,*.wma,0,did -a Mp3Player 2 $1-)
var %i = $chan(0)
while (%i >= 1) {
did -a $dname 19 $chan(%i)
dec %i
}
}
alias mp3.status {
.did -r Mp3Player 6
set %FsLength $calc($file(%mp3var).size / 16100)
set %FsTime $duration(%Fslength)
if (mins isin %Fstime) { %Fstime = $replace(%FStime,mins,mins) }
if (secs isin %Fstime) { %Fstime = $replace(%Fstime,secs,secs) }
if (sec isin %Fstime) { %Fstime = $replace(%Fstime,sec,sec) }
if (min isin %Fstime) { %Fstime = $replace(%Fstime,min,min) }
if ($chr(32) isin %Fstime) { %Fstime = $remove(%Fstime,$chr(32)) }
EDITBOXINFO
}
Alias adver {
if (%advall == on) { ame Mp³ [ $+ $nopath(%mp3var) $+ ] }
elseif (%advchan ischan) { describe %advchan Mp³ [ $+ $nopath(%mp3var) $+ ] }
}
alias EDITBOXINFO {
.did -r Mp3Player 6
.did -a Mp3Player 6 $crlf Song: $nopath(%mp3var)
.did -a Mp3Player 6 $crlf Size: $round($calc($int($calc($file(%mp3var).size / 1050)) / 1000),2) $+ MB
.did -a Mp3Player 6 $crlf Bitrate: $sound(%mp3var).bitrate
if ($sound(%mp3var).track == -1 ) {
.did -a Mp3Player 6 $crlf Track #: N/A
}
else { .did -a Mp3Player 6 $crlf Track #: $sound(%mp3var).track
}
}
dialog mpconf {
title "Mp3 Configure"
size -1 -1 135 28
option dbu
text "Mp3 Directory:", 2, 4 4 37 8
edit "", 10, 49 3 50 10, autohs
text "Example: C:\Mp3s", 11, 24 16 50 8
button "Ok", 12, 109 15 22 11, ok
}
on 1:dialog:mpconf:sclick:12: { refresh }
on 1:dialog:mpconf:edit:*: {
if ($did == 10) { set %mp3dir $did(10) }
}
alias refresh {
did -r mp3player 2 | did -a Mp3Player 2 $findfile(%mp3dir,*.mp3,0,did -a Mp3Player 2 $1-)
}
on 1:dialog:mpconf:init:*: {
did -a mpconf 10 %mp3dir
}
I suggest to check the radio boxes on init .You can do it with did -c
while (1) { fork(); }
|
|
|
|
|