mIRC Home    About    Download    Register    News    Help

Print Thread
#36900 18/07/03 03:07 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
hi, i have a script http://mtec89.ath.cx/scripts.html click the "Control Panel" link

i have a problem with the dialog name 'cpsp', see, i have variables set so that i know what to check and what not to check on init of this dialog, but only the first check box gets checked on init no matter what i check or dont check previously

im stumped...really i am...hopefully someone can help me out....

#36901 18/07/03 03:56 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
use there 'if' instead of 'elseif'

#36902 18/07/03 03:57 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
u test it? cuz it didnt work for me

#36903 18/07/03 04:05 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
on *:dialog:cpsp:init:*: {
did -b cpsp 10
if (%cp.sp.cmd == /me) { did -c cpsp 2 }
elseif (%cp.sp.cmd == /ame) { did -c cpsp 3 }
elseif (%cp.sp.cmd == /echo -s) { did -c cpsp 4 }
elseif (%cp.sp.cmd == /echo -a) { did -c cpsp 5 }
elseif (%cp.sp.cmd == /msg $active) { did -c cpsp 6 }
elseif (%cp.sp.cmd == /msga) { did -c cpsp 7 }
elseif (%cp.sp.cmd == /mea) { did -c cpsp 8 }
elseif (%cp.sp.cmd == 10) { did -c cpsp 9 | did -e cpsp 10 }
if (%cp.sp.nick == 1) { did -c cpsp 12 }
if (%cp.sp.server == 1) { did -c cpsp 13 }
if (%cp.sp.servup == 1) { did -c cpsp 14 }
if (%cp.sp.mircup == 1) { did -c cpsp 15 }
if (%cp.sp.winup == 1) { did -c cpsp 16 }
if (%cp.sp.idle == 1) { did -c cpsp 17 }
if (%cp.sp.timedate == 1) { did -c cpsp 18 }
if (%cp.sp.dccs == 1) { did -c cpsp 19 }
}
if that's what u are trying to do

#36904 18/07/03 04:07 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
yes ty!

#36905 18/07/03 04:19 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
can u help me get the spam it button to work so it spams info based on what options i have it set to spam, on one line
i belive i should use iif but i dont know

Last edited by MTech; 18/07/03 05:23 AM.
#36906 18/07/03 12:03 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
ok i have all my $IIF statements now but i get this message
i just found a error in my script i used $nick instead of $me, i fixed that
also i want to instead of my script returning "Return" i want it to return nothing...i though return would be blank if the $IIF was $false

Code:
* /me: can't use /me in this window (line 269, cp.mrc)
-

Code:
alias cpsp2 {
  if (%cp.sp.cmd == /me) { /me $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
  if (%cp.sp.cmd == /ame) { /ame $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
  if (%cp.sp.cmd == /echo -s) { /echo -s $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
  if (%cp.sp.cmd == /echo -a) { /echo -a $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
  if (%cp.sp.cmd == /msg $active) { /msg $active $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
  if (%cp.sp.cmd == /msga) { 
    if ($active == Status Window) { /echo -s $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
    else { /msg $active $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
  }
  if (%cp.sp.cmd == /mea) {
    if ($active == Status Window) { /echo -s $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
    else { /me $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return) }
  }
  if (%cp.sp.cmd == 10) {
    /msg %cp.sp.10 $iif(%cp.sp.nick == 1,[Nick: $me $+ ],return) $iif(%cp.sp.server == 1,[Server: $scid($activecid).server $+ : $port $+ ],return) $iif(%cp.sp.servup == 1,[Server UpTime: $scid($activecid).uptime $+ ],return) $iif(%cp.sp.mircup == 1,[mIRC UpTime: $uptime(mirc,1) $+ ],return) $iif(%cp.sp.winup == 1,[Win $+ $os UpTime: $uptime(system,1) $+ ],return) $iif(%cp.sp.idle == 1,[Idle: $duration($scid($activecid).idle) $+ ],return) $iif(%cp.sp.timedate == 1,[Time&Date: $time ¤ $date $+ ],return) $iif(%cp.sp.dccs == 1,[DCC Gets: %cp.dcc.get.succ $+ / $+ %cp.dcc.get.tot $+ ] [DCC Sends: %cp.dcc.send.succ $+ / $+ %cp.dcc.send.tot $+ ],return)
  }
}

Last edited by MTech; 18/07/03 12:31 PM.
#36907 18/07/03 12:36 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Don't use /me, use /describe #channelname, or /describe $target, or /describe $active


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#36908 18/07/03 12:43 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
thank you


Link Copied to Clipboard