Jump to content

Hide Active Window


Recommended Posts

Hello I am kind of a beginner here, so any help would be MUCH appreciated.

I need to hide an active IE window.I thought about hiding it behind a splashscreen image. Is there a better way around it? And if not, how can I hide it behind the image? What is the best way to do this? Again, any help is much appreciated. Thanks in advance ;)

Edited by richietheprogrammer1
Link to comment
Share on other sites

Using WinSetState will help you.

To hide the IE Window, use this:

WinSetState("[CLASS:IEFrame]", "MSN.com", @SW_HIDE)

Note that the word MSN.com is used to tell AutoIt which window to hide. Replace it by the title of the IE window you are trying to hide.

Say, you went to google. The title bar will have the word "Google - Windows Internet Explorer", so your coding will be:

WinSetState("[CLASS:IEFrame]", "Google", @SW_HIDE)

If you went to http://misc314.com, your codings will be:

WinSetState("[CLASS:IEFrame]", "Misc314", @SW_HIDE)

You can also make it into:

WinSetState("[CLASS:IEFrame]", "Misc314 - Windows Internet Explorer", @SW_HIDE)

(With Windows Internet Explorer added) But I don't advice that. If the user has the words removed, your script probably won't work anymore.

To show the IE window again:

WinSetState("[CLASS:IEFrame]", "", @SW_SHOW)

You don't need to add anything, say MSN.com, into the double-quotes above.

More more information, you can type 'WinSetState' in the AutoIt SCITE window and press F1. The help file can really help you a lot.

Cheers, and good luck.

Edited by Crash

JPGRARMouse Lock | My website | Thanks so much for your help! ❤️

Link to comment
Share on other sites

Using WinSetState will help you.

To hide the IE Window, use this:

WinSetState("[CLASS:IEFrame]", "MSN.com", @SW_HIDE)

Note that the word MSN.com is used to tell AutoIt which window to hide. Replace it by the title of the IE window you are trying to hide.

Say, you went to google. The title bar will have the word "Google - Windows Internet Explorer", so your coding will be:

WinSetState("[CLASS:IEFrame]", "Google", @SW_HIDE)

If you went to http://misc314.com, your codings will be:

WinSetState("[CLASS:IEFrame]", "Misc314", @SW_HIDE)

You can also make it into:

WinSetState("[CLASS:IEFrame]", "Misc314 - Windows Internet Explorer", @SW_HIDE)

(With Windows Internet Explorer added) But I don't advice that. If the user has the words removed, your script probably won't work anymore.

To show the IE window again:

WinSetState("[CLASS:IEFrame]", "", @SW_SHOW)

You don't need to add anything, say MSN.com, into the double-quotes above.

More more information, you can type 'WinSetState' in the AutoIt SCITE window and press F1. The help file can really help you a lot.

Cheers, and good luck.

Thanks a lot for this!! Here is what is going on: I am trying to read the html of a webpage, here is my code:

$url = "google.com"
$oIE = _IECreate($url)
$clip = _IEBodyReadHTML($oIE)
_IEQuit($oIE)

So even though I can use WinSetState("[CLASS:IEFrame]", "google", @SW_HIDE), the window still opens, and after a second it hides. How can I make it so that the IE window never opens? Thanks again for your help ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...