Code: Select all
F3:: ;Hold F3 to make a selection, then release
{
MouseGetPos, x1, y1
SoundBeep, 1500, 20
KeyWait, %A_ThisHotkey%
SoundBeep, 1000, 20
MouseGetPos, x2, y2
width := x2 - x1, height := y2 - y1
If (width < 4 && height < 4)
Return
pToken := Gdip_Startup(), snap := Gdip_BitmapFromScreen(x1 "|" y1 "|" width "|" height)
Gdip_SetBitmapToClipboard(snap), Gdip_SaveBitmapToFile(snap, out)
Gdip_DisposeImage(snap), Gdip_Shutdown(pToken)
;Run, %out%
}
Return