Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Requests
Automated bot for betting form
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="flyest" data-source="post: 352849" data-attributes="member: 29020"><p>I actually got it all working now.</p><p>It does the mathematics itself. But since I coded everything inside Button1_Click I have to click it in order for it to make the bet and click 'Enter'.</p><p>Not a really big deal though. It should be easy to code. </p><p>[SPOILER="Code"]</p><p>[CODE] Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load</p><p> WebBrowser1.Navigate("http://mafiaenshevn.com/?casino=kronmynt")</p><p> WebBrowser1.ScriptErrorsSuppressed = True</p><p> End Sub</p><p></p><p> Private Sub button1_Click(sender As Object, e As EventArgs) Handles Button1.Click</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "100000")</p><p> Dim elc As HtmlElementCollection = Me.WebBrowser1.Document.GetElementsByTagName("input")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> If WebBrowser1.DocumentText.Contains("Du vant") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "100000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 100") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "200000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 200") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "400000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 400") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "800000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 800") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "1600000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 1 600") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "3200000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 3 200") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "6400000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 6 400") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "12800000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 12 800") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "25600000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> If WebBrowser1.DocumentText.Contains("Du tapte 25 600") Then</p><p> WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "51200000")</p><p> For Each el As HtmlElement In elc</p><p> If el.GetAttribute("type").Equals("submit") Then</p><p> el.InvokeMember("Click")</p><p> End If</p><p> Next</p><p> End If</p><p> End Sub[/CODE]</p><p>[/SPOILER]</p><p>Thanks to [USER=1634]@Donkee[/USER] for helping me. It was <strong>much</strong> easier in Visual Basic. <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="flyest, post: 352849, member: 29020"] I actually got it all working now. It does the mathematics itself. But since I coded everything inside Button1_Click I have to click it in order for it to make the bet and click 'Enter'. Not a really big deal though. It should be easy to code. [SPOILER="Code"] [CODE] Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load WebBrowser1.Navigate("http://mafiaenshevn.com/?casino=kronmynt") WebBrowser1.ScriptErrorsSuppressed = True End Sub Private Sub button1_Click(sender As Object, e As EventArgs) Handles Button1.Click WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "100000") Dim elc As HtmlElementCollection = Me.WebBrowser1.Document.GetElementsByTagName("input") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next If WebBrowser1.DocumentText.Contains("Du vant") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "100000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 100") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "200000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 200") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "400000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 400") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "800000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 800") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "1600000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 1 600") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "3200000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 3 200") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "6400000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 6 400") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "12800000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 12 800") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "25600000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If If WebBrowser1.DocumentText.Contains("Du tapte 25 600") Then WebBrowser1.Document.GetElementById("innsats").SetAttribute("value", "51200000") For Each el As HtmlElement In elc If el.GetAttribute("type").Equals("submit") Then el.InvokeMember("Click") End If Next End If End Sub[/CODE] [/SPOILER] Thanks to [USER=1634]@Donkee[/USER] for helping me. It was [B]much[/B] easier in Visual Basic. :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Requests
Automated bot for betting form
Top