End of day .. *sigh*

By Jonesy44 on Apr 28, 2008

Hehe, any of you at work may like this, countdown style thingy :P
It's pretty useless, but i had fun making it :D

alias day {
  window - $+ $iif(!$dialog(@day),p,a) @day
  day.ini
  .timerday 0 1 day.ini
}
alias day.ini {
  clear @day
  drawrect -f @day 1 1 10 10 1000 50
  var %intoday = $calc(((($time(HH)) * 60) * 60) + ($time(nn) * 60) + $time(ss))), %intodayscale = $calc(((($time(HH) * 60) * 60) + ($time(nn) * 60) + $time(ss)) / 86400 * 1000)
  drawrect -f @day 11 11 10 10 %intodayscale 50
  if (%day.mark) {
    drawline @day 14 1 %day.mark 30 %day.mark 200
    var %day.mark.secs = $calc(((%day.mark - 10) / 1000) * 86400)
    if (%intoday > %day.mark.secs) {
      var %day.mark.diff = ( $+ $duration(%day.mark.secs,3) $+ ) $duration($calc(%intoday - %day.mark.secs),1) past
    }
    else {
      var %day.mark.diff = ( $+ $duration(%day.mark.secs,3) $+ ) $duration($calc(%day.mark.secs - %intoday),1) to go
    }
    drawtext @day 14 $calc(%day.mark / 1.23) 205 %day.mark.diff
  }
  drawrect @day 14 1 10 10 1000 50
  drawtext @day 10 10 70 $round($calc(%intodayscale / 10),2) $+ % - $duration($calc(86400 - %intoday),1) until the end of the day !
}
menu @day {
  sclick {
    if ($mouse.x >= 10 && $mouse.x <= 1010 && $mouse.y >= 10 && $mouse.y <= 60) {
      .timerdragday 0 0 day.drag
    }
    else {
      unset %day.mark
      day.ini
    }
  }
  drop {
    .timerdragday off
    day.ini
  }
}
alias day.drag {
  set %day.mark $mouse.x
  day.ini
}
on *:CLOSE:@day: { 
  .timerday off
  .timerdragday off
}

Comments

Sign in to comment.
Jonesy44   -  Apr 30, 2008

Updated: You can now drag the bar thingy accross rather than continuous clicking :P

 Respond  
Jonesy44   -  Apr 29, 2008

lol, ty :D

 Respond  
ZiX   -  Apr 29, 2008

Very Nice Script Jonesy44, 7/10

 Respond  
Jonesy44   -  Apr 28, 2008

forgot to say, click the bar to add a timer of your own, click on the white elsewhere to remove it.

Screen res needs to be 1280 ish +

 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.