How do I capture Text from a webpage... then typetext it?

I want to capture a code that shows up in a webpage… they store it and TypeText it later in the script.

Can it be done?

Drag or double click to select it and copy it to the clipboard:

DoubleClick "someValue" -- select it
TypeText controlKey, "c" -- copy it
put remoteClipboard() into capturedVal -- store it
click "someField"
TypeText capturedVal -- type it