xegaJ

Untitled

Jan 15th, 2017
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #If WinActive("RuneLoader") or WinActive("Old School RuneScape") or WinActive("OSBuddy") or WinActive("Konduit") ; This piece of code makes sure that the AHK script only works in a specific program/game window, this comes in handy if you don't feel like suspending/pausing the AHK script whenever you want to use the keys in another window such as Chrome/Netflix. Change it to "OSBuddy"/"OSBuddy Pro"/"RuneLoader" if you're using any 3rd party client.
  2.  
  3.  
  4.  
  5. #MaxThreadsPerHotkey,2
  6. 1::
  7. t:=!t
  8. While (t){
  9.     Click
  10.     SLeep 20
  11.     Click up
  12.     Random, rand, 540, 729
  13.     Sleep % rand
  14. }
  15. return
  16.  
  17. 0:: ; Pressing ` (~/console key) turns the AHK icon in your system tray to red to let you know that's it's suspended.
  18.         Suspend, Permit
  19.         if not A_IsSuspended
  20.         {
  21.                 Menu, Tray, Icon, %A_AhkPath%, 5, 1
  22.                 Suspend, On
  23.         }
  24.         else
  25.         {
  26.                 Menu, Tray, Icon, %A_AhkPath%, 1, 0
  27.                 Suspend, Off
  28.         }
  29.         return
Advertisement
Add Comment
Please, Sign In to add comment