Advertisement
Guest User

Factorio Map AutoIt

a guest
Jun 28th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.95 KB | None | 0 0
  1. #include <ScreenCapture.au3>
  2.  
  3. Global $exit = False
  4.  
  5. Func Main ()
  6.    HotKeySet("{ESC}", "DoExit")
  7.    HotKeySet("{F3}", "TakeScreenshot")
  8.  
  9.    While $exit == False
  10.  
  11.    WEnd
  12. EndFunc
  13.  
  14. Func DoExit ()
  15.    $exit = True
  16. EndFunc
  17.  
  18. Func TakeScreenshot ()
  19.    Send("`go = function (inX, inY) game.player.teleport{x = inX,y = inY}; game.player.clearconsole(); end",1)
  20.    Send("{ENTER}")
  21.  
  22.    Local $i = 0
  23.    For $y = -700 To 500 Step 97.5
  24.       For $x = -900 To 1500 Step 97.5
  25.          If $exit Then ExitLoop
  26.  
  27.          Send("`go("&$x&","&$y&")",1)
  28.  
  29.          ; Get initial checksum
  30.          Local $iCheckSum = PixelChecksum(0, 0, 100, 100)
  31.  
  32.          Send("{ENTER}")
  33.  
  34.          Sleep(100)
  35.  
  36.          ; Wait for the region to change, the region is checked every 100ms to reduce CPU load
  37.          While $iCheckSum = PixelChecksum(0, 0, 100, 100)
  38.              Sleep(100)
  39.          WEnd
  40.  
  41.          _ScreenCapture_Capture(@MyDocumentsDir & "\Image" & $i & ".jpg", 0, 0, 900, 900)
  42.          $i = $i + 1
  43.       Next
  44.    Next
  45.  
  46. EndFunc
  47.  
  48. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement