|
#NoTrayIcon
$g_szVersion = "My Script 1.1"
If WinExists($g_szVersion) Then Exit
AutoItWinSetTitle($g_szVersion)
dim $user,$user1[2],$TERM =1,$X = 1,$error = 1
HotKeySet("{F4}", "autoinput1")
HotKeySet("{F9}", "TEST")
HotKeySet("{F10}", "TogglePAUSE")
HotKeySet("^!q", "ToggleExit")
$NEXTTIME = IniRead ( "Id_Card.INI", "下次使用", "下次使用","1")
IF $NEXTTIME < 1 OR $NEXTTIME >500 THEN $NEXTTIME = 1
TogglePAUSE()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FUNC NEXTTIME()
FOR $term = 1 to 500
$USER = IniRead( "Id_Card.INI", "身份证", $NEXTTIME , "ERROR" )
$NEXTTIME = $NEXTTIME + 1
IF $NEXTTIME < 1 OR $NEXTTIME >500 THEN $NEXTTIME = 1
if $USER = "ERROR" THEN
IF $X > 30 THEN $NEXTTIME = 1
$X = $X + 1
CONTINUELOOP
ELSE
$X = 1
ENDIF
$USER1 = STRINGSPLIT($USER,",")
IF $USER1[0] = 2 THEN
IF $USER1[1] = "" OR $USER1[2]= "" THEN CONTINUELOOP
IF STRINGLEN($USER1[1]) < 4 OR STRINGLEN($USER1[1]) > 6 THEN CONTINUELOOP
IF STRINGLEN($USER1[2]) = 15 OR STRINGLEN($USER1[2]) = 18 THEN RETURN
ENDIF
NEXT
IF $ERROR < 3 THEN
$ERROR = $ERROR + 1
TogglePAUSE()
ELSE
$NEXTTIME = 1
ToggleExit()
ENDIF
ENDFUNC
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
FUNC autoinput1()
sleep (100)
send ($USER1[2])
$ERROR = 1
sleep (100)
TogglePAUSE()
ENDFUNC
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
FUNC TEST()
MSGBOX (0,$USER1[1],$USER1[2],1)
ENDFUNC
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;
FUNC TogglePAUSE()
ToolTip('已暂停',200,0)
sleep (1000)
ToolTip("")
NEXTTIME()
IF $NEXTTIME < 1 OR $NEXTTIME >500 THEN $NEXTTIME = 1
WHILE 1
WEND
ENDFUNC
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FUNC ToggleExit()
INIWRITE ( "Id_Card.INI", "下次使用", "下次使用", $NEXTTIME )
ToolTip('已退出',200,0)
SLEEP (1000)
EXIT
ENDFUNC
;;;;;;;;;;;;;;;;;;;;;
这是一段自动填写身份证号号码的源码,为什么重复填写一段时间会出现“Error:Recursion level has been exceeded - AutoIt will quit to prevent stack overflow”的错误 |
|