Advanced typer

Discussion in 'Programming General' started by PixxelJunk, Jun 4, 2011.

Advanced typer
  1. Unread #1 - Jun 4, 2011 at 1:54 PM
  2. PixxelJunk
    Joined:
    Jun 4, 2011
    Posts:
    57
    Referrals:
    0
    Sythe Gold:
    0

    PixxelJunk Member

    Advanced typer

    Hello forum

    I just registered here and this is my first post, but I've been browsing the forums for several years. I just never really felt the need to make a post.

    Last week I started working on an autotyper in VB.net, which worked out really well. So I decided to give it extra features that only few other autotypers have: colorcode preview, customizeable hotkeys, typing speed, loading/saving from and to TXT files, ....

    Now I'd like to get this out on the internet as closed-source, freeware software but I don't really know where. Can I post it here? Do I need a moderator's approval first?
     
  3. Unread #2 - Jul 7, 2011 at 7:47 PM
  4. Blondi
    Joined:
    Jan 21, 2007
    Posts:
    1,458
    Referrals:
    0
    Sythe Gold:
    0

    Blondi Guru
    Banned

    Advanced typer

    For color code previews you'd have to continually refresh a Static or disabled Text field to check if the text in the autotyper's text box begins with the color prefix; the Left() function does exactly this:
    Code:
    If Left(Textbox.Text, 4) = "red:" Then
    ' Make the preview red
    Else If Left(Textbox.Text, 6) = "green:" Then
    ' Make the preview green
    ' And so on...
    
    For typing speed, you'll need to write your own SendKeys clone that allows you to pause between each keypress for an interval. There is no .NET way of doing this; you'd have to make use of the Win32 functions keybd_event or SendInput (I find the former is much more efficient despite being "deprecated").

    Good luck.
     
  5. Unread #3 - Jul 8, 2011 at 12:06 AM
  6. PixxelJunk
    Joined:
    Jun 4, 2011
    Posts:
    57
    Referrals:
    0
    Sythe Gold:
    0

    PixxelJunk Member

    Advanced typer

    For the color preview, I just used radiobuttons with the mouse_enter event set to something like
    Code:
    sub rdbRed_MouseEnter(sender, e) handles ....
    me.rdb.forecolor = Red
    end sub
    and to change it back to normal

    Code:
    sub rdbRed_MouseLeave(sender, e) handles ....
    me.rdb.forecolor = ControlText
    end sub
    And for the typing speed, I simply loop through the string that I want to send and do
    Code:
    threading.thread.sleep(some neat calculation here)
    between every character. Also, I did use SendInput because SendKeys is really sketchy on windows 7 lol
     
  7. Unread #4 - Jul 26, 2011 at 6:43 PM
  8. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    Advanced typer

    Yes there is a .NET way, I've done it numerous times. You use SendKeys.SendWait() and an asynchronous Wait() method.
     
  9. Unread #5 - Jul 27, 2011 at 9:27 AM
  10. PixxelJunk
    Joined:
    Jun 4, 2011
    Posts:
    57
    Referrals:
    0
    Sythe Gold:
    0

    PixxelJunk Member

    Advanced typer

    lol guys do you even read what i say? just do it like this

    Code:
    private sub WhateverYouWantToCallIt
    dim strTextToSend as String = "whatever you want to send"
    dim intCount as integer = 0
    
    do until intCount = strTextToSend.length
    	sendkeys.sendwait(strTextToSend.substring(intcount,1))
    	threading.thread.sleep(100) 'adjust for different speeds
    	intCount += 1
    loop
    end sub
    
    simple as that, except that sendkeys doesn't work very well on vista/w7 so you'll probably want to use sendinput or w/e

    --
    so before anyone else tells me something's impossible, check out the link in my signature. i've released it as freeware (although donations are always appreciated). it's an executable, but if you don't trust it then simply don't use it (although you can reverse engineer the crap out of it if you really wanted to, i promise it will be a waste of time).
     
  11. Unread #6 - Jul 28, 2011 at 3:01 PM
  12. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    Advanced typer


    Didn't you read what I said? That sleep method freezes the current thread which is why it's better to use an asynchronous Wait() method so that your application doesn't fuck itself while your message is typing. And before you reply that your application works fine, you can't do shit-all while it's typing since the thread is frozen as opposed to all the actual good typers out there that don't use Sleep().
     
  13. Unread #7 - Jul 28, 2011 at 3:26 PM
  14. PixxelJunk
    Joined:
    Jun 4, 2011
    Posts:
    57
    Referrals:
    0
    Sythe Gold:
    0

    PixxelJunk Member

    Advanced typer

    lol ever heard of multithreading?
     
  15. Unread #8 - Jul 30, 2011 at 5:00 AM
  16. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    Advanced typer

    Why waste the time in making new threads and resolving cross-thread reference exceptions when you could make a 3-4 line asynchronous wait method?

    Here's something I cooked up a long time ago to solve the issue:
    Code:
      Public Declare Function timeGetTime Lib "winmm.dll" () As Long
    
        Public Sub Wait(ByVal value As Long)
    
            Dim cTime As Long
    
            cTime = timeGetTime()
    
            Do
                Application.DoEvents()
            Loop While cTime + value > timeGetTime()
    
        End Sub
    
    Replace your Thread.Sleep() method with Wait(). This won't freeze your application and doesn't require multi-threading.
     
  17. Unread #9 - Jul 30, 2011 at 6:15 AM
  18. PixxelJunk
    Joined:
    Jun 4, 2011
    Posts:
    57
    Referrals:
    0
    Sythe Gold:
    0

    PixxelJunk Member

    Advanced typer

    Since when did it became better to use external API's when there's a method readily available? 10 minutes extra work vs. getting all kinds of missing dll complaints, I've made my choice.
     
  19. Unread #10 - Jul 30, 2011 at 11:35 AM
  20. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    Advanced typer

    Um, winmm.dll has been shipped with Windows since 95 and NT and isn't going anywhere :\
     
< What runescape cheating site sells phishers? | Cybergate ***********[UPDATED]*********** >

Users viewing this thread
1 guest


 
 
Adblock breaks this site