-
Dec 23rd, 2012, 02:49 PM
#1
Thread Starter
Hyperactive Member
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
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
-
Dec 23rd, 2012, 09:32 PM
#2
Thread Starter
Hyperactive Member
Re: How to avoid or close automatically this popup in Internet Explorer? - Please he
-
Dec 24th, 2012, 02:17 PM
#3
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!
-
Dec 24th, 2012, 08:28 PM
#4
New Member
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!
-
Jul 12th, 2018, 04:39 PM
#5
New Member
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)
-
Jul 12th, 2018, 09:09 PM
#6
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.
-
Jul 16th, 2018, 10:09 PM
#7
Re: How to avoid or close automatically this popup in Internet Explorer? - Please he
Originally Posted by jdc20181
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|