I am having difficulty with the following VBS code. It only works occasionally, and even then it completes quickly. Why?
Dim Butt Set Butt = CreateObject("InternetExplorer.application") Butt.visible = True Butt2 = InputBox("Put the link to one hat you would like to snipe.", "Hat Selection") Butt3 = InputBox("Enter the maximum amount of Robux you will spend on this hat.", "Maximum Payment") Dim Proace Set Proace = CreateObject("Microsoft.XMLHTTP") Proace.Open "GET", "http://www.roblox.com", False Proace.Send Do Do While Butt.Busy WScript.sleep 200 Loop St00f = CInt(Replace(Mid(St00f, (InStr(St00f, ">R$")+3), 8), "</b>", "")) If St00f <= CInt(Butt3) Then Butt.Navigate "javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions(""ctl00$cphRoblox$TabbedInfo$UserSalesTab$lstItemsForResale$ctrl0$lnkBuyNow"",%20"""",%20true,%20"""",%20"""",%20false,%20true))" Exit Do End If Loop Do While Butt.Busy WScript.sleep 200 Loop MsgBox("Congratulations! Your snipe was successful! You sniped "&Butt2&" for "&Butt3&" Robux!") Butt.Quit Set Butt = Nothing Set Proace = Nothing WScript.Quit
Error:
Script: C:\Users\John\Downloads\SingleHatSniper.vbs Line: 14 Char: 1 Error: Type mismatch: 'CInt' Code: 800A000D Source: Microsoft VBScript runtime error
Please help me, I'm not so good at VBS. Itβs clear, my friend helped me write this.
source share