ZodoTurtle

Transparent Overlay Clock

Mar 3rd, 2021 (edited)
761
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;  Created by ZodoTurtle - 2021-03-02
  2. ;
  3. ; Always on top Overlay clock.
  4. ; Click the text to select and Alt-X to exit
  5. #Persistent
  6.  
  7. OSD_Clock_v = 0
  8. OSD_Clock()
  9. {
  10.     global OSD_Clock_v
  11.     global ClockInfo, S1, S2, S3, S4
  12.  
  13.     if (OSD_Clock_v = 0)
  14.     {
  15.         OSD_Clock_v = 1
  16.  
  17.         ; Set Defaults
  18.         X = 900 ; Left/Right Position
  19.         Y = -4   ;   Up/Down  Position
  20.         FontSize = 32
  21.         Border = 2
  22.  
  23.         Gui, Font, s%FontSize% w1000 q3, Arial
  24.         Gui, +LastFound +AlwaysOnTop -Caption +ToolWindow
  25.         Gui, Color, 000001
  26.         Winset, TransColor, 000001 150
  27.  
  28.         FormatTime, Time,, HH:mm
  29.         SetTimer OSD_Clock_Update, 1000 ; update clock every 5 seconds
  30.  
  31.         B1 := Border
  32.         B2 := B1+B1
  33.         ; Shadow Outline
  34.         Gui, Font, c000000
  35.         Gui, Add, Text, BackgroundTrans vS1 x0 y0, %Time%
  36.         Gui, Add, Text, BackgroundTrans vS2 x%B2% y0, %Time%
  37.         Gui, Add, Text, BackgroundTrans vS3 x0 y%B2%, %Time%
  38.         Gui, Add, Text, BackgroundTrans vS4 x%B2%  y%B2%, %Time%
  39.  
  40.         ; Clock
  41.         Gui, Font, cffff00
  42.         Gui, Add, Text, BackgroundTrans vClockInfo x%B1% y%B1%, %Time%
  43.  
  44.         Gui, Show, NoActivate x%X% y%Y%
  45.     }
  46.     else
  47.     if (OSD_Clock_v = 1)
  48.     {
  49.         OSD_Clock_v = 2
  50.         Gui, Hide
  51.         SetTimer OSD_Clock_Update, Off
  52.     }
  53.     else
  54.     if (OSD_Clock_v = 2)
  55.     {
  56.         OSD_Clock_v = 1
  57.         Gui, Show, NoActivate
  58.         Gosub OSD_Clock_Update
  59.         SetTimer OSD_Clock_Update, On
  60.     }
  61. }
  62.  
  63. OSD_Clock_Update:
  64.     FormatTime, Time,, HH:mm
  65.     GuiControl, , ClockInfo, %Time%
  66.  
  67.     GuiControl, , S1, %Time%
  68.     GuiControl, , S2, %Time%
  69.     GuiControl, , S3, %Time%
  70.     GuiControl, , S4, %Time%
  71.  
  72.     Return
  73.  
  74. !#t::OSD_Clock()
  75.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×