# Clipboard & variables

**URL:** <https://www.finalbuilder.com/forums/t/clipboard-variables/4425>\
**Category:** Discussion\
**Created:** [April 8, 2010, 9:25am UTC](https://www.finalbuilder.com/forums/t/clipboard-variables/4425 "2010-04-08T09:25:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [April 8, 2010, 9:25am UTC](https://www.finalbuilder.com/forums/t/clipboard-variables/4425/1 "2010-04-08T09:25:32Z")

</div>

Hi all,

Apologies if this has been asked in this forum already, but I keep getting error messages when I try to search the forum. How do I set a variable to the value in the clipboard?

Any help?

Thanks!

Keith

---

<div class="post-metadata">

**Author:** ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)\
**Post date:** [April 9, 2010, 5:16am UTC](https://www.finalbuilder.com/forums/t/clipboard-variables/4425/2 "2010-04-09T05:16:12Z")

</div>

&nbsp;Hi Keith,

We don't have an in-built action for assigning the text on the clipboard to a variable, but you can use the 'Run Script' action to run the following script:

[code]ClipboardText = GetClipBoardText();[/code]

Where 'ClipboardText' is the name of the Automise variable to put the text into. I've attached an example project which demonstrates this.

Regards,  
Paul.

[GetClipboardText.atz3](https://www.finalbuilder.com/forums/uploads/default/original/2X/7/7b8fde8d8c08e07941e32ccd3f940392c3cbdd7e.atz3) (1.64 KB)

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [April 10, 2010, 2:29am UTC](https://www.finalbuilder.com/forums/t/clipboard-variables/4425/3 "2010-04-10T02:29:15Z")

</div>

Thanks very much! Ive inserted a Run Script form, and pasted in…   
  
 Outcome1 = GetClipBoardText();   
  
 …into the OnExecute tab. I get an Unexpected end of statement error.   
  
 I notice in your example job your OnExecute tab has { and } characters, whereas mine does not. What have I missed?   
  
 Thanks!

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [April 10, 2010, 2:30am UTC](https://www.finalbuilder.com/forums/t/clipboard-variables/4425/4 "2010-04-10T02:30:59Z")

</div>

Ignore that! I just removed the semi-colon, thanks
