SHARE
TWEET

autosplitter.ahk

tzoonami Mar 18th, 2016 (edited) 133 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ^j:: ; CONFIG: Set this to whatever you want your autosplit activate hotkey to be. Check https://www.autohotkey.com/docs/Hotkeys.htm for more exhaustive information on the syntax for this.
  2.     WinGetTitle, OldTitle, A
  3.     WinActivate, Snes9X ; CONFIG: Set this to the name of your preview window that you want to check for the black screen. (It doesn't have to be the full title, the title of the window just has to start with what you search for)
  4.     Loop
  5.     {
  6.         foundX := ""
  7.         ImageSearch, foundX, foundY, 0, 0, 1000, 1000, *10 blackscreen.png ; CONFIG: You can put a direct path to blackscreen.png here too.
  8.         if (foundX == "") {
  9.             continue
  10.         }else {
  11.             WinActivate, LiveSplit ; CONFIG: Change this to the title of your timer program
  12.             Send {Numpad1} ; CONFIG: Change {Numpad1} to whatever your split hotkey is, see above link for hotkey syntax
  13.             WinActivate, %OldTitle%
  14.             break
  15.         }
  16.        
  17.     }
  18. Return
RAW Paste Data
Top