Advertisement
Guest User

Untitled

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