# System.setClipboard problem

**URL:** <https://forum.kirupa.com/t/system-setclipboard-problem/138289>\
**Category:** Uncategorized\
**Created:** [February 21, 2005, 6:04pm UTC](https://forum.kirupa.com/t/system-setclipboard-problem/138289 "2005-02-21T18:04:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickedBoy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wickedboy/32/1100_2.png) [@wickedBoy](https://forum.kirupa.com/u/wickedBoy)\
**Post date:** [February 21, 2005, 6:04pm UTC](https://forum.kirupa.com/t/system-setclipboard-problem/138289/1 "2005-02-21T18:04:40Z")

</div>

I’m trying to manipulate the below code somehow so that when you click **btn\_1** the letter \*\*\*A \*\*\*is copied onto the clipboard and **btn\_2** letter **B** etc. Does anyone know how I could make a bit easier instead of writing out this code to 20-odd times?

```auto

this.createTextField(&quot;in_txt&quot;, this.getNextHighestDepth(), 10, 10, 160, 120);
in_txt.multiline = true;
in_txt.border = true;
in_txt.text = &quot;lorum ipsum...&quot;;
this.createTextField(&quot;out_txt&quot;, this.getNextHighestDepth(), 10, 140, 160, 120);
out_txt.multiline = true;
out_txt.border = true;
out_txt.type = &quot;input&quot;;

copy_btn.onRelease = function() {
   System.setClipboard(in_txt.text);
   Selection.setFocus(&quot;out_txt&quot;);
};

```

Any clue how I can do that?

W-B
