mIRC Clock

By Mpdreamz on Nov 24, 2005

A Clock for mirc which will be displayed in the upper right corner of a channel and query. For those of us who think Timestamps and Windows own clock in the systray just isnt enough :p

Usage: Type /mirc.clock in a channel or query window
type /closeclock to stop updating.

;tnxs KuTsuM for throwing "" in my face and making me code it so it 
;works on all channels/queries as originaly it only did it for 1.
alias mirc.clock {
  var %w = $iif($1,$iif($window($active).type == channel || $window($active).type == query,$active,$1),$active) ,%m = 0 , %h = 0
  if (!$window(@@c)) { window -pfh @@c 1 1 170 170 | window -pfh @@@c 1 1 170 170 }
  clear -n @@c
  var %m = 0 , %h = 0
  if (!$1) {
    while (%m <= 354) {
      drawdot -nr @@@c 0 1 $circle(70,70,100,%m,1)
      drawdot -nr @@@c $rgb(255,0,0) 4 $circle(70,70,100,%h,1)
      inc %m 1
      inc %h 30
    }
    drawdot @@@c
  }
  elseif $1 { drawcopy -n @@@c 0 0 170 170 @@c 0 0 170 170 }
  tokenize 58 $time
  drawline -nr @@c 0 2 70 70 $circle(70,70,80,$2,6)
  drawline -nr @@c 0 5 70 70 $circle(70,70,60,$calc($1 + ($2 / 60)),30)
  drawline -nr @@c 0 1 70 70 $circle(70,70,95,$3,6)
  drawdot @@c
  drawsave @@c $+(",$scriptdirclock.bmp,")
  background -p %w $+(",$scriptdirclock.bmp,")
  .timerclock -m 1 500 mirc.clock %w
}
alias -l closeclock { timerclock off | window -c @@c | window -c @@@c }
alias -l circle {
  var %xx = $calc(($4 * $5) -90) , %x = $calc(((($3 /2) * $cos(%xx).deg)) + $1) , %y = $calc(((($3 /2) * $sin(%xx).deg)) + $2)
  return %x %y
} 

Comments

Sign in to comment.
RagBot   -  Jun 20, 2008

How am i supose to clear it

 Respond  
EL   -  Apr 20, 2008

-.- MIRC.INI ...never said i could spell...

 Respond  
EL   -  Apr 20, 2008

Er you need to clear it from your mic.ini ffs

 Respond  
EL   -  Apr 19, 2008

I cant get shut of the red round circle in all my windows any ideas pls i tried the code but nothing happned :(

Umm yea im havein the same issue man its rather annoying wtf i tryed FURBY\'S alias an it does nothing but stop the timer =/

 Respond  
Starburyown   -  Apr 19, 2008

how do i set it up?

 Respond  
Baldrick   -  Oct 04, 2007

I cant get shut of the red round circle in all my windows any ideas pls i tried the code but nothing happned :(

 Respond  
F*U*R*B*Y*   -  Sep 08, 2007
alias closeclock { timerclock off | window -c @@c | window -c @@@c }

try that... :D thanks MPDream for your handy close part of the script :D

 Respond  
chocolate_pie   -  Sep 08, 2007

OH MY GOD... I can\'t get rid of the clock! Dude, I can\'t do anything with this now! HELP ME!!! :(

 Respond  
dj_boT   -  Mar 31, 2007

yeah whats wrong?i can\'t get it away.i unloaded the script,disconnected but it\'s still there...

 Respond  
Scakk   -  Mar 05, 2007

The clock will not go away even on disconnect. Any ideas?

 Respond  
Hampster   -  Sep 19, 2006

umm nice but it won\'t close even if i unload the script :S any ideas of how to get rid of it lol?

 Respond  
StanZ   -  Sep 18, 2006

Is ok.
Heh, picwin have antialiased draw! :D

 Respond  
Zachery   -  Nov 26, 2005

hmm no time :\'(

 Respond  
Mpdreamz   -  Nov 25, 2005

Hehehe no i admit the clock isnt a graphic display of a 21st digital art piece :p picwin needs antialiased draw.

 Respond  
tank59   -  Nov 25, 2005

Nevermind...i got it.

 Respond  
tank59   -  Nov 24, 2005

okay...this thing wont close for me. Any ideas? lol

 Respond  
tank59   -  Nov 24, 2005

I can see you didn\'t do very good in art...:P This is pretty sweet. Nice job. :D

 Respond  
RoninWarrior   -  Nov 24, 2005

mpdeamz no i called it from the status window and yes the -h swith was what it needed after looking at your code i understood more on why it needed and you used the 2 diffrent windows for speed etc nice work great @window display

 Respond  
xDaeMoN   -  Nov 24, 2005

Nice work Mp. =)

 Respond  
Mpdreamz   -  Nov 24, 2005

did you call the command from a channel or query ?
i forgot the -h switch (now updated), theres 2 windows as 1 is used as a buffer for the clock so it doesnt have to be drawn everytime the alias is called. this is to increase the speed of the overal drawing.

 Respond  
Sasuke   -  Nov 24, 2005

YOU SHOULD BE SORRY FOR THAT AVATAR

W T F F?

 Respond  
RoninWarrior   -  Nov 24, 2005

wow sorry for the double post :{

 Respond  
RoninWarrior   -  Nov 24, 2005

i like this idea but i did get a error * /drawcopy: invalid window (line 17, script.ini) and why so many open @windows just for 1 clock over all it would be nice to be able to set the time on it also

 Respond  
RoninWarrior   -  Nov 24, 2005

i like this idea but i did get a error * /drawcopy: invalid window (line 17, script.ini) and why so many open @windows just for 1 clock over all it would be nice to be able to set the time on it also

 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.