someone_

Untitled

Jan 11th, 2016
127
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CoordMode, Pixel
  2.  
  3. Loop
  4. {
  5.     WinGet,active,id,A
  6.     WinGet,tera,list,ahk_class LaunchUnrealUWindowsClient
  7.     Loop, %tera%
  8.     {
  9.         WinGetTitle,teratitle, % "ahk_id " tera%A_Index%
  10.         if (teratitle = "TERA") and (tera%A_Index% = active)
  11.         {
  12.             MsgBox Successfully found an active Tera window.
  13.             Found = Yes
  14.             break
  15.         }
  16.     }
  17.     if (Found = "Yes")
  18.     {
  19.         break
  20.     }
  21.     Sleep 5000
  22. }
  23.  
  24. Loop
  25. {
  26.     PixelSearch, Px, Py, 921, 0, 983, 27, 0xDEFA26, 10, Fast RGB
  27.     if ErrorLevel = 0
  28.     {
  29.         ControlSend,,{1}, % "ahk_id " active
  30.         Sleep 1000
  31.         ControlSend,,{2}, % "ahk_id " active
  32.         Sleep 1000
  33.         ControlSend,,{3}, % "ahk_id " active
  34.         Sleep 1000
  35.         ControlSend,,{4}, % "ahk_id " active
  36.         Sleep 1000
  37.         ControlSend,,{5}, % "ahk_id " active
  38.     }
  39.     Sleep 5000
  40. }
RAW Paste Data