d4rkdz Posted March 29, 2013 Share Posted March 29, 2013 hello there , i am facing a problem with popups ,the thing is when my script launches an ie window normally the popup blocker works just fine , with no new windows showing at all , however when it's embedded in a gui (_IECreateEmbedded()) , it doesn't work as fine and there are some annoying popups showing. and yes i ran them on the same settings and same website. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 29, 2013 Developers Share Posted March 29, 2013 Not sure what your expectation is after posting this minimal information and not really asking a question. It helps to be much clearer. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MuchTex Posted March 29, 2013 Share Posted March 29, 2013 Have your script check for pop up IE windows with WinExists() and if there is an IE popup ad then close it with WinClose() Link to comment Share on other sites More sharing options...
d4rkdz Posted March 29, 2013 Author Share Posted March 29, 2013 Not sure what your expectation is after posting this minimal information and not really asking a question. It helps to be much clearer. ok,here you go good sir, this the script in the _IECreateEmbedded() explanition , i did edit to open http://www.popuptest.com/, even though my ie popup blocker is on , it still open all the popup windows unlike when i am using ie directly expandcollapse popup#include #include #include _IEErrorHandlerRegister() Local $oIE = _IECreateEmbedded() GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) GUICtrlCreateObj($oIE, 10, 40, 600, 360) Local $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) Local $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) Local $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) Local $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30) GUISetState() ;Show GUI _IENavigate($oIE, "http://www.popuptest.com/") ; Waiting for user to close the window While 1 Local $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home _IENavigate($oIE, "http://www.popuptest.com/") Case $msg = $GUI_Button_Back _IEAction($oIE, "back") Case $msg = $GUI_Button_Forward _IEAction($oIE, "forward") Case $msg = $GUI_Button_Stop _IEAction($oIE, "stop") EndSelect WEnd GUIDelete() Exit Link to comment Share on other sites More sharing options...
water Posted March 29, 2013 Share Posted March 29, 2013 An embedded IE not necessarely does act the same way the full IE application does. IIRC the embedded IE is an ActiveX control with limited functionality. So it is not sure that the addon that works in the browser does in the ActiveX control. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
d4rkdz Posted March 29, 2013 Author Share Posted March 29, 2013 oh i see , so there is no way of using the blocker in the embedded IE even though the blocker comes with IE? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2013 Moderators Share Posted March 29, 2013 (edited) d4rkdz,You could try with Dale Holm's Pseudo-Embedded code: expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <Constants.au3> #include <IE.au3> Dim $hGUI, $oIE, $sURL, $iLeft, $iTop, $iHeight, $iWidth $sURL = "http://www.google.com" $iLeft = 0 $iTop = 0 $iWidth = 1024 $iHeight = 768 $hGUI = GUICreate("Test", $iWidth, $iHeight) $oIE = IECreatePseudoEmbedded($iLeft, $iTop, $iWidth, $iHeight, $hGUI) _IENavigate($oIE, $sURL) GUISetState(@SW_SHOW, $hGUI) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then _IEQuit($oIE) Exit EndIf WEnd Exit Func IECreatePseudoEmbedded($i_Left, $i_Top, $i_Width, $i_Height, $h_Parent, $f_ShowWin = False, $i_Timeout = 30000) Local Const $i_Random = Random(10001, 99999, 1) Local $i_PID, $o_IE, $h_HWND, $h_Timer = TimerInit() $i_PID = Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe -k " & "about:blank-" & $i_Random, "", @SW_HIDE) $f_ErrorNotify = _IEErrorNotify() _IEErrorNotify(False) While Not IsObj($o_IE) $o_IE = _IEAttach("about:blank-" & $i_Random, "URL") If TimerDiff($h_Timer) > $i_Timeout Then _IEErrorNotify($f_ErrorNotify) Return SetError(1, 0, 0) EndIf Sleep(200) WEnd _IEErrorNotify($f_ErrorNotify) $h_HWND = _IEPropertyGet($o_IE, "hwnd") _WinAPI_SetParent($h_HWND, $h_Parent) _WinAPI_MoveWindow($h_HWND, $i_Left, $i_Top, $i_Width, $i_Height, True) _WinAPI_SetWindowLong($h_HWND, $GWL_STYLE, $WS_POPUP + $WS_VISIBLE) If $f_ShowWin Then WinSetState($h_HWND, "", @SW_SHOW) EndIf Return $o_IE EndFunc ;==>IECreatePseudoEmbeddedM23 Edited March 29, 2013 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
d4rkdz Posted March 29, 2013 Author Share Posted March 29, 2013 (edited) d4rkdz, You could try with Dale Holm's Pseudo-Embedded code: expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <Constants.au3> #include <IE.au3> Dim $hGUI, $oIE, $sURL, $iLeft, $iTop, $iHeight, $iWidth $sURL = "http://www.google.com" $iLeft = 0 $iTop = 0 $iWidth = 1024 $iHeight = 768 $hGUI = GUICreate("Test", $iWidth, $iHeight) $oIE = IECreatePseudoEmbedded($iLeft, $iTop, $iWidth, $iHeight, $hGUI) _IENavigate($oIE, $sURL) GUISetState(@SW_SHOW, $hGUI) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then _IEQuit($oIE) Exit EndIf WEnd Exit Func IECreatePseudoEmbedded($i_Left, $i_Top, $i_Width, $i_Height, $h_Parent, $f_ShowWin = False, $i_Timeout = 30000) Local Const $i_Random = Random(10001, 99999, 1) Local $i_PID, $o_IE, $h_HWND, $h_Timer = TimerInit() $i_PID = Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe -k " & "about:blank-" & $i_Random, "", @SW_HIDE) $f_ErrorNotify = _IEErrorNotify() _IEErrorNotify(False) While Not IsObj($o_IE) $o_IE = _IEAttach("about:blank-" & $i_Random, "URL") If TimerDiff($h_Timer) > $i_Timeout Then _IEErrorNotify($f_ErrorNotify) Return SetError(1, 0, 0) EndIf Sleep(200) WEnd _IEErrorNotify($f_ErrorNotify) $h_HWND = _IEPropertyGet($o_IE, "hwnd") _WinAPI_SetParent($h_HWND, $h_Parent) _WinAPI_MoveWindow($h_HWND, $i_Left, $i_Top, $i_Width, $i_Height, True) _WinAPI_SetWindowLong($h_HWND, $GWL_STYLE, $WS_POPUP + $WS_VISIBLE) If $f_ShowWin Then WinSetState($h_HWND, "", @SW_SHOW) EndIf Return $o_IE EndFunc ;==>IECreatePseudoEmbedded M23 this code isn't running for me , it just open a blank window , any idea? Edited March 29, 2013 by Melba23 Fixed code Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2013 Moderators Share Posted March 29, 2013 d4rkdz, It works fine for me - did you run it exactly as posted? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
water Posted March 29, 2013 Share Posted March 29, 2013 I had to replace "about:blank-" with "about:blank-" My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
d4rkdz Posted March 29, 2013 Author Share Posted March 29, 2013 yes, i even did what water said , still didn't work "--> IE.au3 V2.4-0 Error from function _IENavigate, $_IEStatus_InvalidDataType" Link to comment Share on other sites More sharing options...
water Posted March 29, 2013 Share Posted March 29, 2013 Here it is working fine after I did the changes I posted before. I'm running AutoIt 3.3.8.1 on Windows 7 64 bit with IE 9. What's your environment? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
d4rkdz Posted March 29, 2013 Author Share Posted March 29, 2013 autoit v3.3.8.1 , win 7 32bit , IE 9 Link to comment Share on other sites More sharing options...
water Posted March 29, 2013 Share Posted March 29, 2013 Can you post the code you use for testing? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
d4rkdz Posted March 29, 2013 Author Share Posted March 29, 2013 oh my bad my bad , sorry , i did not notice that there were two "about:blank-" it working right now. Link to comment Share on other sites More sharing options...
water Posted March 29, 2013 Share Posted March 29, 2013 "A small leak will sink a great ship" d4rkdz 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2013 Moderators Share Posted March 29, 2013 (edited) d4rkdz and water, Sorry about that - damned forum software changing posted text again. And yet it accepts it when I edit it the posts - which is when the problems usually start! M23 Edited March 29, 2013 by Melba23 Typo Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
water Posted March 29, 2013 Share Posted March 29, 2013 (edited) Melba, no problem, that was easy to solve And btw: I hate this editor too Edited March 29, 2013 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 29, 2013 Moderators Share Posted March 29, 2013 d4rkdz, Now you have the code running, does it solve your problem? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
d4rkdz Posted March 29, 2013 Author Share Posted March 29, 2013 yes it's solved , thanks for the help , both of you. Link to comment Share on other sites More sharing options...
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