# Activating a window using ruby code

**URL:** <https://www.ruby-forum.com/t/activating-a-window-using-ruby-code/150744>\
**Category:** Ruby\
**Created:** [October 12, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/activating-a-window-using-ruby-code/150744 "2008-10-12T15:28:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anukulsinghal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Post date:** [October 12, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/activating-a-window-using-ruby-code/150744/1 "2008-10-12T15:28:25Z")

</div>

Hi,

I am writing a method in ruby named activateWindow(windowHandle).

User will pass the window handle of the window that needs to be  
activated as the argument and the corresponding window should be  
activated.

Can anyone please help with the ruby code to accomplish this?

Thanks,  
Anukul
