# Click and copy text into file or database using mouse event

**URL:** <https://www.ruby-forum.com/t/click-and-copy-text-into-file-or-database-using-mouse-event/150105>\
**Category:** Ruby\
**Created:** [October 3, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/click-and-copy-text-into-file-or-database-using-mouse-event/150105 "2008-10-03T20:43:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/b782af/32.png) [@learner](https://www.ruby-forum.com/u/learner)\
**Post date:** [October 3, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/click-and-copy-text-into-file-or-database-using-mouse-event/150105/1 "2008-10-03T20:43:36Z")

</div>

Hi,

am new at ruby and searching for a way to highlight a word in a text  
through a mouse-click and then copy the highlighted word into a file by  
evaluating the mouse event (highlighted area) or hotkeys.

Is there a way in ruby to do this?

Thanks in advance.

Bou
