# Need clarification about WIN32OLE.new

**URL:** <https://rubytalk.org/t/need-clarification-about-win32ole-new/47493>\
**Category:** ruby-talk\
**Created:** [3 July 2008 06:54 UTC](https://rubytalk.org/t/need-clarification-about-win32ole-new/47493 "2008-07-03T06:54:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raveendran\_P](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@Raveendran\_P](https://rubytalk.org/u/Raveendran_P)\
**Post date:** [3 July 2008 06:54 UTC](https://rubytalk.org/t/need-clarification-about-win32ole-new/47493/1 "2008-07-03T06:54:52Z")

</div>

Hi All,

is it possible or not ?

Program:

require "watir"

&nbsp;&nbsp;ie = WATIR::IE.new  
&nbsp;&nbsp;ie.visible=false  
&nbsp;&nbsp;ie.goto("[http://blahblah.com](http://blahblah.com)")

When i run this program initially

ie = WATIR::IE.new this line creating IE object. So i can able to see  
that window.  
After that only i can able to invisible the window.

But i want to create new ie window initially invisible mode.

My tries:

I tried to change the watir gem codings

//watir/ie.rb

def create\_browser\_window  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@ie = WIN32OLE.new('InternetExplorer.Application'  
&nbsp;&nbsp;&nbsp;&nbsp;end

I added a @ie.visible=false after  
@ie = WIN32OLE.new('InternetExplorer.Application'. but it was not  
working. so i decided to add code to WIN32OLE gem or plugin. But i  
can't do it.

So simply my need is,

@ie = WIN32OLE.new('InternetExplorer.Application'

want to create a application in invisible mode.

Thank in Advance

Regards,  
P.Raveendran

> **[Raveendran](https://raveendran.wordpress.com/)**
>
> Nothing is impossible...

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Bret\_Pettichord1](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@Bret\_Pettichord1](https://rubytalk.org/u/Bret_Pettichord1)\
**Post date:** [3 July 2008 16:20 UTC](https://rubytalk.org/t/need-clarification-about-win32ole-new/47493/2 "2008-07-03T16:20:24Z")

</div>

> Hi All,
> 
> is it possible or not ?
> 
> Program:
> 
> require "watir"
> 
> ie = WATIR::IE.new  
> ie.visible=false  
> ie.goto("[http://blahblah.com](http://blahblah.com)")

Try this:

$HIDE\_IE = true

> **···**
>
> On Thu, Jul 3, 2008 at 1:54 AM, Raveendran Jazzez \<jazzezravi@gmail.com\> wrote:
> 
> > ie = WATIR::IE.new  
> > ie.goto("[http://blahblah.com](http://blahblah.com)")
> 
> --  
> Bret Pettichord  
> CTO, WatirCraft LLC, [http://www.watircraft.com](http://www.watircraft.com)  
> Lead Developer, Watir, [http://wtr.rubyforge.org](http://wtr.rubyforge.org)  
> Blog (Essays), [http://www.io.com/~wazmo/blog](http://www.io.com/~wazmo/blog)  
> MiniBlog (Links), [Bret's Recommendations](http://feeds.feedburner.com/bretshotlist)

---

<div class="post-metadata">

**Author:** ![Raveendran\_P](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@Raveendran\_P](https://rubytalk.org/u/Raveendran_P)\
**Post date:** [5 August 2008 11:28 UTC](https://rubytalk.org/t/need-clarification-about-win32ole-new/47493/3 "2008-08-05T11:28:28Z")

</div>

Bret Pettichord wrote:

> > ie.goto("[http://blahblah.com](http://blahblah.com)")
> 
> Try this:
> 
> $HIDE\_IE = true

Hi Pettichord.

After a long gap i taken that task and finished it following way..

watir gem/new.rb

replace ie.visible = $HIDE\_IE to ie.visible != $HIDE\_IE

Thanks  
Regards,  
P.Raveendran  
RF,Chennai,

> **[Raveendran](https://raveendran.wordpress.com)**
>
> Nothing is impossible...

> **···**
>
> > On Thu, Jul 3, 2008 at 1:54 AM, Raveendran Jazzez \<jazzezravi@gmail.com\> \> wrote:
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
