Advertisement
Guest User

NGU auto merger

a guest
Feb 14th, 2019
88
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. variation := 0 ; Value used to shuffle the items being merged to avoid alternating items
  11.  
  12. Loop {
  13.     Sleep, 1000
  14.     if (GetKeyState("CapsLock", "T")) {
  15.         MouseGetPos, x0, y0
  16.         ny := 0
  17.         if (variation > 11) {
  18.             vatiation := 0
  19.         }
  20.         Loop, 5 {
  21.             nx := 1
  22.            
  23.             ; Variation step
  24.             MouseMove, x0+variation*d, y0+ny*d, 100
  25.             Sleep, s
  26.             Click, down
  27.             Sleep, s
  28.             MouseMove, x0, y0+ny*d, 100
  29.             Sleep, s
  30.             Click, up
  31.             Sleep, s
  32.            
  33.             Loop, 11 {
  34.                 if !(GetKeyState("CapsLock", "T")) {
  35.                     Break, 2
  36.                 }
  37.                
  38.                 ; Merge step
  39.                 Loop, 2 {
  40.                     MouseMove, x0+nx*d, y0+ny*d, 100
  41.                     Sleep, s
  42.                     Click, down
  43.                     Sleep, s
  44.                     MouseMove, x0, y0+ny*d, 100
  45.                     Sleep, s
  46.                     Click, up
  47.                     Sleep, s
  48.                 }
  49.                 nx++
  50.             }
  51.             ny++
  52.         }
  53.         variation++
  54.         MouseMove, x0, y0
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement