mIRC Clock

By LIQUID_NiTrO on Apr 12, 2005

I got a bit bored so I decided to create an mIRC clock, which is displayed in the bottom right corner, just above the edit bar and just to the left of the scroll bar. It can display the time in either AM/PM format or "Military" time, changeable via radio buttons. By default it will open automatically when mIRC starts, but if you close it within 60 seconds of starting mIRC it will prompt you if you wish to disable that feature.
/startclock will open the clock if it is not already open.
Just thought I'd also add that for you fellow scripters out there this also includes an alias to return the current time in AM/PM format ($wtime)
Note: This clock does not synchronize with your system clock. The difference in time between the two will be less than a second.

alias startclock {
  if ( %co ) {
    beep 5 100
    halt
  }
  dialog -mo clock clock
}
alias -l utime {
  if ( !$did(clock,20) ) {
    .timercd off
  }
  did -r clock 20
  did -a clock 20 $iif(%umt,$time,$wtime)
}
alias wtime {
  if ( !$isid ) { halt }
  return $iif($gettok($time,1,58) <= 12,$time AM,$calc($gettok($time,1,58) - 12) $+ : $+ $deltok($time,1,58) PM)
}
alias -l cclose {
  var %x = $input(Would you like to stop displaying the clock on start?,yqv,Clock Options)
  if ( %x == $yes ) {
    set %ntime 1
    echo $colour(info) -a * Clock set to stop displaying on start
  }
}
on *:START: {
  if ( !%ntime ) {
    startclock
    .timerdconf 1 60 return
  }
}
on *:DIALOG:clock:close:0: {
  if ( $timer(dconf) ) {
    .timerf 1 0.0001 cclose
  }
  .timercd off
  if ( $timer(dconf) ) { .timerdconf off }
  unset %co
}
on *:DIALOG:clock:init:0: {
  set %co 1
  if ( %umt ) {
    did -c clock 5
    did -u clock 6
  }
  else {
    did -c clock 6
    did -u clock 5
  }
  did -a clock 20 $iif(%umt,$time,$wtime)
  .timercd 0 1 utime
}
on *:DIALOG:clock:sclick:5: {
  did -u clock 6
  if ( !%umt ) {
    set %umt 1
  }
  did -r clock 20
  did -a clock 20 $time
}
on *:DIALOG:clock:sclick:6: {
  did -u clock 5
  if ( %umt ) {
    unset %umt
  }
  did -r clock 20
  did -a clock 20 $wtime
}
dialog clock {
  title "Clock"
  size 843 648 79 18
  option dbu
  edit "", 20, 15 8 50 10, read
  radio "AM/PM", 6, 0 -1 50 10
  radio "Military", 5, 50 -1 50 10
}
on *:APPACTIVE: {
  if ( !$appactive ) {
    dialog -n clock
  }
  else {
    dialog -o clock 
  }
}
Sign in to comment.
HoboPickle   -  Aug 29, 2011

Aha2Y: http://vvcap.net/db/ahznxqHTOJRGhpxZyvP4.png is what it looks like for me. Freely movable for me. FURBY* : I know it was an uber necro, but I wanted to point out that it is actually extremely useful for people who use >1 monitors and don't display their taskbar on both screens... if not for one litttttle bug.

I'm not sure if this is a problem with the script, or my OS, or with firefox. When I have the script running with mirc not taking up my entire second screen and I click on firefox behind mIRC, the firefox screen becomes 'active' but mIRC still stays on top. I have to alternate between the two windows numerous times before firefox finally becomes the "top" window. Using Win7 Ultimate 64bit.

 Respond  
Aha2Y   -  Aug 29, 2011

Can someone make a screenshot of the clock? :)

 Respond  
F*U*R*B*Y*   -  Aug 29, 2011

dude fucking awesome bump there...

way to necro a dead thread :)

 Respond  
HoboPickle   -  Aug 28, 2011

I like it, and it is actually quite useful to me. I run two monitors and game runs full screen on the main one with mIRC showing on the second, since I don't have a taskbar to look at I can simply look at this now. Thanks.

 Respond  
F*U*R*B*Y*   -  Jan 07, 2007

This is far more useless than you said that spy script at http://www.hawkee.com/snippet.php?snippet_id=2245 is! Did you know there\'s a clock in our system tray? It shows us the time whenever we want!

LMFAO!!!!

 Respond  
technick2   -  Jan 07, 2007

This is far more useless than you said that spy script at http://www.hawkee.com/snippet.php?snippet_id=2245 is! Did you know there\'s a clock in our system tray? It shows us the time whenever we want!

 Respond  
DarthReven   -  Apr 13, 2005

i prefer the clock that i have on my title bar its much simpler but this is really nice

 Respond  
supergeo   -  Apr 12, 2005

Great Job!

 Respond  
xDaeMoN   -  Apr 12, 2005

Nice

 Respond  
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.