; Android Screen Shot.ahk ; 2011-05-09 ; Chieh Cheng ; http://www.CynosureX.com/ ; GNU General Public License (GPL) Version 2, June 1991 ; Crop Android screen shot with ease. #SingleInstance force crop() { IfWinActive *Untitled { WinGet winID ; crop tool Send C Sleep 1000 MouseClick Left, 150, 150, 1, 10, D MouseClick Left, 200, 200, 1, 10, U openToolOptions() Sleep 2000 setCropSize() Sleep 1000 WinActivate ahk_id %winID% Sleep 2000 ; crop Click 200, 200 Sleep 1000 Send 1 Sleep 1000 ; Select Tool selectTool() } else { MsgBox, 0, Error!, Screen shot is currently not the top-most window. } } openToolOptions() { IfWinNotExist Tool Options { Send !w Sleep 1000 Send d Sleep 1000 Send {Enter} } } selectTool() { Send !t Sleep 1000 Send s Sleep 1000 Send r } setCropSize() { IfWinNotActive Tool Options { WinActivate Tool Options } Click 50, 225 Send {Backspace}{Backspace}{Backspace}{Backspace}{Backspace} Send 31 Send {Tab} Send 52 Send {Tab} Send {Tab} Send 320 Send {Tab} Send 480 Send {Tab} } ; Crop Screen Shot #c:: crop() return ; test function calls #t:: return