PhieuLang

ChupManHinh

Sep 25th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.63 KB | None | 0 0
  1. #include <ScreenCapture.au3>
  2. HotKeySet("{F7}","setA")
  3. HotKeySet("{F8}","setB")
  4. HotKeySet("{F9}","capture")
  5. Global $left,$top,$right,$bottom
  6.  
  7. While 1
  8.    Sleep(100)
  9. WEnd
  10.  
  11. Func setA()
  12.    Local $pos
  13.    $pos = MouseGetPos()
  14.    $left = $pos[0]
  15.    $top = $pos[1]
  16. EndFunc
  17. Func setB()
  18.    Local $pos
  19.    $pos = MouseGetPos()
  20.    $right = $pos[0]
  21.    $bottom = $pos[1]
  22. EndFunc
  23. Func capture()
  24.    DirCreate (@ScriptDir & "\data\ChupManHinh")
  25.    $path = @ScriptDir & "\data\ChupManHinh\PHIEULANG"  & @MON & @MDAY  & @HOUR & @MIN & @SEC  & ".jpg"
  26.    _ScreenCapture_Capture($path, $left, $top, $right, $bottom)
  27.    Return $path
  28. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment