Advertisement
Guest User

ngu auto merger

a guest
Feb 15th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6. s := 100
  7.  
  8. d := 50 ; distance between items
  9.  
  10. Loop {
  11.     Sleep, 1000
  12.     if (GetKeyState("CapsLock", "T")) {
  13.         MouseGetPos, x0, y0
  14.         ny := 0
  15.         Loop, 5 {
  16.             nx := 0
  17.            
  18.             Loop, 12 {
  19.                 if !(GetKeyState("CapsLock", "T")) {
  20.                     Break, 2
  21.                 }
  22.                
  23.                 ; Merge step
  24.                 Loop, 2 {
  25.                     MouseMove, x0+nx*d, y0+ny*d, 100
  26.                     Sleep, s
  27.                     Send {d}
  28.                     Sleep, s
  29.                 }
  30.                 nx++
  31.             }
  32.             ny++
  33.         }
  34.         MouseMove, x0, y0
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement