[Release] String Sender DLL

Posts 16–30 of 32 · Page 2 of 3
Quote Originally Posted by Jason View Post


Hey, I didn't ask for the sticky and it's 69 lines of code oddly enough Although I tend to have a lot of gap lines /. Do with it what you will, I'm not too fussed.
18 lines of code

we subtract other API

Code:
<DllImport("user32", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function keybd_event(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) As Long
End Function


<DllImport("user32", EntryPoint:="VkKeyScanA", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function VkKeyScan(ByVal yourchar As Char) As Integer
End Function

 

Private Const KEYEVENTF_KEYUP As Integer = 2
Non of that code counts.

Just this

Code:
Public Sub SendString(ByVal WhatToSend As String, ByVal PauseLength As Integer)
    WhatToSend = WhatToSend.ToLower
    Dim num As Integer = 0
    Try 
        Do While (num <> WhatToSend.Length)
            StringSend.keybd_event(CByte(StringSend.VkKeyScan(WhatToSend.Chars(num))), 0, 0, 0)
            Thread.Sleep(10)
            StringSend.keybd_event(CByte(StringSend.VkKeyScan(WhatToSend.Chars(num))), 0, 2, 0)
            num += 1
            Thread.Sleep(PauseLength)
        Loop
    Catch exception1 As Exception
        ProjectData.SetProjectError(exception1)
        Dim exception As Exception = exception1
        ProjectData.ClearProjectError
    End Try
End Sub

 

 
Public Sub SendKey(ByVal WhichKey As Integer)
    StringSend.keybd_event(CByte(WhichKey), 0, 0, 0)
    Thread.Sleep(10)
    StringSend.keybd_event(CByte(WhichKey), 0, 2, 0)
End Sub

So essentially the dll is a snippet pre configured as a .dll for easy reference. it would make a great addition to the API
Quote Originally Posted by NextGen1 View Post


10 lines of code

we subtract other API

Code:
<DllImport("user32", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function keybd_event(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) As Long
End Function


<DllImport("user32", EntryPoint:="VkKeyScanA", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Shared Function VkKeyScan(ByVal yourchar As Char) As Integer
End Function

 

Private Const KEYEVENTF_KEYUP As Integer = 2
Non of that code counts.

Just this

Code:
Public Sub SendString(ByVal WhatToSend As String, ByVal PauseLength As Integer)
    WhatToSend = WhatToSend.ToLower
    Dim num As Integer = 0
    Try 
        Do While (num <> WhatToSend.Length)
            StringSend.keybd_event(CByte(StringSend.VkKeyScan(WhatToSend.Chars(num))), 0, 0, 0)
            Thread.Sleep(10)
            StringSend.keybd_event(CByte(StringSend.VkKeyScan(WhatToSend.Chars(num))), 0, 2, 0)
            num += 1
            Thread.Sleep(PauseLength)
        Loop
    Catch exception1 As Exception
        ProjectData.SetProjectError(exception1)
        Dim exception As Exception = exception1
        ProjectData.ClearProjectError
    End Try
End Sub

 

 
Public Sub SendKey(ByVal WhichKey As Integer)
    StringSend.keybd_event(CByte(WhichKey), 0, 0, 0)
    Thread.Sleep(10)
    StringSend.keybd_event(CByte(WhichKey), 0, 2, 0)
End Sub

So essentially the dll is a snippet pre configured as a .dll for easy reference. it would make a great addition to the API
You forgot SendString and PressTwoKeys I know it's not a massive project, I never said it was. All I claimed it to be was a nice easy precompiled reference for people looking for a SendKey alt so I don't retype the same answer in every 100 threads in this section
Oh... Don't get me wrong, I love it Anything to make my life easy, that's why I make wrappers all the time. To make my life easy in the future

So deff. addition to API. Credits to you
Quote Originally Posted by NextGen1 View Post
Oh... Don't get me wrong, I love it Anything to make my life easy, that's why I make wrappers all the time. To make my life easy in the future

So deff. addition to API. Credits to you
Thanking you muchly I think I am the definition of the lazyman when it comes to programming lol, anything to get out of repetitive lines is a must!
Quote Originally Posted by Jason View Post


Thanking you muchly I think I am the definition of the lazyman when it comes to programming lol, anything to get out of repetitive lines is a must!
everyone should be like you
Quote Originally Posted by 'Bruno View Post
everyone should be like you
I know right
I agree, I have to essentially write the wrapper or class library first. But after that, I can reuse it, so yes I am lazy , despite the amount of work I have to do. Less is better .
Quote Originally Posted by NextGen1 View Post
I agree, I have to essentially write the wrapper or class library first. But after that, I can reuse it, so yes I am lazy , despite the amount of work I have to do. Less is better .
Less is definitely always more when it comes to programming haha, I've been slowly building my own snippets vault in a folder on my computer whenever I write out a cool little function I might be able to re-use later, it's really handy. I should really try and set up my own little local database for it so I can have a search function . Ahh too many projects and too little time, damn you exams
NOOO DON'T DO THAT THATS MY IDEA xD
I to have a folder with VB Snippets, and i'm making a database program
LET ME DO IT I'M A NEWBIE
Quote Originally Posted by Invidus View Post
NOOO DON'T DO THAT THATS MY IDEA xD
I to have a folder with VB Snippets, and i'm making a database program
LET ME DO IT I'M A NEWBIE
Calm down buddy, I said a local database, i.e for my personal use only. Feel free to make your own, Blubb already has one stickied /
hey thanks alot bud should make thing easier keep up the good work
Quote Originally Posted by Maniac101 View Post
hey thanks alot bud should make thing easier keep up the good work
No problems, glad you enjoyed it
Quote Originally Posted by Jason View Post


Calm down buddy, I said a local database, i.e for my personal use only. Feel free to make your own, Blubb already has one stickied /
If you need help with it, yk.. /
stupid question here whats string ? can u explain me what this does ?
Quote Originally Posted by iFrank1 View Post
stupid question here whats string ? can u explain me what this does ?
String is like...a series of letters as you would type them normally, i.e

"Hello I'm J-Deezy" is an example of string

This DLL allows you to send messages/keypress via your program. Off the top of my head a few applications would be

Spammer
Hotkey presser

---Anything to do with simulating keypressping
Posts 16–30 of 32 · Page 2 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us