Guest User

ahk 4.0 manual

a guest
Jul 16th, 2020
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. ^S::
  2.  
  3. loop {
  4.  
  5. ToolTip, Go To choose Character Screen (Loop %A_index%), 0, 0
  6.  
  7. Sleep, 750
  8. Send {p} ; menu
  9. Sleep, 750
  10.  
  11. send {right}
  12. sleep ,750
  13. send {right}
  14. sleep ,750
  15. send {right}
  16. sleep ,750
  17. send {right}
  18. sleep ,750
  19. send {right}
  20. sleep ,750
  21. send {enter}
  22. sleep ,750
  23.  
  24. sleep ,750
  25. send {down}
  26. sleep ,750
  27. send {down}
  28. sleep ,750
  29. send {down}
  30. sleep ,750
  31. send {down}
  32.  
  33. sleep,750
  34. send {enter}
  35. sleep, 750
  36. send {enter}
  37.  
  38. ToolTip, Wating For Swap Character Screen Confirmation (Loop %A_index%), 0, 0
  39.  
  40. Loop {
  41. Sleep, 500
  42. PixelGetColor, color, 785,586
  43. Sleep, 500
  44. } Until (color="0xF4F4F4") ; character select screen confirmation
  45.  
  46. ToolTip,Switching To First Character And Disconnecting , 0, 0
  47.  
  48. Sleep, 500
  49. Send {Left} ; 1st char
  50. Sleep, 1000
  51. Send {Enter}
  52. Sleep, 5000
  53.  
  54. ;-------------------------------Edit The Directory Here-------------------------------
  55.  
  56. cmdline := "netsh advfirewall firewall add rule name=""BATCH GTA 5 BLOCK"" dir=out action=block program=""E:\gta v\GTAV\GTA5.exe"""
  57. runwait, %cmdline%,, Hide
  58.  
  59. ;-------------------------------------------------------------------------------------
  60.  
  61. Sleep, 5000
  62. Send {Enter}
  63. Sleep, 50
  64.  
  65. cmdline := "netsh advfirewall firewall delete rule name=""BATCH GTA 5 BLOCK"""
  66. runwait, %cmdline%,, Hide
  67.  
  68. Sleep, 7000
  69. Send {Enter}
  70.  
  71.  
  72. Sleep, 7000
  73. Send {Enter}
  74.  
  75. ToolTip, Suspending And Wating For Second Character To Load (Loop %A_index%), 0, 0
  76.  
  77. ;-----Suspend
  78.  
  79. Sleep 45000
  80. Process_Suspend("GTA5.exe")
  81. Sleep, 15000
  82. Process_Resume("GTA5.exe")
  83.  
  84. ;-----------xxxxxxxxxxxx----------------
  85.  
  86. ;----Suspend Function
  87. Process_Suspend(PID_or_Name){
  88. PID := (InStr(PID_or_Name,".")) ? ProcExist(PID_or_Name) : PID_or_Name
  89. h:=DllCall("OpenProcess", "uInt", 0x1F0FFF, "Int", 0, "Int", pid)
  90. If !h
  91. Return -1
  92. DllCall("ntdll.dll\NtSuspendProcess", "Int", h)
  93. DllCall("CloseHandle", "Int", h)
  94. }
  95.  
  96. ;----Resume Function
  97. Process_Resume(PID_or_Name){
  98. PID := (InStr(PID_or_Name,".")) ? ProcExist(PID_or_Name) : PID_or_Name
  99. h:=DllCall("OpenProcess", "uInt", 0x1F0FFF, "Int", 0, "Int", pid)
  100. If !h
  101. Return -1
  102. DllCall("ntdll.dll\NtResumeProcess", "Int", h)
  103. DllCall("CloseHandle", "Int", h)
  104. }
  105. ProcExist(PID_or_Name=""){
  106. Process, Exist, % (PID_or_Name="") ? DllCall("GetCurrentProcessID") : PID_or_Name
  107. Return Errorlevel
  108. }
  109. ;------
  110.  
  111. Loop {
  112. Sleep, 5000
  113. Send {Up}
  114. PixelGetColor, color, 653, 318
  115. } Until (color="0x000000")
  116.  
  117. ;------------------xxxxxxxxxxxxxx------------------
  118.  
  119. ToolTip, Sell Apts and/or CEO Office Manualy Now, 0, 0
  120. Sleep, 10000
  121.  
  122. ToolTip, leave gta online and Go to single player manually, 0,0
  123. ToolTip, After loading in single player Press CTRL R to reload and CTRL S to begin, 0, 0
  124. Sleep, 25000
  125.  
  126.  
  127. ^r::Reload
  128.  
  129. Sleep, 1500
  130. }
  131. ^Esc::ExitApp
Add Comment
Please, Sign In to add comment