deleteme.frm
上传用户:ling1220
上传日期:2007-01-10
资源大小:313k
文件大小:2k
源码类别:

Telnet客户端

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3195
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3195
  10.    ScaleWidth      =   4680
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command1 
  13.       Caption         =   "Command1"
  14.       Height          =   735
  15.       Left            =   1260
  16.       TabIndex        =   0
  17.       Top             =   720
  18.       Width           =   1635
  19.    End
  20. End
  21. Attribute VB_Name = "Form1"
  22. Attribute VB_GlobalNameSpace = False
  23. Attribute VB_Creatable = False
  24. Attribute VB_PredeclaredId = True
  25. Attribute VB_Exposed = False
  26. Private Sub Command1_Click()
  27. Dim SearchP
  28. Dim i
  29. Dim TempTrigger
  30. Dim vals(9) ' $1 to $10
  31. 'For i = 0 To Trigger.ListCount - 1
  32.     'templist=triggerlist(i)
  33.     'trigtxt = triggertxt(i)
  34.     If InStr(templist, "*") Then
  35. incoming = UCase(incoming) 'input
  36. templist = "* testing * for *" 'trigger
  37. triggtxt = "Value1 = $0, value2 =$1, value3= $2." 'output
  38.         
  39.         TempTrigger = UCase(templist)
  40.         
  41.         If incoming Like TempTrigger Then
  42.             SearchP = 1
  43.             On Error Resume Next
  44.             For i = 0 To 9
  45.                 incoming = Mid(incoming, InStr(TempTrigger, "*"))
  46.                 TempTrigger = Mid(TempTrigger, InStr(TempTrigger, "*") + 1)
  47.                 If Err Then Exit For
  48.                 Do
  49.                     vals(i) = vals(i) + Left(incoming, 1)
  50.                     incoming = Mid(incoming, 2)
  51.                 Loop Until incoming Like TempTrigger
  52.             Next i
  53.         
  54.         For i = 0 To 9
  55.             If InStr(triggtxt, "$" + Trim(Str(i))) Then
  56.                 tmpfront = InStr(triggtxt, "$" + Trim(Str(i))) - 1
  57.                 tmpback = tmpfront + 3
  58.                 triggtxt = Left(triggtxt, tmpfront) + vals(i) + Mid(triggtxt, tmpback)
  59.                 End If
  60.         Next i
  61.         MsgBox triggtxt
  62.         End
  63.         TempTrigger = triggtxt
  64.         'TempTrigger = Triggertxt(i)
  65.         Else
  66.             SearchP = 0
  67.         End If
  68.     End If
  69.     
  70.     If SearchP > 0 Then
  71.         MsgBox "Found: output = " + TempTrigger
  72.  '       Socket1.Write Triggertxt(i), Len(Triggertxt(i))
  73.     End If
  74.     
  75. 'Next i
  76. End Sub