ctrl & r:: ; hotkeys CTRL + r ClipSave := ClipboardAll ; save the clipboard Clipboard = ; empties the clipboard Send ^c ; copy clipwait 2 ; waits until the code is loaded Clipboard .= "`nesc::ExitApp" ; adds an escape function via the "Esc" key ToolTip, %Clipboard% ; displays the script in a tooltip FileDelete %A_Temp%\~temp.ahk FileAppend , %Clipboard%, %A_Temp%\~temp.ahk Run %A_Temp%\~temp.ahk ; .ahk must be associated with an "autohotkey.exe" Clipboard := ClipSave ; restores the clipboard Sleep 5000 ToolTip ; delete the ToolTip after 5 sec return