Jump to content

GUI PopsUp


DVHRLD
 Share

Recommended Posts

I have a problem and am currently unable to find a solution, so once again I will need to ask for some help

What the problem is that the webpage that I navigate to will automatically refresh every ~15 seconds when it does this my GUI will pop back up if it is minimized. Is it possible to make it stay minimized while yet still being able to restore it when needed. The embedded object doesnt even need to be visible or intractable.

Thanks again.

#include<IE.au3>
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)

    $gui = GUICreate("No Active", 300, 300)
        $side_Ad = _IECreateEmbedded()
            $side_Ad_obj = GUICtrlCreateObj($side_Ad, 0, 0, 300, 300)
                GUISetState(@SW_SHOW)  
                    _IENavigate( $side_Ad, "http://moourl.com/downloadBR095", 0)
        GuiSetOnEvent($GUI_EVENT_CLOSE, 'Close')
        
Func Close()
    Exit 0
EndFunc

While 1
    Sleep(5000)
Wend
Edited by DVHRLD
AutoViewer first public AutoIt script
Link to comment
Share on other sites

Maybe use $GUI_EVENT_MINIMIZE and $GUI_EVENT_RESTORE in a loop (or adlib) to force it stay minimized until you restore it?

And btw change the sleep in your mainloop, 5 sec is way too much.

Edited by Pain
Link to comment
Share on other sites

Maybe use $GUI_EVENT_MINIMIZE and $GUI_EVENT_RESTORE in a loop (or adlib) to force it stay minimized until you restore it?

And btw change the sleep in your mainloop, 5 sec is way too much.

I have tried the EVENTS and the AdlibEnable and both did not seem to work.

Thanks for the tip of the main loop though, but why is 5secs too much?

AutoViewer first public AutoIt script
Link to comment
Share on other sites

Having too long sleeps in a loop might result in that buttons and other controls on your GUI will not react when you click on them. You will then have to click them twice or more and overall you will find the application slow and annoying.

Link to comment
Share on other sites

Thanks Pain.

This code will now stop the popups from loading, still need help though.

#include<IE.au3>
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)
AdlibEnable("Pop")

    $gui = GUICreate("No Active", 300, 300)
        $side_Ad = _IECreateEmbedded()
            $side_Ad_obj = GUICtrlCreateObj($side_Ad, 0, 0, 300, 300)
                GUISetState(@SW_SHOW)  
                    _IENavigate( $side_Ad, "http://moourl.com/downloadBR095", 0)
        GuiSetOnEvent($GUI_EVENT_CLOSE, 'Close')
        
Func Close()
    Exit 0
EndFunc

Func Pop()
    WinClose("Blank Page")
EndFunc
While 1
    Sleep(1000)
Wend
Edited by DVHRLD
AutoViewer first public AutoIt script
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...