test.ahk -_- run scripts and execute script lines with CTRL + R

[test.ahk]  [test.zip] [ sfx test.exe]  -_-  AutoHotKey exeS [ ahk_L.exe ] [ basic ahk.exe ]

with the test.exe you can execute easily multiple single line actions i.e run url, run path\, msgbox Alert text + ..

TO DO • highlight the code line(S) • [CTRL] + [R]

The main purpose from the "test.ahk" code was it to test easily in the Autohotkey forums published scripts

ctrl & r:: ; hotkeys CTRL + R
ClipSave := ClipboardAll ; saves the clipboard content
Clipboard = ;empties the clipboard
Send ^c ; copy
clipwait 2
Clipboard .= "`nesc::ExitApp" ; adds an exit 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 needs to be associatet with an AutoHotKey.exe
Clipboard := ClipSave ; restores the clipboard
Sleep 5000
ToolTip ; deletes the ToolTip
return

if you want you can remove from the code
•the 3 blue tooltip lines
•the 3 lines ¹clipboard = ²Clipboard := ClipSave ³ClipSave := ClipboardAll
•the line Clipboard .= "`nesc::ExitApp"

The same script with german comments and an additional line, which makes it more convenient to test multiple scripts or to execute script lines

ctrl & r:: ; hotkeys Strg + R
ClipSave := ClipboardAll ; sichern der Zwischenablage
Clipboard =
Send ^c ;Kopiert den Code
clipwait 2 ;Wartezeit ist notwendig zum "Reinladen" des Textes
Clipboard .= "`nesc::ExitApp" ;anhängen einer Abbruch-Funktion mit dem Hotkey "Esc"
ToolTip, %Clipboard% ;Anzeigen des zu startenden Scripts
FileDelete %A_Temp%\~temp.ahk
FileAppend , #singleinstance force`n, %A_Temp%\~temp.ahk
FileAppend , %Clipboard%, %A_Temp%\~temp.ahk
Run %A_Temp%\~temp.ahk ;.ahk muss natürlich mit autohotkey.exe verknüpft sein
Clipboard := ClipSave
Sleep 5000
ToolTip ;ToolTip löschen
return

without the "add #singleinstance force" line the running ~temp.ahk will alert you always that the "script" is running. You will save one click or to exit the running "~tmp.ahk" script via [esc]

You can exit a test.ahk file via the H tray rightclick menu.
Other menu entries: edit, reload, suspend the shortcut, pause. The Help entry requiers the autohotkey.cfm in the script directory