Run the following code.
Copy some text to clipboard with Ctrl+C.
If the text is <19 bytes in length, the FileAppend will crash.
Code: Select all
#NoEnv ; For performance & future compatibility
#Warn ; For catching common errors
SendMode Input ; For superior speed and reliability
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory
; ================================ Program ===================================
#Persistent
1st:=0
return
OnClipboardChange:
if (1st++)
{ a:=ClipboardAll
FileAppend %a%, fred ; If copied text < 19 bytes, crash
}
return