PicWin Clock

By BlueThen on Mar 25, 2008

A PicWin clock. It may be a small snippet, but you won't believe how long it took me to figure out all the angle math and stuff. :/

But! It's neat, and a lot better than your average "dialog clock."

Image

Updates:
Fixed the hand sizes. ;o
Fixed the text up a bit, made it look cleaner.
Added in numbers (3,6,9,12).
Changed some of the colors.
Added AM/PM
Added in the date.
Made it even more pretty.
Centered the clock a bit.

;Clock 1.05
;Made by BlueThen on March 25, 2008.
;Last updated March 26, 2008.
;To install, paste this code into your remotes (alt + r)
;and type /time or right click the channel or status window and click Time.
;Visit BlueThen.com for more scripts and snippets.
menu channel,status {
  .Time: {
    time
  }
}
alias time {
  window -poCzdk0 +tnbL @Time -1 -1 200 200
  window -poChzdk0 +tnbL @buffer -1 -1 800 800
  %time.o = n
  time.r
  .timertime 0 1 time.r
}
alias -l time.r {
  if (%time.o != y) {
    clear @buffer
    drawfill @buffer 0 0 1 1
    drawdot @buffer 14 300 420 340
    drawdot @buffer 1 300 400 360
    drawdot @buffer 0 290 400 360
    drawtext @buffer 1 Tahoma 50 375 85 12
    drawtext @buffer 1 Tahoma 50 645 330 3
    drawtext @buffer 1 Tahoma 50 385 580 6
    drawtext @buffer 1 Tahoma 50 125 330 9
    drawtext @buffer 14 Tahoma 40 23 -8 Made By BlueThen
    drawtext @buffer 12 Tahoma 40 20 -5 Made By BlueThen
    drawtext @buffer 14 Tahoma 40 503 -8 BlueThen.com 
    drawtext @buffer 12 Tahoma 40 500 -5 BlueThen.com 
    drawtext -p @buffer 14 Tahoma 40 14 636  $+ $date 
    drawtext -p @buffer 1 Tahoma 40 10 640  $+ $date 
    drawtext @buffer 14 Tahoma 70 675 605 $asctime(TT)
    drawtext @buffer 1 Tahoma 70 670 610 $asctime(TT)
    drawtext -p @buffer 14 Tahoma 40 494 636  $+ $asctime(h:nn:ss) 
    drawtext -p @buffer 1 Tahoma 40 490 640  $+ $asctime(h:nn:ss) 
    drawline @buffer 4 10 400 360 $calc(400 + (250 * $cos($calc(90+((60-$asctime(s))*6))).deg)) $calc(360 - (250 * $sin($calc(90+((60-$asctime(s))*6))).deg))
    drawline @buffer 10 10 400 360 $calc(400 + (150 * $cos($calc(90+((12-$asctime(h))*30))).deg)) $calc(360 - (150 * $sin($calc(90+((12-$asctime(h))*30))).deg))
    drawline @buffer 1 10 400 360 $calc(400 + (250 * $cos($calc(90+((60-$asctime(n))*6))).deg)) $calc(360 - (200 * $sin($calc(90+((60-$asctime(n))*6))).deg))
    drawcopy -m @buffer 0 0 800 800 @time 0 0 200 200
  }
}
on *:close:@time: {
  %time.o = y
  .timertime off
  window -c @buffer
}

Comments

Sign in to comment.
Mitchell   -  Apr 28, 2008

this script looks pretty neat, and useful. I will try it out when I get home. looks great though, keep it up :)

 Respond  
EL   -  Mar 27, 2008

Lol.Yeah man its cool,good work i kinda like this picwin stuff seen 2 outta yeah mite try one some time O_o\" maybe if i ever code something releasable LOL.

 Respond  
BlueThen   -  Mar 26, 2008

Thanks. I\'ll upload one.

 Respond  
Hawkee   -  Mar 26, 2008

If you don\'t want your screenshot to be your avatar you can add another image and make that your default.

 Respond  
BlueThen   -  Mar 26, 2008

No problem.

 Respond  
Hawkee   -  Mar 26, 2008

Thanks, I don\'t have mIRC on my Mac so it\'s nice to see what everybody else is seeing.

 Respond  
BlueThen   -  Mar 26, 2008

Ok, Hawkee. Done.

 Respond  
Hawkee   -  Mar 26, 2008

How about a screenshot Blue?

 Respond  
BlueThen   -  Mar 26, 2008

Update! I made it prettier. o.o

 Respond  
BlueThen   -  Mar 26, 2008

Yeah, but to be honest, I can read a traditional clock, but takes me a few seconds to figure it out. o.o

 Respond  
EL   -  Mar 26, 2008

lol wait till you try to reconnect kween Eugene >D

@BlueThen yea i understand but who the hell can\'t read a traditional clock lol are we that deluted by technology come on you should be able to read a damn clock no matter wat the format.

 Respond  
Eugenio   -  Mar 26, 2008

BlueThen dont listen to EL he doesnt know what hes talking about :o

/me slaps EL

Its a good script and I agree with the digital part.

 Respond  
BlueThen   -  Mar 26, 2008

lol.

You see, I\'m not doing this for accuracy of the clock, but more so accuracy of the operator. Who know\'s, the operator could be more used to digital clocks, so he can just glance at the digital clock segment for quick reference, or vice versa, if the operator is more used to reading traditional clocks.

It may seem weird, but the traditional clock is for a general reference, and the digitial clock is for the exact time.

 Respond  
EL   -  Mar 26, 2008

LOL what are you serious man? Come on your havea traditional hand clock that tells the time are its correct if it goes by the damn computers clock then its correct asuming they arent lame it fuck that up.So there\'s no point to the digitial part at all in fact you mite as well take out the whoel damn thing and just leave the digitial clock an call it a day serously its ruining the code..just stop an think about it for a few seconds an let it sink in its a awesoem code please don\'t get me wrong in fact i ll rate it high but you have to think common sense here man.\"Rate it or Hate it?\"...9/10.`-.-

 Respond  
BlueThen   -  Mar 26, 2008

I added in the date, but keeping the digital clock for accuracy. Sorry, but I don\'t think it really needs to make sense.

 Respond  
EL   -  Mar 26, 2008

er take out the damn digitial part of the code:

    drawtext @buffer 14 Tahoma 70 20 610 $asctime(h:nn:ss)

It makes no sense to me.Add this in its place:

    drawtext @buffer 14 Tahoma 50 20 630 $date
 Respond  
BlueThen   -  Mar 26, 2008

Thanks, man.

 Respond  
Eugenio   -  Mar 26, 2008

Nice one I\'ll make it a 9 since you added the PM lol :p

 Respond  
BlueThen   -  Mar 26, 2008

Done. :)

 Respond  
Eugenio   -  Mar 26, 2008

Its alot nicer now .....but the time is wrong .......its meant to be 19:27 not 7:27 or you should add PM when its night. 8/10 =]

 Respond  
BlueThen   -  Mar 26, 2008

Ok, I added in 3, 6, 9, and 12. I also fixed up the text (moved the \"made by\" part to the top), and I added some colors too.

 Respond  
EL   -  Mar 26, 2008

Yeah i was being sarcastic man.Still get rid of the flamer digitial part makes no sense an oh yeah add some numbers or ascii or something to represent 1-12 make it all fancey.

 Respond  
BlueThen   -  Mar 26, 2008

But making just a digital one would be the easy way out. :( I wanted my clock to be pretty and especially special in a special kind of way.

 Respond  
EL   -  Mar 26, 2008

Umm dude im gettin the time on the bottom left side and its in digitial format?..Um makes no sense ti have traditional an digitial together..you could have just made it digitial and called it a day O_o..nyx the damn digitial part.

 Respond  
BlueThen   -  Mar 25, 2008

Woops! My bad, hehe, fixed.

 Respond  
napa182   -  Mar 25, 2008

it looks like you have the big hand doing the hour and the small hand doing the min\'s kinda backwards dont ya think..

 Respond  
BlueThen   -  Mar 25, 2008

Thanks, I\'ll try and make it cleaner next time.

 Respond  
Eugenio   -  Mar 25, 2008

Menu works fine for me but I deleted that part anyway ....I onli keep menu parts for scripts I use all the time ......this script works but I dont like the way you set things out it doesnt look very nice tbh. 7/10

 Respond  
BlueThen   -  Mar 25, 2008

It shows the time based off of your operating system, and I don\'t know why the bottom isn\'t showing, it works fine for me. :/

The menu works, atleast for me it does... I don\'t see how adding a \".\" and shortening it a line would effect it much.

 Respond  
napa182   -  Mar 25, 2008

also it\'s not showing the right time for me, and the bottom of the clock is missing.

 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.