@riley Are you talking to me...? (Why quote me) edit* nvm- plz don't make post just to reply to me..
https://bytes.com/topic/visual-basic-...nding-sendkeys
apparently you can't just SendKeys() with ANY text..certain characters, like the + symbol, need to have "{ }" brackets around them.
/quote Shiva @ bytes.com
Code:
<mdsn>
The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses
() have special meanings to SendKeys. To specify one of these characters,
enclose it within braces ({}). For example, to specify the plus sign, use
"{+}". To specify brace characters, use "{{}" and "{}}". Brackets ([ ]) have
no special meaning to SendKeys, but you must enclose them in braces.
</msdn>
^^ I was playing around with it and kept getting errors on left-parenthesis "(" ..same thing I guess
Why do you need to send so much text lol?
+be careful not to do this in game chat, talking too fast might not get flagged, but people will notice if you type 200 wpm.
maybe try controlling how big of text you put into SendKeys()? Maybe limit it to 200 or something even smaller? If that can work for you? Break it into smaller chunks and SendKeys() each chunk.
something like
Code:
Public Sub SendTextGoGame(ByVal msg As String)
AppActivate("New Text Document - Notepad")
Dim _sb As New System.Text.StringBuilder(msg)
Dim _tmpStr As String = ""
If msg.Length > 10 Then
'break it into chunks
Do Until _sb.Length <= 10
_tmpStr = Mid(_sb.ToString, 1, 10)
SendKeys.SendWait(_tmpStr)
_sb.Remove(0, 10)
Threading.Thread.Sleep(2500)
Loop
If _sb.Length > 0 Then
'send last remaining piece
SendKeys.SendWait(_sb.ToString)
End If
Else
'send 1 little piece
SendKeys.Send(msg)
End If
End Sub
''stringbuilder probably isn't more efficient when used this way. .Remove() was nice. Mid() could work just as well.
^^ofc change the hardcoded 10's and remove the .Sleep(), etc. it's *just an example!*
so, is that the problem? you're trying to send text which contains chars like + ( [ + % etc?