Results 1 to 15 of 30

Hybrid View

  1. #1
    pootuba's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    1
    Private Declare Function GetTickCount Lib "kernel32" () As Long

    Sub Wait(ByVal cTime As Long)
    Dim sTime As Long

    sTime = GetTickCount + cTime

    Do While sTime >= GetTickCount
    Application.DoEvents()
    Loop
    End Sub

  2. #2
    silentrunner2's Avatar
    Join Date
    Jun 2008
    Gender
    male
    Posts
    629
    Reputation
    110
    Thanks
    2,871
    My Mood
    Busy
    Quote Originally Posted by pootuba View Post
    Private Declare Function GetTickCount Lib "kernel32" () As Long

    Sub Wait(ByVal cTime As Long)
    Dim sTime As Long

    sTime = GetTickCount + cTime

    Do While sTime >= GetTickCount
    Application.DoEvents()
    Loop
    End Sub
    Hi thanks for your input, im not sure if im executing this wrong but it seems to loop my code over and over so it doesn't stop running?

    Quote Originally Posted by abuckau907 View Post
    -Trying to keep it similar to your original / add as little new code as possible
    Code:
    Dim aRandomNumber As New Random() '' Used to generate random numbers (pseudo-random..)
    
    WebBrowser1.Document.GetElementById("iFirstName").Focus()
    WebBrowser1.Document.GetElementById("iFirstName").SetAttribute("value", TextBox1.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(1000,  2000)) ''Get a random number between 1000 and 2000 (1 to 2 seconds)
    WebBrowser1.Document.GetElementById("iLastName").Focus()
    WebBrowser1.Document.GetElementById("iLastName").SetAttribute("value", TextBox2.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(1000,  2000))
    WebBrowser1.Document.GetElementById("iBirthDay").Focus()
    WebBrowser1.Document.GetElementById("iBirthDay").SetAttribute("value", ComboBox2.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(1000,  2000))
    WebBrowser1.Document.GetElementById("iBirthMonth").Focus()
    WebBrowser1.Document.GetElementById("iBirthMonth").SetAttribute("value", ComboBox1.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(1000,  2000))
    WebBrowser1.Document.GetElementById("iBirthYear").Focus()
    WebBrowser1.Document.GetElementById("iBirthYear").SetAttribute("value", ComboBox3.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(1000,  2000)) 'maybe not needed here. ?
    or even,
    Code:
    Dim aRandomNumber As New Random() '' Used to generate random numbers (pseudo-random..)
    Dim minSleepTime as Int32 = 1000 '' in milliseconds, should be a const
    Dim maxSleepTime as Int32 = 2000 '' in milliseconds, should be a const
    
    WebBrowser1.Document.GetElementById("iFirstName").Focus()
    WebBrowser1.Document.GetElementById("iFirstName").SetAttribute("value", TextBox1.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(minSl  eepTime ,maxSleepTime)) ''Get a random number between min and max
    WebBrowser1.Document.GetElementById("iLastName").Focus()
    WebBrowser1.Document.GetElementById("iLastName").SetAttribute("value", TextBox2.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(minSl  eepTime ,maxSleepTime))
    WebBrowser1.Document.GetElementById("iBirthDay").Focus()
    WebBrowser1.Document.GetElementById("iBirthDay").SetAttribute("value", ComboBox2.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(minSl  eepTime ,maxSleepTime))
    WebBrowser1.Document.GetElementById("iBirthMonth").Focus()
    WebBrowser1.Document.GetElementById("iBirthMonth").SetAttribute("value", ComboBox1.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(minSl  eepTime ,maxSleepTime))
    WebBrowser1.Document.GetElementById("iBirthYear").Focus()
    WebBrowser1.Document.GetElementById("iBirthYear").SetAttribute("value", ComboBox3.Text)
    Threading.Thread.Sleep(aRandomNumber.GetNext(minSl  eepTime ,maxSleepTime)) 'maybe not needed here. ?
    -I think*, because this is going through a web-browser...generally there is nothing keeping track of "how fast" you type something in / how fast you switch between fields. With that being said..why not : )
    The sleep method works but for me but it freezes up the whole program so I can't see whats going on. I was also looking around a found this method but that seems to mess with the browser and freeze it.
    My Projects


    Don't Ask For Thanks Earn It
    You: "Please Give Thanks"
    Me: "...................No"

Similar Threads

  1. Looking for AWM Code or account.
    By Verial in forum Trade Accounts/Keys/Items
    Replies: 5
    Last Post: 06-18-2009, 12:32 PM
  2. [help] making account and playing warrock
    By Darky in forum WarRock Korea Hacks
    Replies: 6
    Last Post: 07-05-2007, 08:43 PM
  3. well make accounts!!!!!!!
    By damanis1 in forum WarRock Korea Hacks
    Replies: 13
    Last Post: 05-12-2007, 02:10 PM
  4. Make Accounts
    By ktalin91 in forum WarRock Korea Hacks
    Replies: 0
    Last Post: 05-09-2007, 01:32 PM
  5. Make accounts for US version?
    By chris9273 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 05-28-2006, 11:31 AM