Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1.  
  2. #NoEnv
  3. #SingleInstance force
  4.  
  5.  
  6. ; Simplify tray menu
  7. Menu, Tray, NoStandard
  8. Menu, Tray, Add, Reload, ReloadScript
  9. Menu, Tray, Add, Edit Script, EditScript
  10. Menu, Tray, Add, Exit, ExitScript
  11. Menu, Tray, Default, Reload
  12. if FileExist(A_ScriptDir . "\icon.ico")
  13. Menu, Tray, Icon, %A_ScriptDir%\icon.ico
  14.  
  15. ; Create crosshair overlay
  16. Gui xh: New
  17. Gui xh: Add, Picture, c000000 Background000000 altsubmit BackgroundTrans, ch.png
  18. Gui xh: +Owner +AlwaysOnTop +LastFound -Caption +ToolWindow +E0x20
  19. Gui xh: Color, 000000
  20. WinSet, TransColor, 000000
  21. GUI xh: Cancel
  22. active := false
  23.  
  24. ; Show while game is active
  25. Loop {
  26. if (active) {
  27. WinWaitActive, ahk_exe GTA5.exe
  28. {
  29. Gui xh: Show, NA Center
  30.  
  31. WinWaitNotActive, ahk_exe GTA5.exe
  32. {
  33. Gui xh: Cancel
  34. }
  35. }
  36. }
  37. }
  38. return
  39.  
  40. ; Menu methods
  41. ReloadScript:
  42. Reload
  43. return
  44.  
  45. EditScript:
  46. RunWait, notepad %A_ScriptFullPath%
  47. Reload
  48. return
  49.  
  50. ExitScript:
  51. ExitApp
  52. return
  53.  
  54. RControl::
  55. if (!active) {
  56. active := true
  57. }
  58. else {
  59. active := false
  60. }
  61. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement