Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. #SingleInstance force
  2.  
  3. Gosub,currentTime
  4. Gosub,updateGui
  5. SetTimer,currentTime,500
  6.  
  7. FillCount := 1
  8. ResetTime := A_TickCount
  9. CurrentTime := A_TickCount
  10. Difference := CurrentTime - ResetTime
  11.  
  12. Gui,-border -caption +alwaysontop +disabled +owner -sysmenu
  13. Gui,color,green
  14. Gui,add,Text, vCount w30 h11 +center,%FillCount%
  15. Gui,add,Text, vTime w30 h11 +center,%Difference%
  16. Gui,show
  17.  
  18.  
  19. Loop
  20. {
  21.  
  22. ifWinExist, ahk_class SunAwtFrame
  23. {
  24. ifWinActive, ahk_class SunAwtFrame
  25. {
  26. Gui,+alwaysontop
  27. }
  28. else
  29. {
  30. Gui,-alwaysontop
  31. }
  32. WinGetPos,orx,ory,width,height, ahk_class SunAwtFrame
  33. winX := orx + 719
  34. winY := ory + 54
  35. Gui,show,NA x%winX% y%winy%
  36. Sleep,500
  37. }
  38. else
  39. {
  40. Gui,Submit
  41. Sleep,2000
  42. }
  43. }
  44. return
  45.  
  46. NumPad7::
  47. FillCount += 1
  48. if(Fillcount > 9)
  49. {
  50. FillCount = 1
  51. }
  52. if(FillCount >= 8)
  53. {
  54. if(FillCount = 9)
  55. {
  56. Gui,color,red
  57. }
  58. else
  59. {
  60. Gui,color,yellow
  61. }
  62. }
  63. else
  64. {
  65. Gui, color, green
  66. }
  67. ResetTime = %A_TickCount%
  68. GuiControl,text,Count,%FillCount%
  69. GuiControl,text,Time,0
  70. return
  71.  
  72. currentTime:
  73. CurrentTime = %A_TickCount%
  74. gosub,updategui
  75. return
  76.  
  77. updateGui:
  78. difference := (CurrentTime - ResetTime)
  79. difference /= 1000
  80. GuiControl,text,Time,%difference%
  81. return
  82.  
  83. Escape::
  84. ExitApp
  85. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement