daily pastebin goal
35%
SHARE
TWEET

Dual Monitor Taskbar Clock (dualmonclock.hta)

ibi Jun 9th, 2014 329 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <hta:application id="dualmonclock" applicationname="dualmonclock" border="dialog" borderstyle="normal"  innerborder="no" scroll="no" selection="no" caption="yes" showintaskbar="yes" contextmenu="yes" sysmenu="yes" minimizebutton="yes" maximizebutton="no" application="yes" single-instance="yes" icon="http://dev.tlr.de/res/dumoclock.ico" version="1.0"/>
  4. <title>dualmonclock</title>
  5. <script>
  6. // filename: dualmonclock.hta
  7. // (c)05/2014 by ibi
  8. function UpdateTime() {
  9.     var dDatum = new Date();
  10.     day = dDatum.getDate(); if (day <10) { day = "0"+day };
  11.     mon = dDatum.getMonth()+1; if (mon <10) { mon = "0"+mon };
  12.     year = dDatum.getFullYear();
  13.     hrs = dDatum.getHours(); if (hrs <10) { hrs = "0"+hrs };
  14.     mins = dDatum.getMinutes(); if (mins <10) { mins = "0"+mins };
  15.     secs = dDatum.getSeconds(); if (secs <10) { secs = "0"+secs };
  16.     dDateString = day + "." + mon + "." + year ;
  17.     dClockString = hrs + ":" + mins + ":" + secs;
  18.     document.title = dClockString;
  19.     document.all.datefield.innerHTML= dDateString + "<br>" + dClockString;
  20.     window.setTimeout(function() {UpdateTime()}, 1000); // refresh every second
  21.     }
  22.  
  23. </script>
  24. <style>
  25.  body, button, input, p, td, select {font-family:Segoe UI;font-size:14px}
  26.  .bigfont {font-size:20px;font-weight:bold}
  27.  .smallnote {font-family:Sans Serif;font-size:10px;padding-top:8px;line-height:90%}
  28. </style>
  29. </head>
  30. <body id="gbody" onLoad="window.resizeTo(240,180);UpdateTime()" style="background-color:#f1f1f1;margin-top:0;" text=#000000 link=#000099 vlink=#000099 alink=#000099>
  31.  
  32. <fieldset style="padding:10px">
  33. <legend>Current time is</legend>
  34. <div id="datefield" class="bigfont">
  35. initializing...
  36. </div>
  37. </fieldset>
  38.  
  39. <div class="smallnote">Note: Run this program minimized on your second monitor.</div>
  40.  
  41. </body>
  42. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top