I am using winLirc to receive date from my Packard Bell Fast media IR
remote. The problem I have is that Winsock1_DataAr rival(ByVal bytesTotal As
Long) Is called two times almost every time I press a button on my
remote.Way is it doing that???
This is the code I am using but I don't know how has made it...
It works fine and i can make WinAmp5 play, stop, Next and back etc with a
few adds to it. The problem is that the Winsock1_DataAr rival some times, not
always, think that I have pressed a button on my remote two times... This
makes WinAmp Next and back not that good...
WinLirc shows with a green button when I press the remote and it blink green
ones each time I press a button.
Is it something in WinLirc or is it how WinLirc translate my remote that is
wrong?
Or is it in this code???
Plz help me I wold be so happy if I could program my remote with the use of
winLirc
Option Explicit
Dim Counter As Integer
Private Sub Form_Load()
Counter = 1
Dim strLocalIP As String
strLocalIP = Winsock1.LocalI P
Winsock1.Protoc ol = sckTCPProtocol
Winsock1.Remote Host = strLocalIP
Winsock1.Remote Port = 8765
Winsock1.Connec t
End Sub
Private Sub Winsock1_DataAr rival(ByVal bytesTotal As Long)
Dim strData As String
Dim strRemoteHex, strRemoteName, strRemoteKey As String
Dim intRemoteIdx, intSeperatorOne , intSeperatorTwo As Integer
Winsock1.GetDat a strData, vbString
Text1.Text = strData 'Messagestring from WinLirc
strRemoteHex = Left(strData, 16)
intRemoteIdx = Val(Mid$(strDat a, 18, 2))
intSeperatorOne = InStr(21, strData, " ", vbBinaryCompare )
strRemoteKey = Mid$(strData, 21, intSeperatorOne - 21) 'Code of the Key
from Remote Control
intSeperatorTwo = InStr(intSepera torOne, strData, Chr(10),
vbBinaryCompare )
strRemoteName = Mid$(strData, intSeperatorOne + 1, (intSeperatorTw o -
intSeperatorOne ) - 1) 'Name of the Key - defined in WinLircServer
Text2.Text = "KEY:" & strRemoteKey & " Control:" & strRemoteName
End Sub
Yours, Jonas
remote. The problem I have is that Winsock1_DataAr rival(ByVal bytesTotal As
Long) Is called two times almost every time I press a button on my
remote.Way is it doing that???
This is the code I am using but I don't know how has made it...
It works fine and i can make WinAmp5 play, stop, Next and back etc with a
few adds to it. The problem is that the Winsock1_DataAr rival some times, not
always, think that I have pressed a button on my remote two times... This
makes WinAmp Next and back not that good...
WinLirc shows with a green button when I press the remote and it blink green
ones each time I press a button.
Is it something in WinLirc or is it how WinLirc translate my remote that is
wrong?
Or is it in this code???
Plz help me I wold be so happy if I could program my remote with the use of
winLirc
Option Explicit
Dim Counter As Integer
Private Sub Form_Load()
Counter = 1
Dim strLocalIP As String
strLocalIP = Winsock1.LocalI P
Winsock1.Protoc ol = sckTCPProtocol
Winsock1.Remote Host = strLocalIP
Winsock1.Remote Port = 8765
Winsock1.Connec t
End Sub
Private Sub Winsock1_DataAr rival(ByVal bytesTotal As Long)
Dim strData As String
Dim strRemoteHex, strRemoteName, strRemoteKey As String
Dim intRemoteIdx, intSeperatorOne , intSeperatorTwo As Integer
Winsock1.GetDat a strData, vbString
Text1.Text = strData 'Messagestring from WinLirc
strRemoteHex = Left(strData, 16)
intRemoteIdx = Val(Mid$(strDat a, 18, 2))
intSeperatorOne = InStr(21, strData, " ", vbBinaryCompare )
strRemoteKey = Mid$(strData, 21, intSeperatorOne - 21) 'Code of the Key
from Remote Control
intSeperatorTwo = InStr(intSepera torOne, strData, Chr(10),
vbBinaryCompare )
strRemoteName = Mid$(strData, intSeperatorOne + 1, (intSeperatorTw o -
intSeperatorOne ) - 1) 'Name of the Key - defined in WinLircServer
Text2.Text = "KEY:" & strRemoteKey & " Control:" & strRemoteName
End Sub
Yours, Jonas
Comment