Kick Sayacı

tarafından
12
Kick Sayacı
Menu * { 
  Ayarlar
  .$iif(%KCounter,$style(1)) Kick Sayacı ( $+ $iif(%KCounter,ON,OFF) $+ ) {
    if (%KCounter) { unset %KCounter | .disable #KCounter | echos Kick Sayacı Kapatıldı }
    else { set %KCounter on | .enable #KCounter | kicksayac1 | echos Kick Sayacı Açıldı }
  }
}
#KCounter on
alias kick {
  raw -q kick  $1 $2 : $+ $3- %logo  $kicksayac
}
dialog kcount {
  title "Kick Sayac"
  size -1 -1 200 80
  button "Tamam" 99, 1001 1001 01 01, ok
  text "Kick/Sayacı:" 3, 15 20 100 20
  edit "" 4, 30 40 50 20, autohs
  button "Sıfırla" 5, 105 40 50 20, default
  button "+" 6, 80 40 10 10, default
  button "-" 7, 80 50 10 10, default
}
on *:dialog:kcount:init:0:{ did -ra kcount 4 %kicks }
on *:dialog:kcount:edit:4:{ set %kicks $did(4) | did -ra kcount 4 %kicks }
on *:dialog:kcount:sclick:5:{ set %kicks 1 | did -ra kcount 4 %kicks }
on *:dialog:kcount:sclick:6:{ inc %kicks 1 | did -ra kcount 4 %kicks }
on *:dialog:kcount:sclick:7:{ dec %kicks 1 | did -ra kcount 4 %kicks }
alias kicksayac1 { dialog -m kcount kcount }
alias kicksayac {
  inc %kicks 1
  if ( $len(%kicks) == 1 ) { return 0,2[Kick No:0 $+ 00000 $+ 15 $+ %kicks $+ 0 $+ ] }
  if ( $len(%kicks) == 2 ) { return 0,2[Kick No:0 $+ 0000 $+ 15 $+ %kicks $+ 0 $+ ] }
  if ( $len(%kicks) == 3 ) { return 0,2[Kick No:0 $+ 000 $+ 15 $+ %kicks $+ 0 $+ ] }
  if ( $len(%kicks) == 4 ) { return 0,2[Kick No:0 $+ 00 $+ 15 $+ %kicks $+ 0 $+ ] }
  if ( $len(%kicks) == 5 ) { return 0,2[Kick No:0 $+ 0 $+ 15 $+ %kicks $+ 0 $+ ] }
  if ( $len(%kicks) > 5 ) { return 0,2[Kick No:0 $+ 15 $+ %kicks $+ 0 $+ ] }
}
#KCounter End