Results 1 to 7 of 7

Thread: How to avoid or close automatically this popup in Internet Explorer? - Please help

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    294

    How to avoid or close automatically this popup in Internet Explorer? - Please help

    This is the popup , I am using external webbrowser, the imagen bellow is a sample from the web but is the same popup

    Name:  tm12.jpg
Views: 419
Size:  63.6 KB


    Code:
    Private Sub PostTo (ByVal src As String)
            _browser.GoTo(src)
    
            Dim div = _browser.Divs.Where(Function(element) element.ClassName = "uiTypeahead composerTypeahead mentionsTypeahead").FirstOrDefault()
    
            While Not div.Exists
                Thread.Sleep(1000)
                div = _browser.Divs.Where(Function(element) element.ClassName = "uiTypeahead composerTypeahead mentionsTypeahead").FirstOrDefault()
            End While
    
            _browser.RunScript("Bootloader.loadComponents([""control-textarea""], function() { TextAreaControl.getInstance(this) }.bind(this)); ")
    
            For Each textField As TextField In div.TextFields
                Dim attr = textField.GetAttributeValue("aria-expanded")
                If String.IsNullOrEmpty(attr) Then
                    Continue For
                End If
                textField.SetAttributeValue("aria-expanded", True)
                textField.TypeText(" ")
            Next
    
            If slowCheckBox.Checked Then
                If div.TextFields.Any(Function(element) element.Name = "xhpc_message_text") Then
                    div.TextField(Find.ByName("xhpc_message_text")).TypeText(postTextBox.Text)
                End If
            Else
                If div.TextFields.Any(Function(element) element.Name = "xhpc_message_text") Then
                    div.TextField(Find.ByName("xhpc_message_text")).SetAttributeValue("InnerText", postTextBox.Text)
                End If
            End If
    
            Dim form = _browser.Forms.Where(Function(element) element.GetAttributeValue("action").Contains("/ajax/updatestatus.php")).FirstOrDefault()
            form.Submit()
    
            If Not String.IsNullOrEmpty(My.MySettings.Default.CaptchaId) Then
                If _browser.TextFields.Any(Function(element) element.Name = "recaptcha_response_field") Then
                    Dim captcha As String = Nothing
                    SuperToolfacebook.GetCaptcha(_browser, "http://www.google.com/recaptcha/api/image?c", captcha,
                                                  My.MySettings.Default.CaptchaId, My.MySettings.Default.CaptchaPass)
    
                    
                    _browser.TextField(Find.ByName("recaptcha_response_field")).SetAttributeValue("InnerText", captcha)
                    form = _browser.Forms.Where(Function(element) element.GetAttributeValue("action").Contains("/ajax/updatestatus.php")).FirstOrDefault()
                    form.Submit()
                ElseIf _browser.TextFields.Any(Function(element) element.Id = "captcha_response") Then
                    Dim captcha As String = Nothing
                    SuperToolfacebook.GetCaptcha(_browser, "http://www.google.com/recaptcha/api/image?c", captcha,
                                                  My.MySettings.Default.CaptchaId, My.MySettings.Default.CaptchaPass)
    
                    _browser.TextField(Find.ById("captcha_response")).SetAttributeValue("InnerText", captcha)
                    form = _browser.Forms.Where(Function(element) element.GetAttributeValue("action").Contains("/ajax/updatestatus.php")).FirstOrDefault()
                    form.Submit()
                End If
            End If

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    294

    Re: How to avoid or close automatically this popup in Internet Explorer? - Please he

    some help?

  3. #3
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: How to avoid or close automatically this popup in Internet Explorer? - Please he

    I would think that detecting it would be at least as difficult as closing it so without specific details it's hard to be definitive. Have you tried a simple SendKeys of Chr(13)?
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  4. #4
    New Member
    Join Date
    Dec 2012
    Posts
    2

    Re: How to avoid or close automatically this popup in Internet Explorer? - Please he

    Going into the properties of the web browser and suppressing error messages should fix this problem!

  5. #5
    New Member
    Join Date
    Feb 2001
    Location
    Cd. Juarez, Chih., Mexico
    Posts
    5

    Re: How to avoid or close automatically this popup in Internet Explorer? - Please he

    I have the same issue, not solve jet.

    I have a vbscript:


    Call AppAct()
    MsgBox "End"
    Sub AppAct()

    Set x = CreateObject("wscript.shell")
    x.AppActivate("Windows Internet Explorer")

    X.Sendkeys "{Enter}"
    WScript.Sleep 3000

    End Sub


    But I will like to do all true VB.net ( version 2017)

  6. #6
    Frenzied Member jdc20181's Avatar
    Join Date
    Oct 2015
    Location
    Indiana
    Posts
    1,168

    Re: How to avoid or close automatically this popup in Internet Explorer? - Please he

    See here is the thing, trying to control the actual Internet Explorer Application is all possible, but far too complicated than just adding a Webbrowser control, and doing it that way, then you can supress errors, and block popups manually. It all really depends on your IE settings. If you block popups, no matter how you executive IE it should still block them. should
    Disclaimer: When code is given for example - it is merely a example.




    Unless said otherwise indicated - All Code snippets advice or otherwise that I post on this site, are expressly licensed under Creative Commons Attribution 4.0 International Please respect my copyrights.

  7. #7
    Frenzied Member
    Join Date
    Oct 2012
    Location
    Tampa, FL
    Posts
    1,187

    Re: How to avoid or close automatically this popup in Internet Explorer? - Please he

    Quote Originally Posted by jdc20181 View Post
    See here is the thing, trying to control the actual Internet Explorer Application is all possible, but far too complicated than just adding a Webbrowser control, and doing it that way, then you can supress errors, and block popups manually. It all really depends on your IE settings. If you block popups, no matter how you executive IE it should still block them. should
    It is the same thing. In the case of an instance of IE, instead of ScriptErrorsSupressed, you handle the Silent property:

    Code:
            Dim IE = New SHDocVw.InternetExplorer();
            IE.Silent = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width