Jump to content

Creating a hidden internet explorer window


Recommended Posts

So i have been using IE.au3 to write some code.

I finished the project, which in short checks the status of a website.

Now, however, it would be great if the whole process could be hidden from site so I dont get a flash of windows while it runs for 2 seconds.

$o_IE = _IECreate("http://site.com", 0, 0, 1, 0)

;WinSetState("This site","",@SW_HIDE)

_IELoadWait($o_IE)

$o_tab = _IEAttach("http://page-that-opened-in-a-new-tab-that-i-want-to-get-control-of.com", "url")

Using IEcreate with the open as hidden value set doesn't work. I have commented out the @SW hide because that only hides the page after it loads the first time. I would prefer to not have to see the webpage appear and then disappear.

Can anyone help!?

Link to comment
Share on other sites

So i have been using IE.au3 to write some code.

I finished the project, which in short checks the status of a website.

Now, however, it would be great if the whole process could be hidden from site so I dont get a flash of windows while it runs for 2 seconds.

$o_IE = _IECreate("http://site.com", 0, 0, 1, 0)

;WinSetState("This site","",@SW_HIDE)

_IELoadWait($o_IE)

$o_tab = _IEAttach("http://page-that-opened-in-a-new-tab-that-i-want-to-get-control-of.com", "url")

Using IEcreate with the open as hidden value set doesn't work. I have commented out the @SW hide because that only hides the page after it loads the first time. I would prefer to not have to see the webpage appear and then disappear.

Can anyone help!?

Hi there m8,

Try to use :

_IECreate ("http://site.com",0,0, 1, 1)

Cheers

P.S. : If you need more help i'll send to you a script that i made running a hidden IE.

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

Thanks for the response.

I tried changing it to a 1, however it is still not hidden I'm afraid.

I am using internet explorer 7 for this.

if you have a bit of script that would do this, I would love to see it.

Thank you

PM Sent! :mellow:

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

Thanks, I really appreciate that.

You bit of code worked and I tested my code on a different site, and it also worked.

The site i am loading loads a new popup that I use. This page is brought to the front. And there are no settings in internet explorer that allow me to keep it hidden. Such as opening in current window, bring to front, switch to new tab, open it in a tab, etc. No luck.

Does anyone have any ideas? Is there an IE.au3 function to hide tabs?

Thanks

Link to comment
Share on other sites

you could embed the IE window in a GUI and hide the GUI.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Example()

; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI
;
; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
Func Example()
    Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward
    Local $GUI_Button_Home, $GUI_Button_Stop, $msg
    
    $oIE = ObjCreate("Shell.Explorer.2")

   ; Create a simple GUI for our output
    GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360)
    $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
    $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
    $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
    $GUI_Button_Stop = GUICtrlCreateButton("Stop", 330, 420, 100, 30)

    GUISetState()     ;Show GUI

    $oIE.navigate("http://www.autoitscript.com")

   ; Waiting for user to close the window
    While 1
        $msg = GUIGetMsg()

        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $GUI_Button_Home
                $oIE.navigate("http://www.autoitscript.com")
            Case $msg = $GUI_Button_Back
                $oIE.GoBack
            Case $msg = $GUI_Button_Forward
                $oIE.GoForward
            Case $msg = $GUI_Button_Stop
                $oIE.Stop
        EndSelect
        
    WEnd

    GUIDelete()
EndFunc  ;==>Example
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...