# Hide and unhide

**URL:** <https://www.ruby-forum.com/t/hide-and-unhide/132002>\
**Category:** Ruby\
**Created:** [March 15, 2008, 3:42am UTC](https://www.ruby-forum.com/t/hide-and-unhide/132002 "2008-03-15T03:42:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [March 15, 2008, 3:42am UTC](https://www.ruby-forum.com/t/hide-and-unhide/132002/1 "2008-03-15T03:42:41Z")

</div>

is there a way i can hide or unhide a window on the computer. let us  
say i am running Internet explorer browsing software and i want to  
hide it or unhide it for some reason usng ruby commands. is it  
possible.

---

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [March 15, 2008, 1:22pm UTC](https://www.ruby-forum.com/t/hide-and-unhide/132002/2 "2008-03-15T13:22:28Z")

</div>

Junkone wrote:

> is there a way i can hide or unhide a window on the computer. let us  
> say i am running Internet explorer browsing software and i want to  
> hide it or unhide it for some reason usng ruby commands. is it  
> possible.

I only know how to do it on windows with Internet Explorer:

require ‘win32ole’  
ie = WIN32OLE::new(‘InternetExplorer.Application’)  
ie.navigate(“[http://www.google.com](http://www.google.com)”)  
print "retrieving "  
while ie.readystate == 1  
#iexplore not visible while loading page  
sleep 1  
print “.”  
end  
ie.visible = true  
sleep 2  
ie.visible = false  
sleep 2  
ie.visible = true  
sleep 1  
ie.quit

Regards,

Siep
