Are you saying that you would like to see a post with a list like this for people to test?
Not sure what key WM_CLEAR would normally correspond to, so description is more brief.
Code: Select all
;--------------- SafePaste
SafePaste() {
; A way of pasting that only returns control when the paste is complete
; by jeeswg
; See https://www.autohotkey.com/boards/viewtopic.php?p=271514&sid=f898e28c59efcb6871c1dff403e663dd#p271517
; the point of this is that with a simple Ctrl + v, you don't know when the pasting is complete,
; so if you immediately reload the Clipboard, the new text may end up getting pasted...
ControlGetFocus, vCtlClassNN, A
ControlGet, hCtl, Hwnd,, % vCtlClassNN, A
SendMessage, 0x302,,,, % "ahk_id " hCtl ;WM_PASTE := 0x302
}
Code: Select all
;--------------- SafeCopy
SafeCopy() {
; A way of copying that only returns control when the copying is complete
; by jeeswg
; See https://www.autohotkey.com/boards/viewtopic.php?p=271514&sid=f898e28c59efcb6871c1dff403e663dd#p271517
; the point of this is that with a simple Ctrl + c, you don't know when the copying is complete
ControlGetFocus, vCtlClassNN, A
ControlGet, hCtl, Hwnd,, % vCtlClassNN, A
SendMessage, 0x301,,,, % "ahk_id " hCtl ;WM_COPY := 0x301
}
Code: Select all
;--------------- SafeCut
SafeCut() {
; A way of cutting that only returns control when the cutting is complete
; by jeeswg
; See https://www.autohotkey.com/boards/viewtopic.php?p=271514&sid=f898e28c59efcb6871c1dff403e663dd#p271517
; the point of this is that with a simple Ctrl + x, you don't know when the cutting is complete
ControlGetFocus, vCtlClassNN, A
ControlGet, hCtl, Hwnd,, % vCtlClassNN, A
SendMessage, 0x300,,,, % "ahk_id " hCtl ;WM_CUT := 0x300
}
Code: Select all
;--------------- SafeUndo
SafeUndo() {
; A way of undoing that only returns control when the undoing is complete
; by jeeswg
; See https://www.autohotkey.com/boards/viewtopic.php?p=271514&sid=f898e28c59efcb6871c1dff403e663dd#p271517
; the point of this is that with a simple Ctrl + z, you don't know when the undoing is complete
ControlGetFocus, vCtlClassNN, A
ControlGet, hCtl, Hwnd,, % vCtlClassNN, A
SendMessage, 0x304,,,, % "ahk_id " hCtl ;WM_UNDO := 0x304
}
Code: Select all
;--------------- SafeClear
SafeClear() {
; A way of deleting that only returns control when the deleting is complete
; by jeeswg
; See https://www.autohotkey.com/boards/viewtopic.php?p=271514&sid=f898e28c59efcb6871c1dff403e663dd#p271517
; the point of this is that with a simple Del, you don't know when the deleting is complete
ControlGetFocus, vCtlClassNN, A
ControlGet, hCtl, Hwnd,, % vCtlClassNN, A
SendMessage, 0x303,,,, % "ahk_id " hCtl ;WM_CLEAR := 0x303
}