Re: Telnet and Visual Foxpro (General questions)
Hi,
Please try something like this in VisualFoxPro_
[code]
Private Sub SSHD1_LoginPassword(ByVal User As wodSSHDComLIB.ISSHUser, ByVal Login As String, ByVal Password As String, Action As wodSSHDComLIB.SSHActions)
Action = Allow
End Sub
Private Sub SSHD1_ServiceStart(ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ByVal ServiceType As wodSSHDComLIB.SSHServiceTypes, ByVal ServiceName As String)
User.Send 1. Border Scanning & vbCrLf
User.Send 2. Bottom Scanning & vbCrLf
User.Send 3. Panel Scanning & vbCrLf
User.Send 4. Label Scanning & vbCrLf
User.Send 5. Build-Up Scanning & vbCrLf
User.Send 6. Print Report & vbCrLf
SendPrompt User
End Sub
Private Sub SendPrompt(ByVal User As wodSSHDComLIB.ISSHUser)
User.Send vbCrLf & vbCrLf & command>
End Sub
Private Sub SSHD1_ServiceRequest(ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ServiceType As wodSSHDComLIB.SSHServiceTypes, ServicePath As String, Action As wodSSHDComLIB.SSHActions)
ServiceType = stNone
End Sub
Private Sub SSHD1_Received(ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ByVal BytesCount As Long)
Dim a As String
Dim i As Integer
a = User.Receive
User.Send a
User.Tag = User.Tag + a
i = InStr(1, User.Tag, Chr$(13))
If (i < 1) Then i = InStr(1, User.Tag, Chr$(10))
If i > 0 Then
a = LCase$(Left$(User.Tag, i - 1))
User.Send vbCrLf
Select Case a
Case 1
User.Send You have choose Border Scanning
Case 2
User.Send You have choose Bottom Scanning
Case 3
User.Send You have choose Panel Scanning
Case 4
User.Send You have choose Label Scanning
Case 5
User.Send You have choose Build-Up Scanning
Case 6
User.Send You have choose Print Report
Case exit
User.Send Bye!
User.Disconnect
Exit Sub
Case
' do nothing
Case Else
User.Send Invalid command!
End Select
User.Tag =
SendPrompt User
End If
End Sub
[/code]
Let us know how it goes.
Regards,
Drazen
Complete thread:
- Telnet and Visual Foxpro - jtrogdon, 2007-01-10, 15:16
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-10, 16:03
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-10, 16:30
- Re: Telnet and Visual Foxpro - wodDamir, 2007-01-10, 16:41
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-11, 20:19
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-11, 20:36
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-11, 21:25
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-12, 15:17
- Re: Telnet and Visual Foxpro - wodDamir, 2007-01-12, 15:47
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-13, 16:40
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-13, 17:45
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-16, 15:57
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-16, 16:11
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-16, 16:17
- Re: Telnet and Visual Foxpro - wodDamir, 2007-01-16, 22:06
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-16, 22:19
- Re: Telnet and Visual Foxpro - wodDamir, 2007-01-16, 22:44
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-16, 22:19
- Re: Telnet and Visual Foxpro - wodDamir, 2007-01-16, 22:06
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-16, 16:17
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-16, 16:11
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-16, 15:57
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-13, 17:45
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-13, 16:40
- Re: Telnet and Visual Foxpro - wodDamir, 2007-01-12, 15:47
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-12, 15:17
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-11, 21:25
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-11, 20:36
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-11, 20:19
- Re: Telnet and Visual Foxpro - wodDamir, 2007-01-10, 16:41
- Re: Telnet and Visual Foxpro - jtrogdon, 2007-01-10, 16:30
- Re: Telnet and Visual Foxpro - woddrazen, 2007-01-10, 16:03