pixartist Posted January 2, 2008 Share Posted January 2, 2008 (edited) hi i wrote the following: expandcollapse popupWhile 1 Sleep(1) if _IsPressed ( 25 ) Then ;left if $left == False Then TCPSend($ConnectedSocket, "{" & $leftButton & " DOWN}|") $left = True EndIf Else if $left == True Then TCPSend($ConnectedSocket, "{" & $leftButton & " UP|") $left = False EndIf EndIf if _IsPressed ( 26 ) Then ;up if $up == False Then TCPSend($ConnectedSocket, "{" & $upButton & " DOWN}|") $up = True EndIf Else if $up == True Then TCPSend($ConnectedSocket, "{" & $upButton & " UP}|") $up = False EndIf EndIf if _IsPressed ( 27 ) Then ;right if $right == False Then TCPSend($ConnectedSocket, "{" & $rightButton & " DOWN}|") $right = True EndIf Else if $right == True Then TCPSend($ConnectedSocket, "{" & $rightButton & " UP}|") $right = False EndIf EndIf if _IsPressed ( 28 ) Then ;down if $down == False Then TCPSend($ConnectedSocket, "{" & $downButton & " DOWN}|") $down = True EndIf Else if $down == True Then TCPSend($ConnectedSocket, "{" & $downButton & " UP}|") $down = False EndIf EndIf if _IsPressed ( 10 ) Then ;shift if $shift == False Then TCPSend($ConnectedSocket, "{" & $boostButton & " DOWN}|") $shift = True EndIf Else if $shift == True Then TCPSend($ConnectedSocket, "{" & $boostButton & " UP}|") $shift = False EndIf EndIf if _IsPressed ( 11 ) Then ;ctrl MsgBox(0,"",_IsPressed ( 11 )); if $ctrl == False Then TCPSend($ConnectedSocket, "{" & $useButton & " DOWN}|") $ctrl= True EndIf Else if $ctrl == True Then TCPSend($ConnectedSocket, "{" & $useButton & " UP}|") $ctrl = False EndIf EndIf now the ctrl and shift part is ALWAYS sent when i press left ( 25 ), all the other buttons are working fine, but the left button seems to trigger more... this is what the server gets for 1(!) keypress of left: 192.168.0.3 > {CTRL DOWN}|{SHIFT DOWN}|{CTRL UP}|{SHIFT UP}| 192.168.0.3 > {A UP| 192.168.0.3 > {A DOWN}| EDIT: maaaaah forgot one "}" Edited January 2, 2008 by pixartist Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now