鱼C论坛

 找回密码
 立即注册
查看: 1753|回复: 0

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

[复制链接]
发表于 2019-4-23 22:19:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
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




那个高手可以帮忙看下要怎么改才可以把插入的快捷键空格改成回车
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-25 00:19

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表