#AutoIt3Wrapper_Res_Description=内蒙古赤峰DJ
#AutoIt3Wrapper_Res_Fileversion=1.0.0.1
#AutoIt3Wrapper_Res_LegalCopyright=QQ 499084289
#AutoIt3Wrapper_Res_Comment=内蒙古赤峰DJ
#include <Constants.au3>
Opt("TrayOnEventMode", 1)
Opt("GUIOnEventMode", 1)
Opt("TrayMenuMode", 1)
$pause = TrayCreateItem('暂停')
TrayItemSetOnEvent(-1, "Pause")
$About = TrayCreateItem("关于")
TrayItemSetOnEvent(-1, "About")
$Exit = TrayCreateItem("退出")
TrayItemSetOnEvent(-1, "quiet")
TraySetState()
AdlibEnable('pau', 100)
Dim $a
Dim $Verison = "同联刷卡助手"
$paused = 0
Reg()
Func kahao()
$random = IniRead(@ScriptDir & "\config.ini", "配置", "random", 0)
$Val = Random(1, $random, 1)
$kahao = FileReadLine("data.ini", $Val)
$a = $kahao
data()
EndFunc ;==>kahao
;判断卡号是否上机
Func data()
$datename = "Data.mdb"
$datepass = "áíùaidf/emfid#dfDS~"
$Strn = $a
$addfld = ObjCreate("ADODB.Connection")
$RS = ObjCreate("ADODB.Recordset")
$addfld.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & $datename & ";Jet Oledb:Database Password=" & $datepass)
$RS.ActiveConnection = $addfld
$dqml = "select * from PCStatus where UserCardNO= '" & $Strn & "'"
$RS.Open($dqml)
If $RS.eof And $RS.bof Then
sj()
Else
kahao()
EndIf
EndFunc ;==>data
Func sj()
WinWait("用户上机")
WinActivate("用户上机")
Send("@" & $a)
Send("{enter}")
WinWait("吧台程序提示")
WinActivate("吧台程序提示")
Send("{enter}")
Send("{tab}{tab}{tab}")
WinWaitClose("用户上机")
kahao()
EndFunc ;==>sj
Func pause()
$paused = Not $paused
If $paused Then
TrayItemSetState($pause, 65)
Else
TrayItemSetState($pause, 68)
EndIf
EndFunc ;==>pause
Func pau()
While $paused
Sleep(100)
WEnd
EndFunc ;==>pau
Func About()
MsgBox(64, "关于", $Verison & @CRLF & @CRLF & @CRLF & "QQ499084289" & @CRLF & @CRLF & @CRLF & "内蒙古赤峰DJ")
EndFunc ;==>About
Func quiet()
Exit
EndFunc ;==>quiet
;硬件认证
Func Reg()
If (_GetMAC(@IPAddress1) <> "0019214950B6") Then
MsgBox(64, "!同联刷卡助手-错误", "您的机器没有注册同联刷卡助手" & @CRLF & "请联系QQ 499084289 注册")
Exit
Else
MsgBox(64, "提示", "程序成功运行", 10)
kahao()
EndIf
EndFunc ;==>Reg
Func _GetMAC($sIP)
Local $MAC, $MACSize
Local $i, $s, $r, $iIP
$MAC = DllStructCreate("byte[6]")
$MACSize = DllStructCreate("int")
DllStructSetData($MACSize, 1, 6)
$r = DllCall("Ws2_32.dll", "int", "inet_addr", "str", $sIP)
$iIP = $r[0]
$r = DllCall("iphlpapi.dll", "int", "SendARP", "int", $iIP, "int", 0, "ptr", DllStructGetPtr($MAC), "ptr", DllStructGetPtr($MACSize))
$s = ""
For $i = 0 To 5
$s = $s & Hex(DllStructGetData($MAC, 1, $i + 1), 2)
Next
Return $s
EndFunc ;==>_GetMAC
忘记数据库文件了