Help with SendKeysHuman

Discussion in 'Programming General' started by Rs2Cheater.net, Sep 27, 2007.

Help with SendKeysHuman
  1. Unread #1 - Sep 27, 2007 at 9:23 PM
  2. Rs2Cheater.net
    Joined:
    Jul 30, 2007
    Posts:
    65
    Referrals:
    0
    Sythe Gold:
    0

    Rs2Cheater.net Member

    Help with SendKeysHuman

    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
     
  3. Unread #2 - Sep 28, 2007 at 2:25 AM
  4. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Help with SendKeysHuman

    For vb6?
     
  5. Unread #3 - Sep 28, 2007 at 10:03 AM
  6. Maglor
    Referrals:
    0

    Maglor Guest

    Help with SendKeysHuman

    Id like it for VB.Net. I got the sendkeys thing, but a humantype would be better
     
  7. Unread #4 - Sep 28, 2007 at 11:09 AM
  8. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    Help with SendKeysHuman

    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!
     
  9. Unread #5 - Mar 9, 2008 at 4:01 AM
  10. Rs2Cheater.net
    Joined:
    Jul 30, 2007
    Posts:
    65
    Referrals:
    0
    Sythe Gold:
    0

    Rs2Cheater.net Member

    Help with SendKeysHuman

    I tryed this and it works but it makes loads of spelling mistakes?
     
  11. Unread #6 - Mar 9, 2008 at 11:35 AM
  12. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    Help with SendKeysHuman

    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.
     
  13. Unread #7 - Mar 10, 2008 at 2:51 AM
  14. Terrankiller
    Joined:
    May 7, 2005
    Posts:
    1,286
    Referrals:
    1
    Sythe Gold:
    1

    Terrankiller Ex-Administrator
    Retired Administrator Visual Basic Programmers

    Help with SendKeysHuman

    Why even use a timer? I'll write a couple functions for .net.
     
  15. Unread #8 - Mar 10, 2008 at 3:47 AM
  16. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    Help with SendKeysHuman

    I wrote it in a hurry, to be honest.

    -- not to mention it wasn't made to be the best.
     
< [request] Runescape Classic World Links | [REQ] Basic IDS >

Users viewing this thread
1 guest


 
 
Adblock breaks this site