Code: Select all
f1:: {
send("{printscreen}")
screenshot := A_Screenshot
}
f3:: {
;----- PASTE SCREENSHOT
send(screenshot)
}
Code: Select all
f1:: {
send("{printscreen}")
screenshot := A_Screenshot
}
f3:: {
;----- PASTE SCREENSHOT
send(screenshot)
}
Code: Select all
clipboard_image = ImageGrab.grabclipboard()
Code: Select all
#Requires AutoHotkey 2.0
#SingleInstance
F1:: ; takes a screenshot
F2:: { ; restores the screenshot
static ClipSaved := ""
if ThisHotkey = "F1" {
A_Clipboard := ""
Send "{LWin down}{F24}{LWin up}"
ClipWait , 1
ClipSaved := ClipboardAll()
SoundBeep
}
else A_Clipboard := ClipSaved, SoundBeep(600)
}
Code: Select all
#Requires AutoHotkey v2.0
; https://github.com/buliasz/AHKv2-Gdip
#Include d:\Q\vis2\lib\Gdip_AllV2.ahk
pToken := Gdip_Startup()
pos := '0|0|' A_ScreenWidth '|' A_ScreenHeight
OnExit done
F2:: {
Global pBitmap := Gdip_BitmapFromScreen(pos)
SoundBeep 1500
}
F3:: {
A_Clipboard := ''
Try Gdip_SetBitmapToClipboard(pBitmap)
Catch
Return MsgBox('Nothing has been copied.', 'Error', 'Icon!')
If ClipWait(1, ANY := True) {
Send '^v'
SoundBeep 1000
} Else MsgBox 'An error occurred while waiting for the clipboard.', 'Error', 'Icon!'
}
done(exitReason, exitCode) {
Try Gdip_DisposeImage(pBitmap), Gdip_Shutdown(pToken)
SoundBeep 2500
}
Users browsing this forum: songdg and 23 guests