# Copying text from Log or Cues panel

**URL:** <https://in-thread.sonic-pi.net/t/copying-text-from-log-or-cues-panel/8181>\
**Category:** Support, Help & Resources\
**Created:** [September 24, 2023, 9:57pm UTC](https://in-thread.sonic-pi.net/t/copying-text-from-log-or-cues-panel/8181 "2023-09-24T21:57:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmindflip](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/drmindflip/32/2627_2.png) [@drmindflip](https://in-thread.sonic-pi.net/u/drmindflip)\
**Post date:** [September 24, 2023, 9:57pm UTC](https://in-thread.sonic-pi.net/t/copying-text-from-log-or-cues-panel/8181/1 "2023-09-24T21:57:54Z")

</div>

I’ve been writing some Sonic Pi code that generates a large **string** of data that I want to save. I’ve been sending it to the Log via `puts` but I was disappointed to see that I couldn’t highlight or copy text from the Log! I probably should have checked that before writing a whole piece for this purpose… 😅

I tried using `cue` to display the string too but I was still unable to copy it from the cue window.

Is there any way I can get the resulting string out of Sonic Pi and into my clipboard?

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [September 24, 2023, 10:32pm UTC](https://in-thread.sonic-pi.net/t/copying-text-from-log-or-cues-panel/8181/2 "2023-09-24T22:32:25Z")

</div>

You should be able to copy it once you have stopped the current program running.

---

<div class="post-metadata">

**Author:** ![drmindflip](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/drmindflip/32/2627_2.png) [@drmindflip](https://in-thread.sonic-pi.net/u/drmindflip)\
**Post date:** [September 25, 2023, 3:52pm UTC](https://in-thread.sonic-pi.net/t/copying-text-from-log-or-cues-panel/8181/3 "2023-09-25T15:52:47Z")

</div>

Ah that’s good to know! And for anyone looking for an alternative, I managed to get Sonic Pi writing a string out to a text document using the following:

```ruby
my_string = "All that we see or seem is but a dream within a dream"
location = "C:/Users/profile/Desktop/test.txt"
File.open(location, "w") { |f| f.write my_string}

```

This function overwrites the current contents of the txt file, but there are others that append to it etc.

---

<div class="post-metadata">

**Author:** ![RangMod](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/rangmod/32/2587_2.png) [@RangMod](https://in-thread.sonic-pi.net/u/RangMod)\
**Post date:** [October 2, 2023, 11:09am UTC](https://in-thread.sonic-pi.net/t/copying-text-from-log-or-cues-panel/8181/4 "2023-10-02T11:09:51Z")

</div>

Thanks for the tip Edgar! 😀
