Ciao a tutti,
In una TextBox inserisco dei testi separati dal carattere ";" che dopodichè rimando all'interno di un Input nel WebBrowser
Sfortunatamente non riesco ad estrarre tutti i messaggi, ma mi va ad incollare solamente l'ultimo...
Come mai? Qualche buona anima che mi possa aiutare? Erano anni che non programmavo e ora mi ritrovo in difficoltà.
codice:Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("textarea") For Each el As HtmlElement In htmlElements Dim messaggiofinale As String Dim messaggi As String() messaggi = TextBox8.Text.Split(New Char() {";"}) For Each messaggiofinale In messaggi If el.GetAttribute("name").Equals("status") Then el.SetAttribute("Value", messaggiofinale) End If Next Next Dim button As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("Input") For Each el2 As HtmlElement In button If el2.GetAttribute("name").Equals("update") Then el2.InvokeMember("click") End If Next Timer1.Stop() Timer1.Start() End Sub

Rispondi quotando