• Log in or sign up for an account here: https://www.sythe.org/login

Help with SendKeysHuman

Joined
Jul 30, 2007
Sythe Gold
0
Messages
65
okay, i would post this in the VB 6 section but its been shut down.

Does anyone have any tuts or help they can give me for making a script that sends keys like a human. I have found some source code by searching sythe, however i would like to learn VB instead of just copying and pasting.

Ty :D
 
Id like it for VB.Net. I got the sendkeys thing, but a humantype would be better
 
Member of the Month Winner
Sythe's 10th Anniversary
just something simple. requires a timer called 'send', a textbox called 'msg_txt', and two buttons called 'start_btn' and 'stop_btn'

Code:
    Dim count As Integer = 0

    Private Function HumanKeys(ByVal Text As String) As Boolean
        If count = Text.Length Then count = 0 : Return True
        Console.WriteLine(count)
        Console.WriteLine(Text.Length - count)
        System.Windows.Forms.SendKeys.Send(Text.Substring(count, 1))
        count += 1
        Return False
    End Function

    Private Function GenInterval() As Integer
        Randomize()
        Dim R As New Random()
        Return R.Next(100, 500)
    End Function

    Private Sub start_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles start_btn.Click
        Send.Start()
    End Sub

    Private Sub stop_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stop_btn.Click
        Send.Stop()
    End Sub

    Private Sub Send_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Send.Tick
        Send.Interval = Math.Abs(GenInterval())
        If HumanKeys(msg_txt.Text) = True Then Send.Stop()
    End Sub

if you want the interval it types to be wider or shorter, edit the '100, 500' in GenInterval to whatever you want (in milliseconds), considering 100 is the minimum value and 500 is the max. Minimum value can't go below zero!
 
I tryed this and it works but it makes loads of spelling mistakes?
Mistakes would either be caused by logical errors in the code or by too short of an interval set between characters.

Also, the VB6 section has been reopened so if it's VB6 that you're interested in doing this for, you can now make a topic in there. I'd also be willing to help you if you like, my MSN is in my profile.
 
Member of the Month Winner
Sythe's 10th Anniversary
Why even use a timer? I'll write a couple functions for .net.
I wrote it in a hurry, to be honest.

-- not to mention it wasn't made to be the best.
 
Runescape Gamblingrunescape gambling
Back
Top