|
-
May 13th, 2021, 08:07 AM
#1
Thread Starter
New Member
Simple But Professional Visual Basic Auto Typer
Good morning, there's one implement I want in my project which is an autotyper. Similar to the way KeyPass AutoTyper works, but less advanced disregarding sequences.
I'm trying to code an autotyper which when I press the start button it will simply just await for a text field(like SendKeys.Send), and it will send each character in the string to a text field in order and will stop the autotyper automatically once the entire string was sent.
I tried various methods including using for each character in a string sendkeys, but it always doesn't work properly. For an example, I run the project and go to the Auto Type Form, which is an external form using autotypeform.show, it also has topmost on it so when i go to a browser it's still visible, once you the click start button it starts the autotyper timer in main form, once i go to a text field(google.com search bar for an example) it will sendkeys but not the entire string or it will occasionally skip a character. Can someone please help?
NOTE: There is also a registered hotkey (ALT + T) to start the timer, and the timer interval is 1000, I tried 1-2000.
Code:
Private Sub autoTyper_Tick(sender As Object, e As EventArgs) Handles autoTyper.Tick
Dim Text As String = autoTypeForm.setText.Text
'ATTEMPT 1
'For i = 0 To autoTypeForm.setText.Text.Length - 1
'SendKeys.Send(Text(i))
'Next
'ATTEMPT 2
'Dim Counter As Integer
'For Counter = 1 To Len(Text)
'SendKeys.Send(Mid(Text, Counter, 1))
'Next
'ATTEMPT 3
For Each c As Char In Text
SendKeys.Send(c)
Next
autoTyper.Stop()
End If
Last edited by shatayviamcduffie; May 13th, 2021 at 08:13 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|