 |

06-04-2011, 06:54 PM
|
|
Member
|
|
Join Date: Jun 2011
Posts: 57
|
|
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?
|

07-08-2011, 12:47 AM
|
|
Guru
|
|
Join Date: Jan 2007
Posts: 1,455
|
|
Re: 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.
|

07-08-2011, 05:06 AM
|
|
Member
|
|
Join Date: Jun 2011
Posts: 57
|
|
Re: 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
|

07-26-2011, 11:43 PM
|
 |
i am a guy ok?? -.-
|
|
Join Date: Nov 2006
Location: Canada
Posts: 5,232
|
|
Re: Advanced typer
Quote:
Originally Posted by Blondi
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.
|
Yes there is a .NET way, I've done it numerous times. You use SendKeys.SendWait() and an asynchronous Wait() method.
|

07-27-2011, 02:27 PM
|
|
Member
|
|
Join Date: Jun 2011
Posts: 57
|
|
Re: 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).
Last edited by PixxelJunk : 07-27-2011 at 02:36 PM.
|

07-28-2011, 08:01 PM
|
 |
i am a guy ok?? -.-
|
|
Join Date: Nov 2006
Location: Canada
Posts: 5,232
|
|
Re: Advanced typer
Quote:
Originally Posted by PixxelJunk
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).
|
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().
|

07-28-2011, 08:26 PM
|
|
Member
|
|
Join Date: Jun 2011
Posts: 57
|
|
Re: Advanced typer
lol ever heard of multithreading?
|

07-30-2011, 10:00 AM
|
 |
i am a guy ok?? -.-
|
|
Join Date: Nov 2006
Location: Canada
Posts: 5,232
|
|
Re: Advanced typer
Quote:
Originally Posted by PixxelJunk
lol ever heard of multithreading?
|
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.
|

07-30-2011, 11:15 AM
|
|
Member
|
|
Join Date: Jun 2011
Posts: 57
|
|
Re: 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.
|

07-30-2011, 04:35 PM
|
 |
i am a guy ok?? -.-
|
|
Join Date: Nov 2006
Location: Canada
Posts: 5,232
|
|
Re: Advanced typer
Quote:
Originally Posted by PixxelJunk
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.
|
Um, winmm.dll has been shipped with Windows since 95 and NT and isn't going anywhere :\
|
 |
|