I am attempting to write a script that will be able to paste large bodies of text line by line to avoid crashes (code below):
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^+v:: ;ctrl shift v
txt = %clipboard%
FileAppend, %txt%`n, %A_WorkingDir%\ClipboardTemp.txt
sleep 500
Loop, read, test.txt
{
Clipboard = %A_LoopReadLine%
GoSub, PasteInfo
}
FileDelete, %A_WorkingDir%\ClipboardTemp.txt
return
PasteInfo:
send %clipboard%`n
return
Code: Select all
line 1
line 2
line #
{pastes to}:
line 1
line 2
line
If anyone knows a better way of doing this any help would be appreciated. Thank you.