zhong147 发表于 2019-4-23 22:19:23

那个高手帮忙看下要怎么改

PutAttachment "C:\", "*.*"


Event Form1.Button2.Click //查询按钮

    If 判断绑定() = 1 Then
          
      Text = Plugin.File.ReadFileEx("C:\记录文件.txt")
      MyArray = Split(Text, "|")   
      If UBound(MyArray)>=0 Then
            i=0   
            For UBound(MyArray)   
                tmp = split(Cstr(MyArray(i)), "----")
                TracePrint tmp(0)
                If RTrim(tmp(0)) = Form1.InputBox2.Text Then
                  MessageBox tmp(1)
                  Exit For
                End If
               
                i = i + 1
                If i = UBound(MyArray) Then
                        MessageBox "查无此号..."
                End If
            Next
            
      End If   
          
    End If

End Event

Event Form1.Button1.Click //插入按钮

    If 判断绑定() = 1 Then
      系统时间 = Plugin.GetSysInfo.GetDateTime()
      TracePrint 系统时间
      Call Plugin.File.WriteFileEx("C:\记录文件.txt", Form1.InputBox1.Text & "----" & 系统时间)
      Call Plugin.Media.Play("C:\9725.wav")
      Form1.InputBox1.Text = ""
    End If
   
End Event

Event Form1.Button3.Click //绑定按钮
   
    IsFile = Plugin.File.IsFileExist("C:\Windows\加密文件.txt")   
    If IsFile = True Then
      Call Plugin.File.DeleteFile("C:\Windows\加密文件.txt")   
    End If   

    If Form1.InputBox3.Text = "999999" Then
      Set mc = GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
      For Each mo In mc
            If mo.IPEnabled=True Then
                MAC地址 = mo.MacAddress
                TracePrint MAC地址
                Exit For
            End If
      Next
      加密密码 = Plugin.Encrypt.Md5String(MAC地址)   
      TracePrint 加密密码
      Call Plugin.File.WriteFileEx("C:\Windows\加密文件.txt", 加密密码)
      MessageBox "绑定机器成功..."
    Else
      MessageBox "请输入正确的绑定密码..."
    End If
   
End Event

Function 判断绑定()
       
    判断绑定 = 0
       
    IsFile = Plugin.File.IsFileExist("C:\Windows\加密文件.txt")
    If IsFile = True Then
      得到密码 = Plugin.File.ReadFileEx("C:\Windows\加密文件.txt")
      Set mc = GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
      For Each mo In mc
            If mo.IPEnabled=True Then
                MAC地址 = mo.MacAddress
                TracePrint MAC地址
                Exit For
            End If
      Next
      加密密码 = Plugin.Encrypt.Md5String(MAC地址)
      对比密码 = 加密密码 & "|"
      TracePrint 对比密码
      If 得到密码 = 对比密码 Then
            判断绑定 = 1
      End If
    Else
      MessageBox "该机器未绑定..."
    End If
   
End Function

Event Form1.InputBox1.Change

    Key = GetLastKey()
    TracePrint Key
   
    If key = 32 Then
      If 判断绑定() = 1 Then
            系统时间 = Plugin.GetSysInfo.GetDateTime()
            TracePrint 系统时间
            Call Plugin.File.WriteFileEx("C:\记录文件.txt", Form1.InputBox1.Text & "----" & 系统时间)
            Call Plugin.Media.Play("C:\9725.wav")
            Form1.InputBox1.Text = ""
      End If
    End If

End Event




那个高手可以帮忙看下要怎么改才可以把插入的快捷键空格改成回车
页: [1]
查看完整版本: 那个高手帮忙看下要怎么改