Guest User

Untitled

a guest
Aug 21st, 2019
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5. ;display the date and time, useful for print screen
  6. #singleinstance force
  7. timerm := "00"
  8. timers := "00"
  9. Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption
  10. Gui, Color, 000000
  11. Gui, Font, cffa500 s45 bold, gruppo ;red
  12. ;Gui, Font, c000000 s7 , verdana ;black
  13. ;Gui, Font, cFFFFFF s7 , verdana  ;white
  14. ;Gui, Add, Text, vD y0 BackgroundTrans, %A_YYYY%-%A_MM%-%A_DD% %a_hour%:%a_min%:%a_sec%
  15. Gui, Add, Text, vD y0 BackgroundTrans,  %a_hour%:%a_min%:%a_sec%
  16. Gui, Add, Text,  y110 BackgroundTrans vTText gstopwatchgo, %timerm%:%timers%
  17. Gui, font,bold
  18.  
  19. Gui, Show, NoActivate x750 y3,uptime  ; screen position here
  20. WinSet, TransColor, 000000 255,uptime
  21. SetTimer, RefreshD, 1000
  22. ;return
  23. OnMessage(0x201, "WM_LBUTTONDOWN")
  24. WM_LBUTTONDOWN()
  25. {
  26.     PostMessage, 0xA1, 2,,, uptime
  27. }
  28.  
  29. RefreshD:
  30. GuiControl, , D,  %a_hour%:%a_min%:%a_sec%
  31. return
  32.  
  33.  
  34.  
  35.  
  36.  
  37. Settimer, Stopwatch, 1000
  38. Return
  39.  
  40. Stopwatch:
  41. timers += 1
  42. if(timers > 59)
  43. {
  44.     timerm += 1
  45.     timers := "0"
  46.     GuiControl, , TText ,  %timerm%:%timers%
  47. }
  48. if(timers < 10)
  49. {
  50.     GuiControl, , TText ,  %timerm%:0%timers%
  51. }
  52. else
  53. {
  54.     GuiControl, , TText ,  %timerm%:%timers%
  55. }
  56. return
  57.  
  58. stopwatchgo:
  59. Settimer, Stopwatch, 1000
RAW Paste Data