DVHRLD Posted September 21, 2008 Posted September 21, 2008 (edited) 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 September 21, 2008 by DVHRLD AutoViewer first public AutoIt script
Pain Posted September 21, 2008 Posted September 21, 2008 (edited) 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 September 21, 2008 by Pain
DVHRLD Posted September 21, 2008 Author Posted September 21, 2008 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
Pain Posted September 21, 2008 Posted September 21, 2008 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.
Valuater Posted September 21, 2008 Posted September 21, 2008 I took a look at it and it kept popping up "other" crap! So I wont help with this! 8)
DVHRLD Posted September 21, 2008 Author Posted September 21, 2008 (edited) 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 September 21, 2008 by DVHRLD AutoViewer first public AutoIt script
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now