mIRC Home    About    Download    Register    News    Help

Print Thread
#114257 13/03/05 10:00 AM
Joined: Feb 2005
Posts: 185
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
The check box works nicely, but nothing happens...Any Ideas?

Code:
  

dialog Prot {
  title "Anti Idle"
  size -1 -1 102 212
  option dbu
  box "General Protection", 1, 2 2 80 75
  check "Anti-Idle", 2, 5 12 50 10
  button "Done", 18, 17 198 52 12, ok
}

on *:dialog:Prot:sclick:2:{
  if ($did(2).state == 0) { disable #antiidle  }
  elseif ($did(2).state == 1) { enable #antiidle }
}

#antiidle on
alias anti.idle.on {
  if (%idle != on) {
    set %idle on
  }

}
alias anti.idle.off {
  if (%idle != off) {
    set %idle off
  }

}
on *:Connect: { .timeridle 0 5 anti.idle }
alias anti.idle {
  if (($idle >= 1) && (%idle = on)) {
    msg $me ...
  }
}
#antiidle end

on *:Dialog:Prot:init:0: {
  if ($group(#antiidle) == on) { did -c $dname 2 }
}



Cheerz
Matt


sub-zero.homeip.net:6667

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you have the group going on and off, but haven't called the alias to change the set %idle state and have not started or stopped the timer
Code:
dialog Prot {
  title "Anti Idle"
  size -1 -1 102 212
  option dbu
  box "General Protection", 1, 2 2 80 75
  check "Anti-Idle", 2, 5 12 50 10
  button "Done", 18, 17 198 52 12, ok
}

on *:dialog:Prot:sclick:2:{
  if ($did(2).state == 0) { anti.idle.off | .timeridle off  | disable #antiidle  }
  elseif ($did(2).state == 1) {  enable #antiidle | anti.idle.on }
}

#antiidle on
alias anti.idle.on {
  if (%idle != on) {
    set %idle on
  }
 .timeridle 0 5 anti.idle
}
alias anti.idle.off {
  if (%idle != off) {
    set %idle off
  }

}
on *:Connect: { .timeridle 0 5 anti.idle }
alias anti.idle {
  if (($idle >= 1) && (%idle = on)) {
    msg $me ...
  }
}
#antiidle end

on *:Dialog:Prot:init:0: {
  if ($group(#antiidle) == on) { did -c $dname 2 }
}


see if that helps...

Joined: Feb 2005
Posts: 185
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
Thank- you very much, it works perectly now.

wink


sub-zero.homeip.net:6667


Link Copied to Clipboard