Digital clock

By eyiezinc on May 18, 2009

Digital clock 4 ur mIRC

on 1:Load:{ set %shadow 1 | set %shon (-ON-) | set %shoff OFF | set %xpos 4 | set %ypos 5 | timer.clock off | set %cton ON | Set %ctoff (-OFF-) | window -c @Clock | set %Lsuon ON | set %Lsuoff (-OFF-) | unset %clock %color* %atime }
on 1:Start:{ set %itime $ticks | echo -a Clock Ad-On By 4EyiezINC Initializing Version 2.0 Built 3 :) | echo -a For Any Comments Or Bugs Please Send A Mail To 7eyiezinc@gmail.com | set %xpos 4 | set %ypos 5 | unset %color* %atime %clock %shutdown %sdtimer | timer.clock off | set %cton ON | Set %ctoff (-OFF-) | window -c @Clock | if (%lsu) { time on } | echo -a Clock Addon Initialized In $+  4 $calc(( $ticks - %itime )/1000) $+  Msecs. | unset %itime }
alias time { 
  if ($1 == on) { set %colorfont Tahoma | set %colorbg $colour(background) | set %colorf $colour(normal) | set %cton (-ON-) | set %ctoff OFF | set %xpos 4 | set %ypos 5 | window -fkp +bet @Clock -1 -1 75 30 | .timer.clock off | .timer.clock 0 1 wclock }
  if ($1 == off) { unset %color* | .timer.clock off | unset %clock | set %cton ON | Set %ctoff (-OFF-) | unset %hou %min %sec | if (%alarm) { .timer.alarm* Off | echo -a Alarm Stopped ( $+ %atime $+ ) | unset %atime %alarm } | if (%shutdown) { .timer.shutdown* off | unset %sdtimer %shutdown | echo -a ShutDown Stoped } | window -c @Clock | Echo -a Clock Addon Stoped | halt }
}
alias -l check {
  if ($gettok($time,1,58) != %hou) { drawrect @clock %colorbg 200 $calc(%xpos -1) $calc(%ypos -1) 20 20 | set %hou $gettok($time,1,58) } 
  if ($gettok($time,2,58) != %min) { drawrect @clock %colorbg 200 $calc(%xpos +24) $calc(%ypos -1) 20 20 | set %min $gettok($time,2,58) } 
  if ($gettok($time,3,58) != %sec) { drawrect @clock %colorbg 200 $calc(%xpos +49) $calc(%ypos -1) 20 20 | set %sec $gettok($time,3,58) } 
}
alias -l wclock { if $window(@Clock) == $null { time off } | check | if (%shadow) { drawtext @Clock 15 %colorfont 20 $calc(%xpos -2) $calc(%ypos -2) %hou } | drawtext @Clock %colorf %colorfont 20 %xpos %ypos %hou |  if (%shadow) { drawtext @Clock 15 %colorfont 20 $calc(%xpos +16) $calc(%ypos -2) : } | drawtext @Clock %colorf %colorfont 20 $calc(%xpos +18) %ypos : | if (%shadow) { drawtext @Clock 15 %colorfont 20 $calc(%xpos +23) $calc(%ypos -2) %min } | drawtext @Clock %colorf %colorfont 20 $calc(%xpos +25) %ypos %min | if (%shadow) { drawtext @Clock 15 %colorfont 20 $calc(%xpos +40) $calc(%ypos -2) : } | drawtext @Clock %colorf %colorfont 20 $calc(%xpos +43) %ypos : | if (%shadow) { drawtext @Clock 15 %colorfont 20 $calc(%xpos +47) $calc(%ypos -2) %sec } | drawtext @Clock %colorf %colorfont 20 $calc(%xpos +50) %ypos %sec }
alias alarm {
  if $window(@Clock) == $null { echo -a Clock Addon Isn't Working You Can't Set An Alarm Now | halt }
  if ((%alarm != $null) && ($1 == stop)) { .timer.alarm* Off | echo -a Alarm Stopped ( $+ %atime $+ ) | unset %atime %alarm | halt }
  if ($1) { set %atime $1 }
  else { set %atime $$?="Enter time like 14:30" }
  if (%atime == $null) { echo -a No time set Alarm is not working | halt }
  if ($left(%atime,1) == +) { 
    .timer.alarm 1 $calc(60 * $right( %atime,-1)) Echo -a It's now $time Clock Addon By 4eyiezinc
    .timer.alarm2 1 $calc(60 * $right( %atime,-1)) beep 10 2 
    .timer.alarm4 1 $calc(60 * $right( %atime,-1)) unset %alarm
    Echo -a Alarm Seted $calc(60 * $right( %atime,-1)) Seconds Later
    set %alarm 1
    halt
  }
  if ($numtok(%atime,58) != 2) || ($gettok(%atime,1,58) < 0) || ($gettok(%atime,1,58) > 24) || ($gettok(%atime,2,58) < 0) || ($gettok(%atime,2,58) > 59) { Echo Time format is not correct | unset %atime,2,58 | .timer 1 0 alarm | halt }
  if (%atime) {
    echo -a Alarm Seted At %atime
    .timer.alarm %atime 1 1 Echo -a It's now $time Clock Addon By 4EyiezINC
    .timer.alarm2 %atime 1 1 beep 10 2 
    .timer.alarm4 %atime 1 1 unset %alarm
  }
}
alias sd {
  if $window(@Clock) == $null { echo -a Clock Addon Isn't Working You Can't Set A ShutDown Now | halt }
  if ((%sdtimer != $null) && ($1 == stop)) { .timer.shutdown* off | unset %sdtimer | unset %shutdown | echo -a ShutDown Stoped | halt }
  if (%wtrd == $null) { findrundll $1 | halt }
  if ($1) { set %sdtimer $1 }
  else { set %sdtimer $$?="Enter time like 14:30" }
  if (%sdtimer == $null) { echo -a No time set ShutDown is not working | halt }
  if ($left(%sdtimer,1) == +) {
    .timer.shutdown* off
    .timer.shutdown 1 $calc(60 * $right( %sdtimer,-1)) run %wtrd user.exe,ExitWindows
    echo -a ShutDown seted $calc(60 * $right( %sdtimer,-1)) Seconds Later
    set %shutdown 1
    halt
  }
  if ($numtok(%sdtimer,58) != 2) || ($gettok(%sdtimer,1,58) < 0) || ($gettok(%sdtimer,1,58) > 24) || ($gettok(%sdtimer,2,58) < 0) || ($gettok(%sdtimer,2,58) > 59) { Echo Time format is not correct | unset %sdtimer,2,58 | .timer 1 0 sd | halt }
  if (%sdtimer) {
    .timer.shutdown* off
    .timer.shutdown %sdtimer 1 1 run %wtrd user.exe,ExitWindows
    echo -a ShutDown seted %sdtimer Seconds Later
    set %shutdown 1
    unset %sdtimer,2,58
  }
}
alias -l findrundll {
  set %tempsd $1
  set %l 0
  set %mifc $findfile(c:\,rundll.exe,%l)
  window -lp @Shutdown @Shutdown
  aline @Shutdown Select Rundll To Use At Shutdown Process
  inc %l
  : next 
  aline @Shutdown $findfile(c:\,rundll.exe,%l)
  inc %l
  if %l != $calc(%mifc + 1) goto next else end
  : end
  unset %mifc %l
}
menu Menubar {
  Clock
  .%cton: set %cton (-ON-) | set %ctoff OFF | time on
  .%ctoff: time off
  .-
  .Load At Startup
  ..%Lsuon:{ set %lsu 1 | set %Lsuon (-ON-) | set %Lsuoff OFF | echo -a Clock Addon Added At Startup }
  ..%Lsuoff:{ set %Lsuon ON | set %Lsuoff (-OFF-) | echo -a Clock Addon Removed From Startup }
  .$iif($window(@Clock),Shadow)
  ..%shon: set %shadow 1 | set %shon (-ON-) | set %shoff OFF
  ..%shoff:{ set %shon ON | set %shoff (-OFF-) | unset %shadow | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos -2) $calc(%ypos -2) %hou | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +16) $calc(%ypos -2) : | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +23) $calc(%ypos -2) %min | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +40) $calc(%ypos -2) : | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +47) $calc(%ypos -2) %sec }
  .$iif($window(@Clock),Alarm)
  ..Set: alarm $$?="Enter Time Like 14:30"
  ..$iif(%alarm,Stop): alarm Stop
  .$iif($window(@Clock),ShutDown)
  ..Set: sd $$?="Enter Time Like 14:30"
  ..$iif(%shutdown,Stop): unset %shutdown | sd Stop 
}
menu @clock {
  Shadow
  .%shon:set %shadow 1 | set %shon (-ON-) | set %shoff OFF
  .%shoff:{ set %shon ON | set %shoff (-OFF-) | unset %shadow | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos -2) $calc(%ypos -2) %hou | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +16) $calc(%ypos -2) : | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +23) $calc(%ypos -2) %min | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +40) $calc(%ypos -2) : | drawtext @Clock %colorbg %colorfont 20 $calc(%xpos +47) $calc(%ypos -2) %sec }
  Alarm
  .Set:alarm $$?="Enter Time Like 14:30"
  .$iif(%alarm,Stop): alarm Stop
  ShutDown
  .Set:sd $$?="Enter Time Like 14:30"
  .$iif(%shutdown,Stop):unset %shutdown | sd Stop 
  Close: time off
}
menu @Shutdown {
  dclick {
    set %cdline $line(@Shutdown,$$1)
    if (Shutdown isin %cdline) { halt }
    set %wtrd %cdline
    unset %cdline
    echo -s %wtrd Will Be Using Shutdown Process
    if (%tempsd != $null) { sd %tempsd | unset %tempsd }
    window -c @Shutdown
  }
  Close:window -c @Shutdown
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.