main.au3 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "utils/FastFind/FastFind.au3"
  2. #Region === User Config
  3. HotKeySet("{F11}","screenShotActiveWindow")
  4. Global $path = "screenshots/screenshot"
  5. #EndRegion
  6. #Region === AutoIt configs
  7. ;0 = relative coords to the active window
  8. ;1 = absolute screen coordinates (default)
  9. ;2 = relative coords to the client area of the active window
  10. ;
  11. AutoItSetOption("CaretCoordMode", 2)
  12. AutoItSetOption("MouseCoordMode", 2)
  13. AutoItSetOption("SendKeyDownDelay", 5)
  14. AutoItSetOption("TrayAutoPause", 0)
  15. AutoItSetOption("TrayMenuMode", 3)
  16. AutoItSetOption("TrayOnEventMode", 1)
  17. AutoItSetOption("WinTitleMatchMode", 3)
  18. #EndRegion
  19. While 1
  20. sleep(50)
  21. WEnd
  22. Func screenShotActiveWindow()
  23. ;FFSnapShot(const $Left=0, const $Top=0, const $Right=0, const $Bottom=0, const $NoSnapShot=$FFDefaultSnapShot, const $WindowHandle=-1)
  24. FFSnapshot(0, 0, 0, 0, 10, WinGetHandle("[ACTIVE]"))
  25. ;FFSaveBMP($FileNameWithNoExtension, $ForceNewSnap=false, $Left=0, $Top=0, $Right=0, $Bottom=0, $NoSnapShot=$FFLastSnap, $WindowHandle=-1)
  26. FFSaveBMP($path)
  27. EndFunc