1 Replies - 1479 Views - Last Post: 27 October 2011 - 09:03 PM Rate Topic: -----

#1 justin3636  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-October 11

VB.NET Keybinder: sendkeys.send interacts with hotkey

Posted 27 October 2011 - 08:47 PM

Okay so this is my code.

Code:
 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
     
          Static nVal1 As Boolean

           If GetAsyncKeyState(Keys.A) = 0 Then
                If nVal1 Then
                    SendKeys.Send(GrpTxt1.Text)
                    SendKeys.Send("{Enter}")
                 nVal1 = CBool(GetAsyncKeyState(Keys.A))
      End If
    End Sub


The problem is whenever it sends the text to another forum using the hotkey it works fine, But if the GrpTxt1 text contains the hotkey name it spams it it because the key is sending over and over again because it contains "A" the hotkey in the text. Please help ):

This post has been edited by macosxnerd101: 27 October 2011 - 09:04 PM
Reason for edit:: Please use code tags


Is This A Good Question/Topic? 0
  • +

Replies To: VB.NET Keybinder: sendkeys.send interacts with hotkey

#2 DimitriV  Icon User is online

  • They don't think it be like it is, but it do
  • member icon

Reputation: 568
  • View blog
  • Posts: 2,709
  • Joined: 24-July 11

Re: VB.NET Keybinder: sendkeys.send interacts with hotkey

Posted 27 October 2011 - 09:03 PM

Please post between code tags.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1