I am trying to make a script which will write out what I paste into it, however any line breaks from the copied text break the script.
For example I want the following text to be written out (example from a random wikipedia page):
"A wrench or spanner is a tool used to provide grip and mechanical advantage in applying torque to turn objects—usually rotary fasteners, such as nuts and bolts—or keep them from turning.
In the UK, Ireland, Australia, and New Zealand spanner is the standard term. The most common shapes are called open-ended spanner and ring spanner. The term wrench is generally used for tools that turn non-fastening devices (e.g. tap wrench and pipe wrench), or may be used for a monkey wrench—an adjustable pipe wrench.[1] "
Using the following script:
Code: Select all
#n::
send, A wrench or spanner is a tool used to provide grip and mechanical advantage in applying torque to turn objects—usually rotary fasteners, such as nuts and bolts—or keep them from turning.
In the UK, Ireland, Australia, and New Zealand spanner is the standard term. The most common shapes are called open-ended spanner and ring spanner. The term wrench is generally used for tools that turn non-fastening devices (e.g. tap wrench and pipe wrench), or may be used for a monkey wrench—an adjustable pipe wrench.[1]
return
Changing the script to
Code: Select all
#n::
send, A wrench or spanner is a tool used to provide grip and mechanical advantage in applying torque to turn objects—usually rotary fasteners, such as nuts and bolts—or keep them from turning. In the UK, Ireland, Australia, and New Zealand spanner is the standard term. The most common shapes are called open-ended spanner and ring spanner. The term wrench is generally used for tools that turn non-fastening devices (e.g. tap wrench and pipe wrench), or may be used for a monkey wrench—an adjustable pipe wrench.[1]
return
The actual use case has a lot more spacings, so if there's a way to take the raw copied text with formatting and send it replicating the formatting that would be great.
Thanks in advance!
[Mod edit: [code][/code] tags added. Please use them yourself when posting code!]